简体   繁体   English

Glassfish服务器开源添加无法安装

[英]Glassfish server open source addition failed to install

i got the following error when i tried to install GlassFish Server glassfish-3.1.2.2-windows().exe 当我尝试安装GlassFish Server glassfish-3.1.2.2-windows()。exe时出现以下错误

Executing command :C:\\glassfish3\\glassfish\\bin\\asadmin.bat --user admin --passwordfile - create-domain --savelogin --checkports=false --adminport 4646 --instanceport 7070 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1 C:\\glassfish3\\glassfish\\bin\\asadmin.bat --user admin --passwordfile - create-domain --savelogin --checkports=false --adminport 4646 --instanceport 7070 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 do main1 The system cannot find the path specified. 执行命令:C:\\ glassfish3 \\ glassfish \\ bin \\ asadmin.bat --user admin --passwordfile - create-domain --savelogin --checkports = false --adminport 4646 --instanceport 7070 --domainproperties = jms.port = 7676:domain.jmxPort = 8686:orb.listener.port = 3700:http.ssl.port = 8181:orb.ssl.port = 3820:orb.mutualauth.port = 3920 domain1 C:\\ glassfish3 \\ glassfish \\ bin \\ asadmin .bat --user admin --passwordfile - create-domain --savelogin --checkports = false --adminport 4646 --instanceport 7070 --domainproperties = jms.port = 7676:domain.jmxPort = 8686:orb.listener.port = 3700:http.ssl.port = 8181:orb.ssl.port = 3820:orb.mutualauth.port = 3920 do main1系统找不到指定的路径。

print screen of error is following 错误的打印屏幕如下
在此输入图像描述

I just ran into this same problem and it appears to be created by the batch files asadmin.bat and asenv.bat. 我刚遇到同样的问题,似乎是由批处理文件asadmin.bat和asenv.bat创建的。 The batch files read as follows (I've removed the REM statements and lines that didn't pertain to the problem: 批处理文件如下所示(我删除了REM语句和与问题无关的行:

asadmin.bat in c:\\glassfish3\\glassfish\\bin c:\\ glassfish3 \\ glassfish \\ bin中的asadmin.bat

REM Always use JDK 1.6 or higher
REM Depends on Java from ..\config\asenv.bat

call "%~dp0..\config\asenv.bat" 
if "%AS_JAVA%x" == "x" goto UsePath
set JAVA="%AS_JAVA%\bin\java"
goto run
:UsePath
set JAVA=java
:run
%JAVA% -jar "%~dp0..\modules\admin-cli.jar" %*

asenv.bat in c:\\glassfish3\\glassfish\\conf c:\\ glassfish3 \\ glassfish \\ conf中的asenv.bat

set AS_JAVA=C:\Program Files (x86)\Java

I could not figure out how to get Glassfish to just use the environment variable during install. 我无法弄清楚如何让Glassfish在安装过程中只使用环境变量。 I attempted to use the -j "(javapath)" argument, but this didn't solve the problem for me. 我试图使用-j“(javapath)”参数,但这并没有解决我的问题。

What worked, and I'm not proud of this solution, is to give Glassfish what it's looking for. 什么起作用,我并不为这个解决方案感到自豪,就是为Glassfish提供它正在寻找的东西。 If you put together the path its constructing above, you get C:\\Program Files (x86)\\Java\\bin\\java.exe. 如果将上面构建的路径放在一起,就会得到C:\\ Program Files(x86)\\ Java \\ bin \\ java.exe。 Since Java installs to C:\\Program Files (x86)\\Java\\jre7\\bin\\java.exe, I simply copied the contents of C:\\Program Files (x86)\\Java\\jre7\\ to C:\\Program Files (x86)\\Java\\ and Glassfish installed correctly. 由于Java安装到C:\\ Program Files(x86)\\ Java \\ jre7 \\ bin \\ java.exe,我只是将C:\\ Program Files(x86)\\ Java \\ jre7 \\的内容复制到C:\\ Program Files(x86) )\\ Java \\和Glassfish安装正确。

If someone else has a better solution to this problem, PLEASE post it! 如果其他人有更好的解决方案来解决这个问题,请发布它!

Full Disclosure: Installing Glassfish 3.1.2.2 on Windows Server 2008, running on a VM. 完全披露:在Windows Server 2008上安装Glassfish 3.1.2.2,在VM上运行。


Update: A co-worker of mine came up with a different solution that doesn't involve copying the contents of C:\\Program Files(x86)\\java\\jre7. 更新:我的同事提出了一个不同的解决方案,不涉及复制C:\\ Program Files(x86)\\ java \\ jre7的内容。

During the Glassfish install, at the point where it's requesting a password for the admin account, edit the asenv.bat file and add the "jre7\\" to the line I quoted above. 在Glassfish安装期间,在它为管理员帐户请求密码时,编辑asenv.bat文件并将“jre7”添加到我上面引用的行。 This forces Glassfish to look in the proper folder. 这会强制Glassfish查看正确的文件夹。

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

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