No Java runtime present, requesting install - java

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

Related

JDK8 for NetBeans 12.2?

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.

Check the if version of JDK installed on macOS is the correct one

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.

why java version not updated on mac machine?

I checked my java version from terminal .I got this information
Last login: Sun Mar 15 08:46:08 on ttys000
localhost:~ naveenkumar$ java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
localhost:~ naveenkumar$
I install new java 1.8 JRE .close my terminal .Agan i type java -version .I found the same version .
why ? how to upgrade java version.
You installed Java 8 but it didn't overwrite this: /usr/bin/java
The easiest way for you to solve this problem is to install Java 8 JDK, not JRE. After install JDK, your path should be automatically updated.

java version and PATH on OS X

I'm not sure why my PATH is not being respected regarding where to find java on my MAC OS X 10.9.5.
After searching around I found that the Java version referenced from the command line was at /usr/bin/java, while the Java version referenced by Oracle's tools used by browsers and visible at System Preferences > Java, Open the Java Control Panel, click on Java tab at top, click on View... button, check both User and System tabs for Path, showing in both:
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
The command line picks up 1.6.0_65 even though that is for the version at /usr/bin rather than the one at /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin earlier in the path.
Joes-MacBook-Pro:~ josephmurray$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Joes-MacBook-Pro:~ josephmurray$ which java
/usr/bin/java
Joes-MacBook-Pro:~ josephmurray$ echo $PATH
/Applications/tr-sub.app/Contents/MacOS:/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin:~/civix:/usr/local:/usr/local/bin:/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php5.4.19/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/usr/local/git/bin:/usr/X11/bin:/Library/PostgreSQL/9.3/bin/
Joes-MacBook-Pro:~ josephmurray$ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Joes-MacBook-Pro:~ josephmurray$ /usr/bin/java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Joes-MacBook-Pro:~
This is preventing me from installing eclipse because it needs Java to be at least 1.7. How can I fix this?
If you want to work with Eclipse, you need to install a full JDK, not use a JRE. The installed JRE is lacking debug symbols etc.
You can install it from Oracle's Java SE Development Kit download page.
You will then also be able to use command line tools such as javac.
The problem turned out to be using a backslash to escape the space in the path. While using it is necessary when entering a command on the commandline, it should not be included when setting PATH in ~/.bash_profile:
export PATH="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin:~/civix:/usr/local:/usr/local/bin:/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php5.4.19/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/usr/local/git/bin:/usr/X11/bin"
export PATH=/Applications/tr-sub.app/Contents/MacOS:$PATH:/Library/PostgreSQL/9.3/bin/
NB: Each time you edit ~/.bash_profile you need to refresh the environment variables in the shell by running:
$ source ~/.bash_profile

Eclipse launch error- error code 13

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:

Categories