类JavaLaunchHelper是在这两个类中实现的。两者中的一个将被使用。哪一个是未定义的[复制]

时间:2022-07-28 17:20:42

This question already has an answer here:

这个问题已经有了答案:

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

在Mac OS X上的Eclipse Kepler上有一个简单的谷歌应用程序引擎Web应用程序项目,java版本为“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

当我尝试在localhost上作为web应用程序运行时

Possibly related to the following issue :

可能与以下问题有关:

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

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

Any help would be useful.

任何帮助都是有用的。

2 个解决方案

#1


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.

根据我在网上发现的,这是JDK 1.7.0_45中引入的一个bug。它似乎也存在于JDK 1.7.0_60中。甲骨文网站上的一份bug报告称,尽管存在问题,但在JDK发布之前就被删除了。我不知道为什么要删除这个修复,但是它证实了我们已经怀疑的事情——JDK仍然是坏的。

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.

错误报告声称错误是良性的,不应该导致任何运行时问题,尽管其中一个评论不同意这一点。在我自己的经验中,尽管我看到了消息,但是使用JDK 1.7.0_60我仍然可以毫无问题地工作。

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.

    恢复到JDK 1.7.0_25,直到将修复添加到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.

    密切关注bug报告,这样您就会知道在这个问题上正在做什么工作。甚至可以添加你自己的评论,这样Oracle就会意识到问题的严重性。

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

    在JDK的早期版本发布时尝试一下。其中一个可能会解决你的问题。

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.

在Mac OS X上安装JDK 7的说明可以在Mac OS X上安装,它还包含删除JDK的说明。

#2


8  

  1. Install Java 7u21 from here: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u21-oth-JPR

    从这里安装Java 7u21: http://www.oracle.com/technetwork/java/javase/downloads/java- archise -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)

(小更新:将变量值填入引号)

#1


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.

根据我在网上发现的,这是JDK 1.7.0_45中引入的一个bug。它似乎也存在于JDK 1.7.0_60中。甲骨文网站上的一份bug报告称,尽管存在问题,但在JDK发布之前就被删除了。我不知道为什么要删除这个修复,但是它证实了我们已经怀疑的事情——JDK仍然是坏的。

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.

错误报告声称错误是良性的,不应该导致任何运行时问题,尽管其中一个评论不同意这一点。在我自己的经验中,尽管我看到了消息,但是使用JDK 1.7.0_60我仍然可以毫无问题地工作。

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.

    恢复到JDK 1.7.0_25,直到将修复添加到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.

    密切关注bug报告,这样您就会知道在这个问题上正在做什么工作。甚至可以添加你自己的评论,这样Oracle就会意识到问题的严重性。

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

    在JDK的早期版本发布时尝试一下。其中一个可能会解决你的问题。

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.

在Mac OS X上安装JDK 7的说明可以在Mac OS X上安装,它还包含删除JDK的说明。

#2


8  

  1. Install Java 7u21 from here: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u21-oth-JPR

    从这里安装Java 7u21: http://www.oracle.com/technetwork/java/javase/downloads/java- archise -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)

(小更新:将变量值填入引号)