I have the latest java by now 1.8.0_25 on my mac. version checker says it's fine.
But I 'm getting this error
If I click 'Later' it works, but then appears again later. I see this almost since the release of 1.8.
I also have jdk1.7 and 1.6(apple) installed. enter image description here
I had the exact same problem for the longest time. No old Java VM showed up in the system preferences. I eventually found and old JDK in /Library/Java/JavaVirtualMachines.
Check in the following locations for "old" VMs:
find /Library -name '*java*'
find /System/Library -name '*java*'
find ~/Library -name '*java*'
On Mac, a newer JDK does not necessarily replace an older JRE. So it might be that you have the latest JDK, but still an old JRE somewhere. Go to the Apple menu and choose "System Preferences…". There should be a "Java" entry in the last section. Clicking on it should open the Java Control Panel in a separate window.
Check what it says there in the Update-tab. My guess is, that there is still an older version listed. So I would just update it. You can also check if on the "Java" tab in the Control Panel, if there are multiple versions listed and which one is the top one. Maybe reordering them if you have multiple to have the newest on top might help as well.
Related
For years I have distributed a piece of software that relies on javafx, and the solution has been to include a JRE in the distributed software and run my .jar file with a script that sets JAVA_HOME. It has worked great.
The Mac version has always been a challenge: I have to download the .dmg from java, unpack it, and tweak the script for (historically) a different directory structure (which may be an artifact of the .dmg packaging, I don't know). But it always worked. (I do this on Linux.)
I recently updated the included JRE to the latest version (1.8.0_291) and it no longer works on the Mac, even after I corrected for the new directory structure. Users report that the script errors with:
Error: could not find libjava.dylib
Error: Could not find Java SE Runtime Environment.
...and indeed, there is no libjava.dylib. In the previous Mac JRE version I was using (1.8.0_92) this file was at:
lib/jre/Contents/Home/lib/libjava.dylib
...but it is not present anywhere in the latest. I also note that the latest JRE totals 107 MB, where the older one was 164 MB, so it would appear that there is something I'm not understanding about these more recent JRE downloads. E.g. perhaps the mac version requires an installer to run to be complete?
Where can I download a distributable Mac JRE?
Failing that, what is the proper way to make a contained Mac JRE?
It appears that AdoptOpenJDK is a good general way to go for multi-platform pre-built JREs, but they do not include JavaFX.
I attempted to use OpenJDK in conjunction with libraries from OpenJFX from openjfx.io, and although my application superficially worked, there were very many exceptions implying poor compatibility between the two. (I was unable to match versions precisely for JDK 11. It's possible that the latest version of both (JDK 16) might interoperate better.)
I found the Liberica JDK from BellSoft. Their "Full JRE" includes javafx and is working. I do get one swing-related exception on startup, but it doesn't seem to matter to functionality.
Apparently there is also the Azul platform, but I have not investigated it.
I've tried to install eclipse, but it's connected to the web page displaying the following error and I couldn't install it.
Unfortunately the Java version needed to run Eclipse Installer couldn't be found on your system. You need the following version or a higher version: Java 1.8.0 (64 Bit)
But my JDK version is Aleady 1.8.0_231(64Bit) and i completed setting up the environment variable.
(JAVA_HOME, and Path as System Variable)
Normally, using a different IDE like InteliJ(and it works normally on my computer) can be a solution but it's not possible because I have to submit it as a university assignment using eclipse.
What should I do?
This is my CMD Screenshot with checking JDK version
For anybody else (especially other Koreans) who may be struggling with Eclipse installation, turns out that the installer won't work if your account user name is in Korean. Specifically referring to the name that shows when you run your command prompt (as shown in the poster's image hyperlink) or at C:\Users -- if that name is in Korean, that it turns out that Eclipse installer will not work even if most recent Java is installed and paths are set correctly.
Easy way to get around this issue then is to create another local account with only English characters, and run the installer. Not sure why this happens, but it seems to be a common pattern I noticed with the most recent version of Eclipse installer.
It seems installing Eclipse on the account with English characters only still does not allow Eclipse to run, so I have to be signed into that account if I'm using the laptop. Maybe someone who can deal with this issue in a more efficient way can help us out?
I had a similar problem with AdoptOpenJDK 13 (The PATH and JAVA_HOME variables were correct).
The way I fixed that was simple. I created a eclipse.ini with the following contents in the same directory as the eclipse installer:
-vm
C:\Program Files\AdoptOpenJDK\jdk-13.0.0.33-hotspot\bin\javaw.exe
After doing that, the installer stopped complaining and I could install eclipse.
Ok so anyone answering please be aware that I am a complete beginner to all of this. But I have installed jdk1.8.0 because that is what the newest version of android studio needs, but when I open Android studio up, it says I still need to change it. So after a lot of research I made a new Java_Home variable and set the directory to where my jdk file was. I then went into android studio file, project structure, then changed that jdk directory as well. However, when I click ok, It still doesn't work, and when I go back to the project structure, it changes from jdk version 8, to my old jdk version 7 directory. For some reason it isn't saving :(. I would really appreciate some help here.
You could try to disable the old JDK in the "Java Control Panel" (JCPL). Start the JCPL by double-clicking on jre\bin\javacpl.exe (it's a Swing application, i.e. it has a GUI). Choose tab "Java" and click on the button "View ..." to see a table with all installed JDKs. Each JDK has a checkbox "Enabled", which should be unchecked for the old JDK.
When you restart Android Studio after this it should ask you for the path of the JDK.
The following question might also be helpful to solve this issue: Android Studio JDK location changes back to 1.7 every time it is updated to 1.8 path
I found out I had the JRE and the JDK on 2 different folders, I then deleted the JRE. The JRE is still here in the JDK install.
I then searched a bit about the problem. I created the environment variable (I am on W10) JAVA_PATH with the good path but it still doesn't work.
A dialog box says (I can't copy paste all) :
JVM terminated
C:\ProgramData\Oracle\Java\javapath\javaw.exe
(lots of things)
I don't know how to get it working.
Reinstalling your JRE will solve the problem. If you want to get rid of some software always deinstall it if possible because you don't know where all of the files and settings were installed.
you will need java, if you have a JDK the a JRE is included there by default..., maybe you had 2 version of java and you still have a jdk, so lets say you deleted the jre, then you need to tell the eclipse IDE that it must use the version you have installed and where it can find it..
How:
like this...
but now, if you deleted ALL the java versions then you will need to install at least one...
You should have defined your environment variable as JAVA_HOME and assign it your JDK's path. Then, add this variable to your PATH variable as JAVA_HOME/bin.
I have been trying to make this work all day long but there seems to be no end to my frustration. I want to use Google App Engine for my android application. I have downloaded the jdk 1.7 u51 but still whenever i start the eclipse ADT, a dialog box appears saying that jdk 1.6 is in use; jdk 1.7 or higher needs to be installed. I have set the path in the preference to jre inside the jdk 1.7. Also, the app engine SDK path shows the error "Failed to initialize App Engine SDk[path]". I have referred all the threads here and over the internet relating to this issue and have tried all the proposed solutions but to no avail. Any help would be greatly appreciated.
versions
eclipse 4.2(ADT)
JDK 1.7u51
App Engine SDK 1.8.9
Try uninstalling the old java version, and making sure that the latest version is the only one installed. Another problem might be if you have a 64-bit computer, you may have the older version installed to one program files, but Eclipse is looking through the x86 program files and not finding the correct version(or vice-versa). You may also want to set your PATH and CLASSPATH.
Type
java -version
javac -version
into the command prompt, and it will return with what Java you have installed.
If all else fails, try reading https://developers.google.com/appengine/docs/java/gettingstarted/installing for more information and see what went wrong.
You must have matching architecture for Eclipse and JDK. If you are using 32-bit eclipse, then use 32-bit JDK else use 64-bit versions of both.
Everything else will fall in place automatically
I am using Indigo and found this forum thread to do the trick.
To your eclipse.ini file add
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_WHATEVERTHESUFFIXIS/Contents/Home/jre/lib/server/libjvm.dylib
Note the suffix "lib/server/libjvm.dylib" which is not what you use for later versions of Eclipse. (For them you link to "bin/java".) This needs to be above any "-vmargs" flags in eclipse.ini.