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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to