AntoniRyszard
asked on
Setting J2EE_HOME JAVA_HOME?
Hello,
I installed, the standard development kit at c:\jdk1.4\ and the j2ee at c:\j2ee1.3\
The bin directory of these are c:\jdk1.4\bin and c:\j2ee1.3\bin
I am using win98, and was trying to set the J2EE_HOME, and JAVA_HOME variable in the autoexec.bat
Could anyone advice if this autoexec looks correct?
Thank you
rem TShoot: @PATH C:\PROGRA~1\MICROS~5;%PATH %
SET SBPCI=C:\SBPCI
SET BLASTER=A220 I7 D1 H7 P330 T6
SET SNDSCAPE=C:\WINDOWS
REM [Header]
REM [CD-ROM Drive]
REM [Display]
REM [Sound, MIDI, or Video Capture Card]
REM [Mouse]
REM [Miscellaneous]
mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi )
mode con codepage select=850
keyb uk,,C:\WINDOWS\COMMAND\key board.sys
SET CLASSPATH=.; C:\jdk1.4\jre\lib\j2ee.jar ;
PATH C:\PROGRA~1\MICROS~5;%PATH %;"C:\Prog ram Files\Mts; C:\jdk1.4\bin;"
SET PATH=%PATH%;c:\jdk1.4\bin; c:\j2ee1.3 \bin;
SET J2EE_HOME=c:\j2ee1.3
I installed, the standard development kit at c:\jdk1.4\ and the j2ee at c:\j2ee1.3\
The bin directory of these are c:\jdk1.4\bin and c:\j2ee1.3\bin
I am using win98, and was trying to set the J2EE_HOME, and JAVA_HOME variable in the autoexec.bat
Could anyone advice if this autoexec looks correct?
Thank you
rem TShoot: @PATH C:\PROGRA~1\MICROS~5;%PATH
SET SBPCI=C:\SBPCI
SET BLASTER=A220 I7 D1 H7 P330 T6
SET SNDSCAPE=C:\WINDOWS
REM [Header]
REM [CD-ROM Drive]
REM [Display]
REM [Sound, MIDI, or Video Capture Card]
REM [Mouse]
REM [Miscellaneous]
mode con codepage prepare=((850) C:\WINDOWS\COMMAND\ega.cpi
mode con codepage select=850
keyb uk,,C:\WINDOWS\COMMAND\key
SET CLASSPATH=.; C:\jdk1.4\jre\lib\j2ee.jar
PATH C:\PROGRA~1\MICROS~5;%PATH
SET PATH=%PATH%;c:\jdk1.4\bin;
SET J2EE_HOME=c:\j2ee1.3
SET J2EE_HOME=c:\jjdk1.4 would be better as j2ee.jar is also in jdk1.4 path
SET JAVA_HOME=c:\jdk1.4
SET J2EE_HOME=c:\j2ee1.3
SET PATH=%PATH%;%JAVA_HOME%\bi n;%J2EE_HO ME%\bin
SET J2EE_HOME=c:\j2ee1.3
SET PATH=%PATH%;%JAVA_HOME%\bi
>PATH C:\PROGRA~1\MICROS~5;%PATH %;"C:\Prog ram Files\Mts; C:\jdk1.4\bin;"
>SET PATH=%PATH%;c:\jdk1.4\bin; c:\j2ee1.3 \bin;
>SET J2EE_HOME=c:\j2ee1.3
Path to jdk1.4\bin is already set in the first line shown so you don't need to set it again in the second line as shown.
Cleaner way of doing is as shown by CEHJ. The advantage is that as and when you change your Java version you just need to change the setting of JAVA_HOME or J2EE_HOME to point to the new location and no need to change the PATH setting.
>SET PATH=%PATH%;c:\jdk1.4\bin;
>SET J2EE_HOME=c:\j2ee1.3
Path to jdk1.4\bin is already set in the first line shown so you don't need to set it again in the second line as shown.
Cleaner way of doing is as shown by CEHJ. The advantage is that as and when you change your Java version you just need to change the setting of JAVA_HOME or J2EE_HOME to point to the new location and no need to change the PATH setting.
ASKER
I corrected the autoexec.bat and the error Out of environment space is now gone.
But when I tried to start the j2ee, these error messages where displayed. Could anyone advise a possible reason or solution to these?
Thank you
C:\j2ee1.3\bin>j2ee -verbose
Bad command or file name
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Syntax error
Syntax error
Syntax error
Out of environment space
Bad command or file name
C:\j2ee1.3\bin>
But when I tried to start the j2ee, these error messages where displayed. Could anyone advise a possible reason or solution to these?
Thank you
C:\j2ee1.3\bin>j2ee -verbose
Bad command or file name
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Out of environment space
Syntax error
Syntax error
Syntax error
Out of environment space
Bad command or file name
C:\j2ee1.3\bin>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, the Out of environment space errors have gone. And I am just l left with these.
Any thoughts?
C:\j2ee1.3\bin>j2ee -verbose
Bad command or file name
Syntax error
Syntax error
Syntax error
Exception in thread "main" java.lang.NoClassDefFoundE rror: com/sun/enterprise/se
rver/J2EEServer
C:\j2ee1.3\bin>
Any thoughts?
C:\j2ee1.3\bin>j2ee -verbose
Bad command or file name
Syntax error
Syntax error
Syntax error
Exception in thread "main" java.lang.NoClassDefFoundE
rver/J2EEServer
C:\j2ee1.3\bin>
ASKER
At the moment I have not installed a application server, suchas tomcat. Could any of the errors be related to this?
Thank you
Thank you
ASKER
One of the forums on the internet said the j2ee 1.3 could not be run under win98.
And only version 1.2 does.
Does any know if this is correct?
Thanks
And only version 1.2 does.
Does any know if this is correct?
Thanks
>>j2ee -verbose
What is that - a batch file or a program?
What is that - a batch file or a program?
ASKER
j2ee is a bat file located in the j2ee1.3\bin directory, on the web they seem to use -verbose to start this.
Can you post it? You're probably right about missing installed components btw
ASKER
Below is the j2ee.bat contents, though when I run the deplaytool or any .bat file in the j2ee1.3\bin directory they all give this error. Do you know at all wher I could download j2ee1.2?
Thank you
Bad command or file name
Syntax error
Syntax error
Syntax error
Exception in thread "main" java.lang.NoClassDefFoundE rror: com/sun/enterprise/se
rver/J2EEServer
@echo off
REM
REM Copyright 2002 Sun Microsystems, Inc. All rights reserved.
REM SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
REM
rem
rem Set JAVA_HOME and J2EE_HOME before running this script.
rem
rem set JAVA_HOME to the path where you have Java 2 (JDK1.2) installed.
rem
rem set J2EE_HOME to the path where you have installed this package (EJB server).
rem
if not "%J2EE_HOME%" == "" goto CONT0
echo ERROR: Set J2EE_HOME before running this script.
goto END
:CONT0
if EXIST "%J2EE_HOME%\bin\setenv.ba t" goto CONT1
echo ERROR: Set J2EE_HOME to the path of a valid j2sdkee.
goto END
:CONT1
call %J2EE_HOME%\bin\setenv.bat
if not "%JAVA_HOME%" == "" goto CONT2
echo ERROR: Set JAVA_HOME before running this script.
goto END
:CONT2
if EXIST "%JAVA_HOME%\bin\java.exe" goto CONT3
echo ERROR: Set JAVA_HOME to the path of a valid jdk.
goto END
:CONT3
rem @echo on
%JAVA_COMMAND% %LISTEN_OPTIONS% -Dorg.xml.sax.parser=org.x ml.sax.hel pers.XMLRe aderAdapte r -Dorg.xml.sax.driver=org.a pache.crim son.parser .XMLReader Impl -Djms.home=%JMS_HOME% -Dcom.sun.jms.service.jdbc .dbpath=%J MS_DB_PATH % -Djms.properties=%J2EE_HOM E%\config\ jms_servic e.properti es -Djava.security.policy==%J 2EE_HOME%\ lib\securi ty\server. policy -Djava.security.auth.login .config=%J 2EE_HOME%\ lib\securi ty\serverl ogin.confi g -Dcom.sun.enterprise.home= %J2EE_HOME % -classpath %CPATH% com.sun.enterprise.server. J2EEServer %*
:END
Thank you
Bad command or file name
Syntax error
Syntax error
Syntax error
Exception in thread "main" java.lang.NoClassDefFoundE
rver/J2EEServer
@echo off
REM
REM Copyright 2002 Sun Microsystems, Inc. All rights reserved.
REM SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
REM
rem
rem Set JAVA_HOME and J2EE_HOME before running this script.
rem
rem set JAVA_HOME to the path where you have Java 2 (JDK1.2) installed.
rem
rem set J2EE_HOME to the path where you have installed this package (EJB server).
rem
if not "%J2EE_HOME%" == "" goto CONT0
echo ERROR: Set J2EE_HOME before running this script.
goto END
:CONT0
if EXIST "%J2EE_HOME%\bin\setenv.ba
echo ERROR: Set J2EE_HOME to the path of a valid j2sdkee.
goto END
:CONT1
call %J2EE_HOME%\bin\setenv.bat
if not "%JAVA_HOME%" == "" goto CONT2
echo ERROR: Set JAVA_HOME before running this script.
goto END
:CONT2
if EXIST "%JAVA_HOME%\bin\java.exe"
echo ERROR: Set JAVA_HOME to the path of a valid jdk.
goto END
:CONT3
rem @echo on
%JAVA_COMMAND% %LISTEN_OPTIONS% -Dorg.xml.sax.parser=org.x
:END
:-)