JBoss needs a JDK to run. The startups script is infact a jar.
Thanks for the confirmation - this just came up after I read the Book JBOSS Developer Note Book where the author mentions
" As of version 4.0.2, Tomcat ships with its own complier, so JBoss only requires a JRE Install."
Does that mean JBoss shall use inbuilt Tomcat and it's jDK?
I guess someone will arrest me if I'm spreading wrong information here.. :P
I don't really know if you need a JDK on second look. I guess you just need a java VM.. so a JRE should be sufficient.
after some googling I found this product sheet.. It clearly states that one of the minimum requirements is a JDK
You do not need a JDK, only a JRE. It tried it, its works. My setup was Windows XP, JRE 1.4.2_11 and JBoss 4.0.4GA. I set JAVA_HOME to my JRE, cleaned out the temp and work directories under server/default, launched the server, and accessed my JSPs just fine.
Took me all of 2 minutes to verify that this was possible.
This does work when using JBoss 4.0.4, how about the previous version of 4.0.2 where the tmp and work directories don't exist?
Actually I am mistaken, JAVA_HOME was pointing to the JDK directroy when it worked. When I change JAVA_HOME to point to the JRE directory, it doesn't work.
The run.bat file thats starts up JBoss requires the tools.jar file which is currently found in the JDK directory...
Can you please send me the batch file that your using... or the directory you have set JAVA_HOME to point to.
Um, the tmp and work directories exist in 4.0.2 (and 4.0.3 and 3.2.6 and 3.2.7 and ...).
Here is how I set JAVA_HOME:
set JAVA_HOME=C:\Program Files\Java\j2re1.4.2_11
This is the default location where the JRE is installed.
The batch file is used is the run.bat that came with JBoss, no modifications. Here is the console output (abbreviated) for JBoss 4.0.2:
[d:\apps\jboss-4.0.2\bin] >run -c servlets Could not locate C:\Program Files\Java\j2re1.4.2_11\lib\tools.jar. Unexpected re sults may occur. Make sure that JAVA_HOME points to a JDK and not a JRE. =============================================================================== . JBoss Bootstrap Environment . JBOSS_HOME: d:\apps\jboss-4.0.2\bin\\.. . JAVA: C:\Program Files\Java\j2re1.4.2_11\bin\java . JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m . CLASSPATH: C:\Program Files\Java\j2re1.4.2_11\lib\tools.jar;d:\apps\jboss-4.0. 2\bin\\run.jar . =============================================================================== . 07:54:30,700 INFO [Server] Starting JBoss (MX MicroKernel)... 07:54:30,700 INFO [Server] Release ID: JBoss [Zion] 4.0.2 (build: CVSTag=JBoss_ 4_0_2 date=200505022023) 07:54:30,700 INFO [Server] Home Dir: D:\apps\jboss-4.0.2 07:54:30,700 INFO [Server] Home URL: file:/D:/apps/jboss-4.0.2/ 07:54:30,700 INFO [Server] Library URL: file:/D:/apps/jboss-4.0.2/lib/ 07:54:30,700 INFO [Server] Patch URL: null 07:54:30,700 INFO [Server] Server Name: servlets 07:54:30,700 INFO [Server] Server Home Dir: D:\apps\jboss-4.0.2\server\servlets 07:54:30,700 INFO [Server] Server Home URL: file:/D:/apps/jboss-4.0.2/server/se rvlets/ 07:54:30,700 INFO [Server] Server Data Dir: D:\apps\jboss-4.0.2\server\servlets \data 07:54:30,700 INFO [Server] Server Temp Dir: D:\apps\jboss-4.0.2\server\servlets \tmp 07:54:30,700 INFO [Server] Server Config URL: file:/D:/apps/jboss-4.0.2/server/ servlets/conf/ 07:54:30,700 INFO [Server] Server Library URL: file:/D:/apps/jboss-4.0.2/server /servlets/lib/ 07:54:30,700 INFO [Server] Root Deployment Filename: jboss-service.xml 07:54:30,700 INFO [Server] Starting General Purpose Architecture (GPA)... 07:54:31,059 INFO [ServerInfo] Java version: 1.4.2_11,Sun Microsystems Inc. 07:54:31,059 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_11-b06 ,Sun Microsystems Inc. 07:54:31,059 INFO [ServerInfo] OS-System: Windows XP 5.1,x86 07:54:31,434 INFO [Server] Core system initialized *** deleted lots of lines *** 07:54:46,715 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-808 0 07:54:46,793 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009 07:54:46,809 INFO [JkMain] Jk running ID=0 time=0/47 config=null 07:54:46,825 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4 _0_2 date=200505022023)] Started in 16s:125ms
Opened a browser and accessed my application just fine. I did start with a fresh installation of JBoss with no tmp or work directories for the 'servlets' configuration, so the JSPs had to be compiled.
Jboss4.4 & Tomcat5.5 compiles jsp using Eclipse JDT compiler as the default. So you don't need Sun jdk unless you choose to use javac to compile your jsp by uncommenting: