[Installation, Configuration & DEPLOYMENT] - Re: Can't start JBoss 5 Beta3 with a JRE
by jaikiran
Maybe the run.bat/run.sh script could be changed from:
anonymous wrote :
| rem Add -server to the JVM options, if supported
| "%JAVA%" -version 2>&1 | findstr /I hotspot > nul
| if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
to
anonymous wrote : rem Add -server to the JVM options, if supported
| "%JAVA%" -server -version 2>&1 | findstr /I hotspot > nul
| if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
|
After changing this script, JBoss starts fine without problems. Here's the output of java -server -version for various possible combinations:
1) For those who have set JAVA_HOME to the JRE installation inside the JDK ( "server" is supported )
C:\>set JAVA_HOME=c:\jdk1.5.0_07\jre
|
| C:\>echo %JAVA_HOME%
| c:\jdk1.5.0_07\jre
|
| C:\>%JAVA_HOME%\bin\java -server -version
| java version "1.5.0_07"
| Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
| Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode)
2) For those who have set JAVA_HOME to a pure JRE installation ("server" not supported)
C:\>set JAVA_HOME=c:\jre1.5.0_14
|
| C:\>echo %JAVA_HOME%
| c:\jre1.5.0_14
|
| C:\>%JAVA_HOME%\bin\java -server -version
| Error: no `server' JVM at `c:\jre1.5.0_14\bin\server\jvm.dll'.
|
The run.bat/run.sh will not set the -server option when this error occurs and moves ahead with starting JBoss.
3) For those who have set JAVA_HOME to a JDK installation ("server" is supported)
C:\>set JAVA_HOME=c:\jdk1.5.0_07
|
| C:\>echo %JAVA_HOME%
| c:\jdk1.5.0_07
|
| C:\>%JAVA_HOME%\bin\java -server -version
| java version "1.5.0_07"
| Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
| Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode)
Tested this change (just a possible option) in run.bat/run.sh with Sun JDK/JRE and JBoss starts up fine. Not tested with other JDKs/JREs.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126084#4126084
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126084
18 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Re: Can't start JBoss 5 Beta3 with a JRE
by jaikiran
Hmmm... I am now able to reproduce this with both JBoss-4.2.2 and JBoss-5.0 Beta3. I have many installations of Java on my system. Most of them are the *JDK installations which also have a JRE*. This is how the folder structure of such installations look like:
C:
| |
| |--- jdk1.5.0_07
| | |
| | |--- bin
| | | |
| | | |---- <all other files>
| | |
| | |
| | |--- jre
| | | |
| | | |--- bin
| | | | |
| | | | |--- client
| | | | | |--- jvm.dll
| | | | |
| | | | |--- server
| | | | | |
| | | | | |--- jvm.dll
|
|
|
Setting JAVA_HOME to c:\jdk1.5.0_07\jre and running JBoss works fine. The %JAVA_HOME% and java -version output is:
| C:\>echo %JAVA_HOME%
| c:\jdk1.5.0_07\jre
|
| C:\>%JAVA_HOME%\bin\java -version
| java version "1.5.0_07"
| Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
| Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)
|
|
|
Then i also have installations which are *pure JRE installations* (most of the times installed through Windows Updates, but sometimes even manual installations) whose folder structure looks like:
C:
| |
| |--- jre1.5.0_14
| | |
| | |--- bin
| | | |
| | | |--- client
| | | | |
| | | | |--- jvm.dll
|
|
|
No "server" under bin here.
Setting JAVA_HOME to c:\jre1.5.0_14 and running JBoss fails with an error (both in 4.2.2 and 5.0). The %JAVA_HOME% and java -version output is:
C:\>echo %JAVA_HOME%
| c:\jre1.5.0_14
|
| C:\>%JAVA_HOME%\bin\java -version
| java version "1.5.0_14"
| Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
| Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)
|
When i start JBoss, i get the same error as you:
D:\jboss-5.0.0.Beta3\bin>run -b 0.0.0.0
| ===============================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: D:\jboss-5.0.0.Beta3
|
| JAVA: c:\jre1.5.0_14\bin\java
|
| JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
|
| CLASSPATH: D:\jboss-5.0.0.Beta3\bin\run.jar
|
| ===============================================================================
|
| Error: no `server' JVM at `c:\jre1.5.0_14\bin\server\jvm.dll'.
| Press any key to continue . . .
|
|
The run.bat/run.sh script relies on the string "hotspot" in the java -version output to pass the -server option to the java command while booting JBoss. Looks like this may not always be true.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126075#4126075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126075
18 years, 2 months