I'm trying to install JDK8 as a platform on NetBeans 12.2, but I keep getting this error message:
"Cannot detect and install the selected platform. The java or javac may not be executable."
Is there a way around this? Or is there a version of JDK8 that won't yield this error message?
Further: I should have mentioned that I'm on MACOS Big Sur.
Here's what I get with java -version in Terminal:
java version "15.0.2" 2021-01-19 Java(TM) SE Runtime Environment (build 15.0.2+7-27) Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)
And here's what I get with javac -version:
javac 15.0.2
You are probably getting this message because the JDK executables haven't been added to your path as environment variables. Directly from the official java website, here's a guide on how to fix this problem.
Related
I have a macbook with latest HighSierra installed and from System Preferences / Java Panel. It says that i have got latest Java version installed: java 8 update 181.
From the "Java" tab of the aforementioned "Java settings" dialog i can see that the version 181 it is referring to is installed in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
If i try to execute that binary (i.e. java -version) i actually get:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build
1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
however when i try to launch "java" from a generic prompt or if i try to execute javac i get a different result:
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
this latter java is installed in /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/
So it seems to me that i have got a jre (181) and a jdk (40) is this correct?
if so, is this the correct setup on mac? i started to wonder when forticlient analyzer showed up a bunch of CVE security issues related to JDK that are fixed in update 181.
I have download Dr.Java ( the latest version) and tried to open it. But it shows an error, saying that I need a Java Runtime Environment 1.5.0.
So I go to my command prompt, and I put in : "java -version". Here is the result:java version "10" 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)
So I clearly have Java downloaded. Is my version "too modern" for Dr.Java?
I had the similar issue as I was using jdk10. It seems like drJava is not compatible with new jdk10. I resolved my issue by installing jdk version 8. https://java.com/en/download/
I have java JDK installed sucessfully in my mac os 10.9 ..
$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
But when i try to run eclipse it asks me to jave SE 6 Runtime again !!!
It looks like eclipse is unable to locate the installed java. You can tell eclipse to point to this version of java by modifying eclipse.ini file
In eclipse.ini file, we need to add -vm option to point to the java8 location:
See: http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Mac_OS_X_Example
Eclipse returns this error message when launching:
I am pretty sure that both the java installation and Eclipse are both for my 64-bit system.
Here is my .ini file:
Your version of Eclipse looks OK, based on the filename.
To check your version of Java, run java -version in a console. On Windows 7 with 64-bit Java 6 I get:
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
Check that this is the version being used by Eclipse, as shown in your error code. If not, call that version explicitly, e.g.
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -version
I moved the
-vm
up below the first openfile, not the second.
PIC:
I'm running on ubuntu 12.04 and when I put in the terminal java -version I got this message:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
but despite that, if I put in the terminal javadoc I receive a message as it isn't installed in my machine.
The Java Runtime Environment (JRE) doesn't include javadoc. It includes only the things required to run Java programs, not to develop them.
You need the JDK (Java Development Kit) which includes developer tools like javadoc, in addition to everything found in the JRE.
See the Ubuntu Java documentation.