![](/img/trans.png)
[英]java.io.IOException: Cannot run program “/usr/bin/sh”: java.io.IOException: error=2, No such file or directory
[英]JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext; error=2, No such file or directory
在我的OS X Yosemite中 ,我正在嘗試在終端中啟動域 :
sh asadmin start-domain mythMobile
我收到錯誤:
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.
我在我的Mac上安裝了Beta Yosemite后出現了這個問題。 在我有小牛隊之前 ,一切都正常。
有人遇到過這樣的問題嗎?
要解決這個問題,您可以使用以下方式在詳細模式下啟動GF:
asadmin start-domain --verbose domain1
Apple在OS X 10.10(Yosemite)下刪除了該文件。 不幸的是,文件的路徑是在GlassFish啟動代碼(GFLauncher.java)中硬編碼的,不可配置。
GlassFish團隊已經意識到這個問題: https : //java.net/jira/browse/GLASSFISH-21113
我希望GlassFish 3也能得到修復,因為我們仍然在生產中使用它。
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
重新安裝整個當前版本的glassfih4文件夾解決了我在OS X 10.11.3上的問題。 然后我簡單地跑進了../glassfish4/galssfish/ sudo ./bin/asadmin start-domain
然后再次工作......
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.