119

Have a simple Google App Engine Web Application Project on Eclipse Kepler on Mac OS X with java version "1.7.0_45"

Running into the following :

objc[5398]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

when I try to run as web application on localhost

Possibly related to the following issue :

https://code.google.com/p/googleappengine/issues/detail?id=10046

Any help would be useful.

Arunabh Das
  • 13,212
  • 21
  • 86
  • 109

2 Answers2

51

From what I've found online, this is a bug introduced in JDK 1.7.0_45. It appears to also be present in JDK 1.7.0_60. A bug report on Oracle's website states that, while there was a fix, it was removed before the JDK was released. I do not know why the fix was removed, but it confirms what we've already suspected -- the JDK is still broken.

The bug report claims that the error is benign and should not cause any run-time problems, though one of the comments disagrees with that. In my own experience, I have been able to work without any problems using JDK 1.7.0_60 despite seeing the message.

If this issue is causing serious problems, here are a few things I would suggest:

  • Revert back to JDK 1.7.0_25 until a fix is added to the JDK.

  • Keep an eye on the bug report so that you are aware of any work being done on this issue. Maybe even add your own comment so Oracle is aware of the severity of the issue.

  • Try the JDK early releases as they come out. One of them might fix your problem.

Instructions for installing the JDK on Mac OS X are available at JDK 7 Installation for Mac OS X. It also contains instructions for removing the JDK.

Michael Venable
  • 5,011
  • 3
  • 23
  • 20
  • 2
    Reverting to u25 worked for me. Thanks. – Arunabh Das Dec 27 '13 at 21:34
  • Hi, I have JDK 1.7.0_45 ; Everything was working until I updated the latest eclipse plugin version. Able to start the devserver on old project(the project that has been created before plugin update). But not able to start the dev-server on new project(The project that has been created after update). Will changing any project specific configuration will help? – Raj Jan 04 '14 at 19:44
  • 1
    @Raj Hi Raj. You might try deleting the launch configuration for the project and creating a new one. You might also try posting this as a new Stack Overflow question with the exact error message. – Michael Venable Jan 09 '14 at 20:56
  • 8
    Just downloaded [JDK 7u51](http://www.oracle.com/technetwork/java/javase/7u51-relnotes-2085002.html) for the Mac, and the problem is still there. – Dem Pilafian Jan 16 '14 at 01:46
  • 1
    reverting to u25 solved it for me too. that was nasty!! thanx a lot – pigiuz Jan 20 '14 at 17:20
  • 1
    Get the latest u60 here: http://www.oracle.com/technetwork/java/javase/downloads/ea-jsp-142245.html – slott Feb 11 '14 at 08:03
  • I am still seeing the error on u60, but it didn't stop me from launching a web project in Eclipse. So it seems like you can do development on u60 despite the error. – Michael Venable Feb 11 '14 at 15:36
  • you said it was going to be fixed on the next release of Java, how do I figure out if it has been fixed yet? – Charlie Parker Mar 04 '14 at 16:43
  • @Das How do you revert to u25? – Charlie Parker Mar 04 '14 at 16:43
  • 1
    1.7.0_60b07 still fails for me on Mac OS 10.9.2 – Aram Kocharyan Mar 05 '14 at 13:01
  • @Pinocchio I've updated the answer to include newer information found on the Internet. I've added a link to the bug report pertaining to this issue, some suggestions for working around the issue, and a link to instructions for installing/uninstalling the JDK on OS X. – Michael Venable Mar 05 '14 at 15:56
  • 51
    Verified bug still exists in JDK 1.8.0 on Mac OS 10.9.2. Running into it trying to run jacoco code coverage in Maven on Java 8. The PATH fix mentioned below does not seem to help. – Ben Hardy Mar 18 '14 at 23:40
  • 10
    Recommending to revert to an older JDK is a bit irresponsible. There were many security bugs that were fixed since that version. – Cristian Vrabie Feb 25 '15 at 21:35
  • 1
    The problem is there on jdk1.7.0_79 – Raymond Chenon Dec 11 '15 at 12:07
  • 20
    Bug still exists in JDK 1.8.0_72 on Mac OS X 10.11.3 (El Capitan). –  Feb 21 '16 at 00:50
  • 3
    Bug is also still in JDK 1.7.0_79 on Mac OS X 10.11 (El Capitan). – Craig S. Anderson Mar 30 '16 at 17:08
  • 16
    "soon to be fixed" bug still exists in JDK 1.8.0_92 on Max OSX 10.11 (El Capitan). I mean, come on. – ChrisPrime Apr 27 '16 at 20:09
  • 5
    Still exists in JDK 1.8.0_92 on macOS 10.12 (Sierra) – David Avendasora Oct 07 '16 at 17:24
  • 1
    Still facing this issue with JAVA_1.8.0_101 – RajaReddy PolamReddy Dec 27 '16 at 07:57
  • 7
    Bug still exists in java version 1.8.0_121, Java(TM) SE Runtime Environment (build 1.8.0_121-b13), – Yiling Feb 20 '17 at 10:33
  • See answer from gotoalberto below. Defining a JAVA_HOME environment variable and add it to your system path should get ride of this warning message JavaLaunchHelper. It is generally a preferred practice to have a JAVA_HOME environment variable defined. – Yiling Feb 20 '17 at 10:50
  • 2
    *apparently* will be fixed in 8u152 and Java 9: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8170041 – Geoffrey Wiseman May 03 '17 at 23:23
  • 3
    Bug still exists in java version Java(TM) SE Runtime Environment (build 1.8.0_25-b17) on macOs Sierra 10.12.5 (16F73) – Nitin Bansal Jul 08 '17 at 13:26
  • 1
    Still an issue on : java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode) – mdev Jul 17 '17 at 08:59
  • 2
    Still an issue on macOS High Sierra: `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)` – Matt Nov 22 '17 at 19:10
7
  1. Install Java 7u21 from here: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u21-oth-JPR

  2. set these variables:

    export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home"
    export PATH=$JAVA_HOME/bin:$PATH
    
  3. Run your app and fun :)

(Minor update: put variable value in quote)

Yiling
  • 2,817
  • 2
  • 21
  • 27
gotoalberto
  • 555
  • 4
  • 5
  • 4
    Works also for 1.8.0_92: # in ~/.zshrc or ~/.bashrc export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home export PATH=$JAVA_HOME/bin:$PATH – BvuRVKyUVlViVIc7 Jun 13 '16 at 14:09
  • 9
    DO NOT DO THIS. Java 7u21 (besides being released in 2013 and thus having missed out on four years of patches big and small) has a arbitrary code execution vulnerability: https://gist.github.com/frohoff/24af7913611f8406eaf3 – mseebach Jul 31 '17 at 11:13