wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Starting JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Starting JBoss" Watch "Starting JBoss" New topic
Author

Starting JBoss

Gaurav Gambhir
Ranch Hand

Joined: Mar 04, 2006
Posts: 254
I am new to JBoss, I am working with jboss-4.2.2.GA

I want to know how to startup JBoss

I have set
JBOSS_HOME: C:\jboss-4.2.2.GA
CLASSPATH: C:\jboss-4.2.2.GA/bin/run.jar



On the command prompt I tried
C:\jboss-4.2.2.GA\bin>run.bat


but I am not able to run the JBoss.

Please let me know how to make it run,
Thanks
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Do not set the classpath - the run.bat will set it for you. You also do not need to set JBOSS_HOME - run.bat will set that also.

You also need a 1.5 JDK and to set JAVA_HOME. Do not install the JDK into Program Files - many Java libraries tend to have issues with spaces in paths. I installed JDK 1.5 at c:\apps\java\jdk-1.5.0_16, and I set JAVA_HOME=c:\apps\java\jdk-1.5.0_16

If this does not get you running, please post the entire contents on the command prompt window.


JBoss In Action
Gaurav Gambhir
Ranch Hand

Joined: Mar 04, 2006
Posts: 254
I took out JBOSS_HOME and things I wrote in classpath

Main problem is , it does nothing when on command prompt

C:\jboss-4.2.2.GA\bin>

I write run.bat, the cursor comes on next line

C:\jboss-4.2.2.GA\bin> <blank>

It seem I am doing some simple mistake
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Edit the run.bat file, commenting out the first line:

rem @echo off

Then run it again and post the output.
Gaurav Gambhir
Ranch Hand

Joined: Mar 04, 2006
Posts: 254
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

[NOTE: The following text is not the cause of this problem, but i will leave the text here in case someone else runs into the findstr problem.]

Looks like you are running into the findstr problem.

If the wiki page I linked to does not help fix you problem, you could comment out the lines in run.bat that use findstr:


[ September 10, 2008: Message edited by: Peter Johnson ]
Yves Zoundi
Ranch Hand

Joined: Aug 31, 2008
Posts: 47
You shouldn't have that much trouble running JBOSS.
  • Make sure JAVA_HOME is set as a System environment variable, and points to a valid JDK.
  • Shouldn't be necessary, but create a System variable called JRE_HOME which will have the value %JAVA_HOME%
  • Add %JAVA_HOME%\bin to your System PATH variable
  • Open a command prompt to start JBOSS
  • [list]ensure that JAVA_HOME is correctly set, type [/list][list]Ensure that java is in the path by typing [/list][list]Try running JBOSS again, [/list]
    [ September 10, 2008: Message edited by: Yves Zoundi ]

    Author of VFSJFileChooser and XPontus XML Editor
    Peter Johnson
    author
    Bartender

    Joined: May 14, 2008
    Posts: 5823
        
        7

    Wait a minute, I looked a little more closely at your output. You have JAVA_HOME set incorrectly. It is set to an entire path, and not to just the JDK location. Fix your JAVA_HOME setting:

    set JAVA_HOME=C:\Program Files\Java\jre1.5.0_02

    It looks like you are running with a JRE and not a JDK. You should install a JDK and use that (though a JRE will work). As I mentioned earlier, you should not install the JDK into Program Files - you will run into issues later.

    Finally, you are running a very old JRE - I recommend installing the latest 1.5 JDK: 1.5.0_16
    [ September 10, 2008: Message edited by: Peter Johnson ]
    Gaurav Gambhir
    Ranch Hand

    Joined: Mar 04, 2006
    Posts: 254
    Followed all steps as conveyed getting message

    Peter Johnson
    author
    Bartender

    Joined: May 14, 2008
    Posts: 5823
        
        7

    You did not comment out the 'findstr' line correctly - you are missing the space after the 'rem' command.

    Also, since the 'findstr' problem does not appear to be the issue, you could just restore the run.bat to its original content.

    [Aside: I am surprised that the command processor is not giving you a 'not recognized as an internal or external command' error.]
    [ September 10, 2008: Message edited by: Peter Johnson ]
    Gaurav Gambhir
    Ranch Hand

    Joined: Mar 04, 2006
    Posts: 254
    Its there in run.bat

    run.bat in Edit Mode

    Peter Johnson
    author
    Bartender

    Joined: May 14, 2008
    Posts: 5823
        
        7

    You did not comment out the first 'findstr' line correctly - you are missing the space after the 'rem' command.
    Gaurav Gambhir
    Ranch Hand

    Joined: Mar 04, 2006
    Posts: 254
    Now after adding space I am getting

    Peter Johnson
    author
    Bartender

    Joined: May 14, 2008
    Posts: 5823
        
        7

    You still have JAVA_HOME set incorrectly. It appears that there is a semicolon after it - get rid of the semicolon.

    Besides the earlier warnings about using a JDK in Program Files, I will add another warning that JDK 6u3 (which you have) has issues and I recommend using a newer version (6u7). Finally, the JBoss Application Server 4.2.2 is NOT supported on JDK 6, you should really use a 1.5 JDK. (Having said that, it seems to work for the most part but if you run into problems you should fall back to JDK 1.5 to make sure it is not a JDK issue.)
    Gaurav Gambhir
    Ranch Hand

    Joined: Mar 04, 2006
    Posts: 254
    Thank alot Peter , Its mid night here, I will do that early in the morning,

    Thanks alot again
    Gaurav Gambhir
    Ranch Hand

    Joined: Mar 04, 2006
    Posts: 254
    Thanks Peter.

    It worked, I installed JDK 1.5 outside the Program files and set JAVA_HOME to JDK 1.5

    Now its running fine.

    Thanks for prompt replies.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Starting JBoss