0

I'm running Mac OS X 10.9.1 (Mavericks). I was having a problem getting eclipse kepler to recognize Java 1.7 (u45), which I installed from the Oracle site. System Preferences clearly pointed to this version but eclipse couldn't find it.

I reinstalled Mavericks then installed the latest version of Java (051) from Oracle. Then started kepler and got the following popup:

enter image description here

After searching for a solution and not finding one, I tried a backup version of eclipse: juno. Now I get his popup:

enter image description here

Which takes me to Apple software update, which runs successfully.

Now juno starts ok but with kepler, I get:

enter image description here

And I'm back where I started.

How do I get out of this loop?

Bucky Pope
  • 135
  • 2
  • 11
  • You could check your default java version by using the following command `java -version`. If your default points to 1.6.0. You could also try to use version 7 and see if it is installed properly: `/usr/libexec/java_home -v 1.7.0_06 --exec javac -version`. You have to replace the version with the version your've installed. – XWaveX Jan 15 '14 at 22:32
  • The java -version command returns: "There was an error parsing the Info.plist for the bundle at URL Contents/Info.plist -- file://localhost/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/", then it displays some data that couldn't be formatted. At the end, it says java version "1.7.0_51". When I execute your jara_home command with 1.7.0_51 I get javac 1.7.0_51. But when I start eclipse Google App Engine plugin show the popup that it is using java 1.6.0. How do I replace the version so eclipse and GAE can find it? – Bucky Pope Jan 16 '14 at 23:36

2 Answers2

1

My first guess is that installing the Apple Java messed up the Oracle installation. Try reinstalling that one. Secondly you probably need to get Eclipse to use Oracle's JDK at startup. You can do that from the command line using the "-vm" parameter or patch the JDK's Info.plist as described in this post Eclipse Kepler for OS X Mavericks request Java SE 6.

Community
  • 1
  • 1
user2543253
  • 2,143
  • 19
  • 20
  • I've reinstalled Oracle's java. Then I change the eclipse.ini adding the -vm parameter /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin. When I do this I get the Alert about JNI_CreateJavaVM in my original post. I tried everything in the referenced post but so far nothing is working. – Bucky Pope Jan 17 '14 at 17:21
  • (Deleted my other comments because they were kind of stupid) The alert message seems to indicate that Eclipse indeed tries to start with the 1.7 JDK but there's something wrong with it. A corrupted download? A symbolic link in the Oracle file tree that points to Apple libs? A "nm | grep JNI_CreateJavaVM" with the filename given in the message would tell you if the entry point is indeed missing in the lib. – user2543253 Jan 21 '14 at 14:55
  • I ran the command and it gives me:Buckys-Mac:server bucky$ nm libjvm.dylib |grep JNI_CreateJavaVM 000000000030999f T _JNI_CreateJavaVM Buckys-Mac:server bucky$. I'm not sure how to read this put apparently the entry point is there, so what's next? – Bucky Pope Jan 21 '14 at 22:25
  • You did check that the 'bin' in the filename is not a symbolic link pointing elsewhere? ('..' would in that case also be elsewhere.) To see if the problem lies with the JDK or Eclipse, you could try another Java software that uses JNI to launch. If you don't have anything suitable, there's always the possibility of building your own launcher with GCC (I don't have a link to example C code handy, comment again if you can't find anything on the Net) – user2543253 Jan 23 '14 at 13:35
0

So I went for the nuclear option. I trashed kepler and got a fresh download. Then installed the Google jdks and plugin. Eclipse now recognized my java 1.7 install and Google plugin happily deploys my code.

I'm glad to be back up an running but disappointed that I didn't learn what went wrong in the first place.

Bucky Pope
  • 135
  • 2
  • 11