4 Replies Latest reply: Nov 4, 2007 4:31 AM by Darren Leong RSS

A Beginner Problem: JAVA_HOME not set?

Darren Leong Newbie

i'm a beginner of JBoss Portal,

i downloaded JBoss Portal + JBoss AS 4.2.1 at http://labs.jboss.com/jbossportal/download/index.html,

i extracted the file jboss-portal-2.6.2.GA-bundled.zip to my C: Drive, but when i execute the run.bat file, there is a message appear:

JAVA_HOME is not set. Unexpected result may occur.
Set JAVA_HOME to the directory of your local JDK to avoid this message.
=================================================

JBoss Bootstrap Enviroment

JBOSS_HOME: C:\jboss-portal-2.6.2

JAVA: Java

JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

CLASSPATH: C:\jboss-portal-2.6.2\bin\run.jar

=================================================

Error: no 'server' JVM at C:\ProgramFiles\Java\jre1.6.0_02\bin\server\jvm.dll


i don't know how to do, can anyone help me?

  • 1. Re: A Beginner Problem: JAVA_HOME not set?
    jaikiran pai Master

    Do you have Java installed on your system. If not, you can download it from the Sun website. JBoss 4.2.x requires Java 5 version. You can download it from http://java.sun.com/javase/downloads/index_jdk5.jsp. Once you have downloaded it, you can set JAVA_HOME to point to the folder where you installed Java (i would recommend you install it in a folder which does not have a space in its path). You can set the JAVA_HOME in the run.bat itself. Here's an example, i have Java 5 installed at C:\jdk1.5.0_07, so my JAVA_HOME will be set in the run.bat as follows:

    JAVA_HOME=C:\jdk1.5.0_07


    Once you have set this, you can then start JBoss as usual, using the run.bat

  • 2. Re: A Beginner Problem: JAVA_HOME not set?
    Darren Leong Newbie

     

    "jaikiran" wrote:
    Do you have Java installed on your system. If not, you can download it from the Sun website. JBoss 4.2.x requires Java 5 version. You can download it from http://java.sun.com/javase/downloads/index_jdk5.jsp. Once you have downloaded it, you can set JAVA_HOME to point to the folder where you installed Java (i would recommend you install it in a folder which does not have a space in its path). You can set the JAVA_HOME in the run.bat itself. Here's an example, i have Java 5 installed at C:\jdk1.5.0_07, so my JAVA_HOME will be set in the run.bat as follows:

    JAVA_HOME=C:\jdk1.5.0_07


    Once you have set this, you can then start JBoss as usual, using the run.bat

    Hi, thanks for your reply.

    I installed JDK in my system, but i don't know how to do with the JAVA_HOME setting. Do i need to edit the run.bat file? If i need to do that, which part should i edit?

  • 3. Re: A Beginner Problem: JAVA_HOME not set?
    jaikiran pai Master

    You can edit the run.bat and set the JAVA_HOME as follows (see the line marked in bold):

    @echo off
    rem -------------------------------------------------------------------------
    rem JBoss Bootstrap Script for Win32
    rem -------------------------------------------------------------------------
    
    rem $Id: run.bat 63249 2007-05-30 13:20:25Z dimitris@jboss.org $
    
    @if not "%ECHO%" == "" echo %ECHO%
    @if "%OS%" == "Windows_NT" setlocal
    
    set JAVA_HOME=C:\jdk1.5.0_07
    
    set DIRNAME=.\
    if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
    set PROGNAME=run.bat
    if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
    


  • 4. Re: A Beginner Problem: JAVA_HOME not set?
    Darren Leong Newbie

    Hi, thanks for the tips, it's very helpful, I can run my portal now :)