JVM 无法启动:java.io.IOException:无法运行程序“/usr/libexec/StartupItemContext;错误=2,没有这样的文件或目录
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24509103/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext; error=2, No such file or directory
提问by Almas Adilbek
In my OS X Yosemite, I'm trying to start-domainin terminal:
在我的OS X Yosemite 中,我试图在终端中启动域:
sh asadmin start-domain mythMobile
and I get error:
我得到错误:
JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext" (in directory "/Applications/glassfish4/glassfish/domains/mythMobile/config"): error=2, No such file or directory
Command start-domain failed.
This problem appeared after I've installed beta Yosemiteon my mac. BeforeI had Mavericks, everything worked correctly.
在我的 Mac 上安装了Beta Yosemite之后出现了这个问题。在我拥有 Mavericks之前,一切正常。
Have anybody faced with such problem?
有没有人遇到过这样的问题?
采纳答案by truemmer
Apple removed the file under OS X 10.10 (Yosemite). Unfortunately the path to the file is hard coded within the GlassFish startup code (GFLauncher.java) and not configurable.
Apple 在 OS X 10.10 (Yosemite) 下删除了该文件。不幸的是,该文件的路径是在 GlassFish 启动代码 (GFLauncher.java) 中硬编码的,并且不可配置。
The GlassFish team is already aware of the issue: https://java.net/jira/browse/GLASSFISH-21113
GlassFish 团队已经意识到这个问题:https: //java.net/jira/browse/GLASSFISH-21113
I hope there will be a fix for GlassFish 3 as well, since we still use it in production.
我希望也有针对 GlassFish 3 的修复程序,因为我们仍在生产中使用它。
GFLauncher Code: http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.admin/launcher/3.1.1/com/sun/enterprise/admin/launcher/GFLauncher.java?av=f
GFLauncher 代码:http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.admin/launcher/3.1.1/com/sun/enterprise/admin/launcher/GFLauncher.java?av=f
回答by davidd
To work-around that, you can start GF in verbose mode using:
要解决此问题,您可以使用以下命令以详细模式启动 GF:
asadmin start-domain --verbose domain1
回答by Franek25
Reinstalling the entire current version of glassfih4 folder solved my issue on OS X 10.11.3.
Then I simply ran in ../glassfish4/galssfish/ sudo ./bin/asadmin start-domain
and then it worked again...
重新安装整个当前版本的 glassfih4 文件夹解决了我在 OS X 10.11.3 上的问题。然后我只是跑在 ../glassfish4/galssfish/sudo ./bin/asadmin start-domain
然后它再次工作......