Java 11 had recently arrived and, as everybody knows, this version has no installation file.
To install Java without installer I, of course, had set my system settings PATH and JAVA HOME to the address of the folder where my Java 11 was unzipped (advised by accepted reponses to similar questions).
The only thing is that all those advices about system settings make no effect whatsoever on my machine:
Checking with a command line outputs my old Java 9 version
With Java 9 removed from the folder, command line does not recognise any Java at all.
So, is there actually any way to install this version?
Thanks for future answers and for not marking my question as a duplicate (for the reason explained above)
The problem resided in the format of the path line:
My path included multiple entries, I was putting Java at the end of the line and the change was not working
But when I placed it right at the start of the path line, Java 11 got accepted and started to function alright on my Windows.
For other users facing a similar issue:
The root of the problem was that, as Klitos Kyriacou rightly pointed out, my path included other entries that had a word 'java' in their names. When placed before Java 11 in the classpath, those entries were invalidating my adding of the java version.
Looks like Oracle uninstaller does not clean up everything.
Even after uninstalling all old jdk/jre and installing OracleJDK 11, my system still has "C:\ProgramData\Oracle\Java\javapath" folder and "C:\ProgramData\Oracle\Java\javapath" entry in PATH.
Because of that when I run "java -version" I get:
C:\>java -version
Error: opening registry key 'Software\JavaSoft\JRE'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
Related
I have formatted my Mac due to some storage issues. Before this, I used Eclipse in a proper way. Now i have installed the JDK
Then, i have installed Java
Until now everything seems to be correct but when I open the Eclipse installer...
What can I do to fix this? I need to work with this the soon as possible.
Thanks
Eclipse on macOS will not start with Java 14 installed, this is being tracked in Eclipse bug 561273.
Installing Java 8 as well does not help. You need to remove the Java 14 install. You could use the Java 13.0.2 release instead.
Eclipse have determined that the root cause of this issue is a change in Java 14 which is described in this bug report JDK-8238225. The fix for this should be in Java 14.0.1
Update: Eclipse runs fine with Oracle Java 14.0.1 so the issue has been fixed.
I also asked this question which was closed, that's why I answer what I have found out: Eclipse will not install on Mac OS Catalina 10.15.4, saying the above error message
Failed to create the Java Virtual Machine.
Deinstalling jdk and install an older one wouldn't help on its own because Eclipse is refusing to install in the first place (as mentioned above). What I have done:
i´ve installed an JDK with boost (you can try several, mine worked with Version 13)
I edited the installer:
Download the dmg file
convert the dmg-file with "hdiutil convert /dev/disk3s1 -format UDRW -o devimage"
mount the converted dmg-file with: "hdiutil attach -owners on devimage.dmg -shadow"
Edit the /Volumes/Eclipse/Eclipse.app/Contents/Info.plist: there is a section which is commented and there you can try the jdk version. You have to give the full path to the java executable, for example:
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java</string>
Then my eclipse started from the (already) mounted Eclipse image without complaining
I had the same issue myself a while back. In your Eclipsepedia it provided an example of what the eclipse.ini file looks like when your trying to specify a JVM. So just change the eclipse.ini file and then make sure that you have all of the correct documents in that path to match the example.
I have formatted my Mac due to some storage issues. Before this, I used Eclipse in a proper way. Now i have installed the JDK
Then, i have installed Java
Until now everything seems to be correct but when I open the Eclipse installer...
What can I do to fix this? I need to work with this the soon as possible.
Thanks
Eclipse on macOS will not start with Java 14 installed, this is being tracked in Eclipse bug 561273.
Installing Java 8 as well does not help. You need to remove the Java 14 install. You could use the Java 13.0.2 release instead.
Eclipse have determined that the root cause of this issue is a change in Java 14 which is described in this bug report JDK-8238225. The fix for this should be in Java 14.0.1
Update: Eclipse runs fine with Oracle Java 14.0.1 so the issue has been fixed.
I also asked this question which was closed, that's why I answer what I have found out: Eclipse will not install on Mac OS Catalina 10.15.4, saying the above error message
Failed to create the Java Virtual Machine.
Deinstalling jdk and install an older one wouldn't help on its own because Eclipse is refusing to install in the first place (as mentioned above). What I have done:
i´ve installed an JDK with boost (you can try several, mine worked with Version 13)
I edited the installer:
Download the dmg file
convert the dmg-file with "hdiutil convert /dev/disk3s1 -format UDRW -o devimage"
mount the converted dmg-file with: "hdiutil attach -owners on devimage.dmg -shadow"
Edit the /Volumes/Eclipse/Eclipse.app/Contents/Info.plist: there is a section which is commented and there you can try the jdk version. You have to give the full path to the java executable, for example:
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/bin/java</string>
Then my eclipse started from the (already) mounted Eclipse image without complaining
I had the same issue myself a while back. In your Eclipsepedia it provided an example of what the eclipse.ini file looks like when your trying to specify a JVM. So just change the eclipse.ini file and then make sure that you have all of the correct documents in that path to match the example.
I am new to Java. I am taking a University beginners Java course. I'm running my first hello world code and am getting an error message. I have installed the latest Dr. Java stable version and have installed Java SE 12 JDK.
I have uninstalled and reinstalled Dr. Java several times and still getting error message. I have also recompiled it to and still the error message is there.
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
I expected the code output to say, "Hello World" under the interactions pane but it isn't and instead there is an error message that says, "Current document is out of sync with the Interactions Pane and should be recompiled!".
Also, under the console pane I receive the following message:
Compiler is using classPath = '[C:\Users\Admin,
C:\Users\Admin\Downloads\drjava-beta-20190813-220051.jar]';
bootClassPath = 'null' Fatal Error: Unable to find package java.lang
in classpath or bootclasspath
Realizing that the OP solved his problem by version of JDK, I ran across this question after experiencing the same symptoms he describes. With that, it seems possibly appropriate to post a solution for the symptoms even though the problem ended up not being quite "identical" to the OP's situation:
I had the same problem with compilation not working. In my case, I am using a Linux system that has both OpenJDK and a manually installed Oracle JDK (extracted from a tarball obtained from java.com), along with some other JRE environments in various places. I "installed" the DrJava Version : drjava-20190813-220051 jar file and ran it from the command-line. I then clicked [ Manual Download ] when it asked about installing updates (drjava-beta-2019-220051).
DrJava reported that my compiler was JDK 8.0_222. Note, I don't know where that compiler came from. As far as I know, I didn't have that version installed. My OpenJDK was:
$ /bin/java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
I typed in a simple "Hello World" program, and every attempt to compile produced:
Compiler Output:
"Compilation completed."
This is a bug, because in fact compilation apparently did not complete.
Clicking Run produced:
Interactions
Welcome to DrJava. Working directory is /home/krb/Projects/Software/java
Current document is out of sync with the Interactions Pane and should be recompiled!
>
Restarting DrJava, saving, clicking Reset, etc., would not clear the problem.
In any event, at some point I noticed the Console tab was full of messages like:
Console
Compiler is using classPath = '[/home/krb/Projects/Software/java, /home/apps/drjava/drjava-beta-20190813-220051.jar]'; bootClassPath = 'null'
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
At this point, I tried various things, but I focused on pointing DrJava to an Oracle Java JDK I had installed a few days ago. Everything I did was in Edit | Preferences ... | Resource Locations, though I beat around in there a while. All of the settings were "blank" before I started. Anyway, I eventually had some success after I'd set:
Web Browser
/usr/lib64/firefox/firefox
Web Browser Command
Tools.jar Location
/home/raid/apps/oracle/jdk-1.8.0_251/jre/lib/tools.jar
Display All Compiler Version [ ]
Extra Classpath
/home/raid/apps/oracle/jdk1.8.0_251/jre/lib
/home/raid/apps/oracle/jdk1.8.0_251/lib
NOTE: Your PATHs will NOT be the same as mine! You need to use the
actual paths on your system. In my case I searched for "rt.jar" and
"tools.jar" that were obviously in folders related to an installed
JDK.
At this point I decided to try to figure out the minimum required to get it working. After a lot of fiddling around, I found it is sufficient just to set Preferences | Resource Locations | Tools.jar Location, but with with one MAJOR caveat. You must BROWSE to the file using that dialog. YOU CANNOT JUST PASTE IN THE PATH! If you just paste in the path, it can look like it is set correctly, but the compiler will continue to not work. This was how I got the oracle jdk compiler to work.
Next, I set about to see if I could get OpenJDK to work. I searched my entire system for another tools.jar that belonged to OpenJDK, and did not find one. Then I realized I did not have the DEVEL OpenJDK package installed (on Mageia Linux 7).
java-1.8.0-openjdk-headless-1.8.0.252-1.b09.1.mga7
java-1.8.0-openjdk-1.8.0.252-1.b09.1.mga7
I installed:
java-1.8.0-openjdk-devel-1.8.0.252-1.b09.1.mga7
Now, even after resetting defaults, DrJava no longer says it is using JDK 8.0_222, but rather JDK 8.0-openjdk-1.8.0.252-1.b09.1.mga7.x86_64-OpenJDK, and everything works fine with NO customization to preferences!
I don't know where the heck JDK 8.0_222 came from. There's nothing on my system with that version. I rather suppose it is some internal thing in DrJava. I think the takeaways are:
If DrJava says its using JDK 8.0_222, it probably is not going to work!
Make sure you actually have a tools.jar installed if your system might split up the OpenJDK installation.
Point Tools.jar Location to an existing tools.jar file where the JDK you are using is installed, and making sure to browse to it (not just paste in a path).
I know what I saw was with Linux and a .jar install of DrJava, and this might not be what you have, but perhaps the information will be helpful in offering you things to look at and try.
As the answers above state, DrJava is not compatible with newer versions of Java than Java 8. Most of the DrJava codebase was written long before the open source version of Java was viable. The Sun Microsystems and Oracle javac compilers are proprietary and cannot be distributed with open source apps like DrJava. So DrJava searches for tools.jar (the library file containing the compiler in Java JDK distributions prior to Java 9) in common locations on Windows, Mac OS X, and Linux to find a compiler (more accurately, what were common locations in 2007). If you are running DrJava from a Java 8 JDK, it almost always finds it (although it appears to be failing for some installations Amazon Corretto 8). The most recent available build (March 3, 2020) of DrJava at www.cs.rice.edu/~javaplt/drjavarice may do a better job. I know it includes a later version the open source Java 8 compiler (JDK 8.0_242) and that it also finds the compiler (JDK 8.0_265) in the Corretto 8 distribution that I am using on Windows 10. The mysterious version of the open source JDK compiler reported above is being retrieved from the drjava.jar file itself. Now that the open source JDK includes a reliable compiler (which I suspect is nearly identical to the Oracle Java 8 SE compiler), the drjava.jar file includes a recent build of the open source Java 8 compiler.
Your solution helped me troubleshoot a problem with DrJava not recognizing the Amazon Carretta JDK on a Mac.
The fix is to open DrJava and go to Edit -> Preferences -> Resource Locations. From the Tools.jar Location box you must use the three dots at the end of that box to navigate to the tools.jar file on your Mac, which is probably in /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/lib/tools.jar.
I downloaded the archive for the program, unzipped it to C drive on Windows, then when I try to run either executable (32bit/64bit) in the bin folder I get the error message:
Cannot find JAVA 1.8 or higher.
in spite of Java 10 (JRE) being already installed. I also tried Installing Java 9 but was stuck with the same message.
I appreciate your help with this, Thanks.
Locate your Netbeans installation and in it the etc/netbeans.conf file. Open it with any text editor, and locate the line containing netbeans_jdkhome. If it is commented out (line starts with #), then remove the # to enable the setting. Then, set the value to the path to your JDK. This might be somethiing like C:\Program Files\Java\jdk-10.0.1.
Try to run the program again, it should work now. At least, it did for me.
Also, ensure that you installed the Java Development Kit (JDK), not only the Java Runtime Environment (JRE). Netbeans needs the former to be installed in order to function.
I experienced the issue after I updated Java and the version changed but the netbean.conf had the older version which is invalid.
The remedy is go into that file via notepad, or any text editor and then update the path with the correct version number, i.e. netbeans_jdkhome="C:\Program Files\Java\jre1.8.0_311".
You would go determined your latest Java edition, by pulling up the Java control panel and then hit the middle "Java" tab, hit "View" to see the current version you have installed.
This is the issue of compatibility of Netbeans with your installed jdk version
Locate your etc/netbeans.conf file and Open it. In the #netbeans_jdkhome="C:\Program Files\Java\jdk-17.0.1" replace the given path with your installed jdk. It will work
I've been working on Aptana Studio and some JRE required software for a bit of time now , but since yesterday something quite odd happened, as suddenly the software that requires it threw me an error No Java virtual machine was found . Last thing I did before that was restoring my system files permissions thought safe mode as I had some trouble with that , could this have anything to do with it ?
I've tried installing JRE once again , no results. However when I run
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
I do get the following
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Aptana gives me the following error
No Java virtual machine
was found after searching the following locations:
/Applications/Aptana Studio 3/AptanaStudio3.app/Contents/MacOS/jre/bin/java
java in your current PATH
And other software such as Spine won't simply start.
My .bash_profile is the following :
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
PATH="/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin:${PAT$
export PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
The output of echo $PATHis the following
/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
The output of echo $JAVA_HOME is the following
/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
And Java invocations on the terminal work.
Guidance will be highly appreciated.
After trying Peter's suggestion the problem persisted but now in another context : "/System/Library/Frameworks/JavaVM.framework" does not contain the JNI_CreateJavaVM symbol"
After struggling for many hours, and reading about people with the same issue opting to re-install the entire OS , decided to examine the issue from another perspective, the thing I first mentioned here that I believe went unnoticed was that I restored my permissions before this happening, so what I did was the following.
After reading a bunch of articles about Apple no longer providing Java support themselves but Oracle providing it, reasoned through it and realized that perhaps paths (Often called directories) from Apple's final Java release may have not been strictly the same as the new Oracle releases, so decided to wipe out all recent Oracle Java Runtime Environment that I found on /Library/Java/JavaVirtualMachines and delete the Java Applet Plugin from /Applications (Just search for it on your /Applications path) .
Installed Apple's last stable release from the following link.
Located where Apple located their Java releases : /System/Library/Frameworks/
My particular interest was the Java Runtime Environment , so I explored the JavaVM directory on /System/Library/Frameworks/
Found out that all Apple's JRE previous releases reside on a directory called Versions that is within /System/Library/Frameworks/JavaVM.framework directory, here's where I noticed something rare, for some reason at the moment I restored file permissions from my Disk Utility Application , this directory was made inaccessible (By not giving the root user permissions to access anything in itself).
Went to my terminal console and inside the JavaVM.framework directory modified the permissions to that directory to be accessible for all users by running the following command chmod -R 777 Versions.
After executing these actions I went straight to my JRE-Required software and attempted to open it , success!
Things to learn from the issue.
Oracle's Java JDK/JRE are located in different paths from Apple's. (If you are struggling with some other issue, verify your Java version to determine your Java installation directory)
Apple's disk utility application might define different permissions than expected for some files. (After restoring permissions verify that everything's working fine, if not this may be the cause of your problems.)
Looks like AptanaStudio (Eclisebased right?) assumes that you have a JRE inside the Aptana directory (/Applications/Aptana Studio 3/AptanaStudio3.app/Contents/MacOS/jre/bin/java)
I assume that there is nothing there. Simplest way would be to symlink your existing JRE installation to that directory:
ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre /Applications/Aptana\ Studio\ 3/AptanaStudio3.app/Contents/MacOS/jre
Or you could start Aptana from the terminal and specify the path to java with -vm:
./aptana -vm "/path/to/java/bin/directory"
Environment variables that must be available to GUI applications are a bit tricky in OsX (at least in my experience).
It is possible to set global PATH (and other variables) in /etc/launchd.conf, see for example here and /etc/paths.d see here.
Simple Solution
For Windows:
1.download the JAVA runtime environment x86(32bit) version else you will get an error with dll file from here http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Extract the folder out of the .tar file you downloaded.
Rename the JRE folder to "jre"
Then paste it in to this directory
C:\Users\"User Name"\AppData\Roaming\Appcelerator\Aptana Studio
This worked for me
I uninstalled all my Java JREs and JDK for Windows 10. Then I downloaded Aptana again and let it install Java for me. I think JAVA 8 was my problem, but this worked and I can still install the other versions again.