简体   繁体   English

Java ee安装在OSX上失败

[英]java ee install failing on OSX

I am attempting to upgrade to JDK1.7 but keep getting the following error: 我正在尝试升级到JDK1.7,但不断出现以下错误:

me$ sh java_ee_sdk-7-jdk7-macosx-x64-ml.sh
Extracting the installer archive...
Extracting the installer runtime...
Extracting the installer resources...
Extracting the installer metadata...

Welcome to GlassFish installer

Using the user defined JAVA_HOME : /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
Entering setup...
SwixML 1.5 (#144)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000122d9a3f9, pid=1338, tid=50951
#
# JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build 1.7.0_45-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  0x0000000122d9a3f9
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /var/folders/g6/prk7w23x19542y4p1p95phg00000gq/T//hs_err_pid1338.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/tmp/install.010914202419/install/bin/engine-wrapper: line 139:  1338 Abort trap: 6           ${JAVA_HOME}/bin/java ${JAVA_OPTIONS} -Dinstall.engine=${theInstallEngine} -Dinstaller.resources.url=${MEDIALOC}/ -Ddefault.resources.url=file:${INSTALL_HOME}/lib/resources/ -classpath ${theCP} -Dsims.native-file-dir=${INSTALL_HOME}/lib org.openinstaller.core.EngineBootstrap ${INSTALLPROPS}

I have checked the answer to a previous question: 我已经检查了上一个问题的答案:

Java EE installer crashing on Mac OS X Mavericks Java EE安装程序在Mac OS X Mavericks上崩溃

Please note that that question has been closed, so I cannot comment in order to get more info, so I am having to post a duplicate. 请注意,该问题已经结束,因此我无法发表评论以获取更多信息,因此我必须张贴重复的文章。

However, the solution suggested by @Alexander Zeitler does not work and the post he references is not available anymore. 但是,@ Alexander Zeitler建议的解决方案无效,并且他引用的帖子也不再可用。 If I attempt his solution, I get the following: 如果尝试他的解决方案,则会得到以下信息:

me$ sh java_ee_sdk-7-jdk7-macosx-x64-ml.sh -a answer_file -l /Users/me/tmp -s The silent installation file provided is not accessible. me $ sh java_ee_sdk-7-jdk7-macosx-x64-ml.sh -a answer_file -l / Users / me / tmp -s无法访问提供的静默安装文件。 Please rerun this program with an appropriate statefile. 请使用适当的状态文件重新运行该程序。

I looked inside the sh file to figure out the proper argument format. 我在sh文件中查找了正确的参数格式。 I suppose Oracle has updated the sh file since the previous questions and answers. 我想自从先前的问题和答案以来,Oracle已经更新了sh文件。 In any case, I try 无论如何,我尝试

$me sh java_ee_sdk-7-jdk7-macosx-x64-ml.sh ~/tmp/answer

and I get the same error as above. 我得到与上述相同的错误。

Trying to execute via sudo results in the same error. 尝试通过sudo执行会导致相同的错误。

Does anyone have any ideas on what is happening? 有人对发生的事情有任何想法吗?

I know this is an old question, but I just ran into the same problem and thought my solution may help others in the future. 我知道这是一个老问题,但我遇到了同样的问题,并认为我的解决方案将来可能会帮助其他人。

I found the answer here: https://apple.stackexchange.com/a/115708/89930 我在这里找到了答案: https : //apple.stackexchange.com/a/115708/89930

To summarise, you need to set a couple of variables and then run the installer in silent mode. 总而言之,您需要设置几个变量,然后以静默方式运行安装程序。

Start by creating a new text file called 'silent_install_answer_file' and add the following contents, updating values as necessary: 首先创建一个名为“ silent_install_answer_file”的新文本文件,然后添加以下内容,并根据需要更新值:

ClusteredInstance.Configuration.CLUSTER_NAME=c1
ClusteredInstance.Configuration.CREATE_CLUSTER=false
ClusteredInstance.Configuration.DOMAIN_NAME=domain1
ClusteredInstance.Configuration.INSTANCE_NAME=instance1
ClusteredInstance.Configuration.SERVER_ADMIN_PORT=4848
ClusteredInstance.Configuration.SERVER_HOST_NAME=localhost
ConfigType.Option.CREATE_CLUSTEREDINSTANCE=CREATE_CLUSTEREDINSTANCE
ConfigType.Option.CREATE_DOMAIN=CREATE_DOMAIN
ConfigType.Option.CREATE_STANDALONEINSTANCE=CREATE_STANDALONEINSTANCE
ConfigType.Option.NO_CONFIGURATION=NO_CONFIGURATION
Domain.Configuration.ADMIN_PASSWORD=password
Domain.Configuration.ADMIN_PASSWORD_REENTER=password
Domain.Configuration.ADMIN_PORT=4848
Domain.Configuration.ADMIN_USER=admin
Domain.Configuration.CREATE_SERVICE=false
Domain.Configuration.DOMAIN_NAME=domain1
Domain.Configuration.HTTP_PORT=8080
Domain.Configuration.SERVICE_NAME=domain1Service
Domain.Configuration.START_SERVER=false
InstallHome.directory.INSTALL_HOME=/usr/local/glassfish4
InstallType.Option.CONFIG_ONLY=CONFIG_ONLY
InstallType.Option.INSTALL_AND_CONFIG=INSTALL_AND_CONFIG
InstallType.Option.INSTALL_ONLY=INSTALL_ONLY
InstallUserType.Option.ADVANCED_USER=ADVANCED_USER
InstallUserType.Option.BASIC_USER=BASIC_USER
JDKSelection.directory.HIDDEN_JDK=
JDKSelection.directory.JDK_FROM_LIST_CHOICE=false
JDKSelection.directory.JDK_LIST=
JDKSelection.directory.JDK_TYPE_IN=
JDKSelection.directory.JDK_TYPED_IN_CHOICE=false
RegistrationOptions.regoptions.CREATE_NEWACCT=CREATE_NEWACCT
RegistrationOptions.regoptions.DUMMY_PROP=
RegistrationOptions.regoptions.SKIP_REGISTRATION=SKIP_REGISTRATION
RegistrationOptions.regoptions.USE_EXISTINGACCT=USE_EXISTINGACCT
RegistrationOptions.regoptions.USERNAME=
RegistrationOptions.regoptions.USERPASSWORD=
SOAccountCreation.accountinfo.COMPANYNAME=
SOAccountCreation.accountinfo.COUNTRY_DROP_DOWN=
SOAccountCreation.accountinfo.COUNTRY=
SOAccountCreation.accountinfo.EMAIL=
SOAccountCreation.accountinfo.FIRSTNAME=
SOAccountCreation.accountinfo.LASTNAME=
SOAccountCreation.accountinfo.PASSWORD=
SOAccountCreation.accountinfo.REENTERPASSWORD=
StandaloneInstance.Configuration.INSTANCE_NAME=instance1
StandaloneInstance.Configuration.SERVER_ADMIN_PORT=4848
StandaloneInstance.Configuration.SERVER_HOST_NAME=localhost
UpdateTool.Configuration.ALLOW_UPDATE_CHECK=true
UpdateTool.Configuration.BOOTSTRAP_UPDATETOOL=true
UpdateTool.Configuration.PROXY_HOST=
UpdateTool.Configuration.PROXY_PORT=

Check that the JAVA_HOME environment variable is set appropriately: 检查是否正确设置了JAVA_HOME环境变量:

export JAVA_HOME="$(/usr/libexec/java_home)"

Create the /Users/username/temp directory if it does not already exist ( mkdir /Users/username/temp ). 如果/Users/username/temp目录尚不存在,则创建它( mkdir /Users/username/temp )。

Lastly, run the installer with sudo. 最后,使用sudo运行安装程序。 You may also need to set the DISPLAY variable at the same time: 您可能还需要同时设置DISPLAY变量:

$ sudo DISPLAY=:0 ./java_ee_sdk-7-jdk7-macosx-x64.sh -a silent_install_answer_file -l /Users/username/temp -s

The installer may take a few minutes to complete and, as it is running in silent mode, you may not see much output during that time, so be patient. 安装程序可能需要几分钟才能完成,并且由于它正在以静默方式运行,因此在此期间您可能看不到太多输出,因此请耐心等待。

If you have trouble running the installer in silent mode, the GlassFish installer documentation may be of some use to you: https://glassfish.java.net/docs/4.0/installation-guide.pdf 如果您在以静默方式运行安装程序时遇到麻烦,可以使用GlassFish安装程序文档: https : //glassfish.java.net/docs/4.0/installation-guide.pdf

A seemingly related question: Java EE installer crashing on Mac OS X Mavericks 一个看似相关的问题: Java EE安装程序在Mac OS X Mavericks上崩溃

Hope that helps someone! 希望能对某人有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM