java version issue on mac

One Star

java version issue on mac

I'm running OSx 10.10.5 - when I view my java version in mac system preferences it tells me i'm up to date with java 8 Update 112 - when i try to install open studio form the zip file by selecting the TOS_DI-macosx-cocoa application i get an error message that i'm running 1.6.0_65 and that 1.8 is required. I did some goggling and found how to look at my java version from the mac terminal. When i type in /usr/libexec/java_home -verbose i get the below info which indicates that i have 1.6 and not 1.8 (see below). How do i get open studio to reconize the 1.8 version as inidcated in my mac java system preferences?

Eric
Eric-Gewirtzs-MacBook-Pro:bin ericgewirtz$ /usr/libexec/java_home -verbose
Matching Java Virtual Machines (2):
    1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
my Java from System Preferences
Error msg from open studio
Six Stars

Re: java version issue on mac

Hi Eric,
Just a quick reminder that you need a JDK and not a JRE. You need to have JAVA_HOME and JRE_HOME variables set as well pointing to the right directory.
Have you tried the instructions on this webpage? https://www.mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/
In the System Preferences, in the Java windows, what do you have when you click on Java tab, "view" button ?
Thanks,

Books are the quietest and most constant of friends; they are the most accessible and wisest of counsellors, and the most patient of teachers.
--Charles W. Eliot (1834 - 1926), The Happy Life, 1896
Twelve Stars

Re: java version issue on mac

You can try to deinstall Java 6 (which was build in with previous Mac OS) - http://superuser.com/questions/564687/how-do-i-uninstall-java6-from-mac-os-x
from personal experience - after few iterations play with legacy Java version, I was prefer - drop disk and reinstall fresh Mac OS (El Capitan, was last on this time) from scratch + all necessary applications Smiley Happy 
Hard, long, stupid - but after all work brilliant. At the same time - drop all what really do not needed 
-----------
One Star

Re: java version issue on mac

Hi AdrienServian - yes i checked .bash_profile and added the patch as recommended at - … -mac-os-x/ but this directory points to the current mac java install which is listed below:
Matching Java Virtual Machines (2):
    1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
When I look at the java window in system preferences I tells me I have version 1.8 - but the path it references is /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java. If i put this path in my .bash_Profile it is not recognized.
I'm thinking of upgrading my OS on my mac from Yosemite (i'm now 2 OS's behind).
I'll see if this works.
Six Stars

Re: java version issue on mac

For a weird reason, Talend will struggle as well with a path containing space for Java.
Try to modify your /etc/profile/ by adding those line
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$JAVA_HOME/bin:$PATH
Could you open a terminal\and type "set"?  Then Share with us the value of "path" as well as JAVA_HOME.
I will bet that your path contains both a link to 1.6 and 1.8.

Books are the quietest and most constant of friends; they are the most accessible and wisest of counsellors, and the most patient of teachers.
--Charles W. Eliot (1834 - 1926), The Happy Life, 1896
One Star

Re: java version issue on mac

I resolved the issue by upgrading to the latest mac OSx Sierra 10.12.1 and installing the JDK 8u112
Now when I run java -version from the command line I get;
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)
I also get java Product 1.8.0_112 when i view the java runtime environment seetings from the mac system preferences