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\keyboard.sys



SET CLASSPATH=.; C:\jdk1.4\jre\lib\j2ee.jar;

PATH C:\PROGRA~1\MICROS~5;%PATH%;"C:\Program Files\Mts; C:\jdk1.4\bin;"

SET PATH=%PATH%;c:\jdk1.4\bin;c:\j2ee1.3\bin;
SET J2EE_HOME=c:\j2ee1.3
AntoniRyszardAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
sudhakar_koundinyaCommented:
SET J2EE_HOME=c:\jjdk1.4 would be better as j2ee.jar is also in jdk1.4 path
0
 
CEHJCommented:
SET JAVA_HOME=c:\jdk1.4
SET J2EE_HOME=c:\j2ee1.3

SET PATH=%PATH%;%JAVA_HOME%\bin;%J2EE_HOME%\bin
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
EmildaCommented:
>PATH C:\PROGRA~1\MICROS~5;%PATH%;"C:\Program 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.
0
 
AntoniRyszardAuthor Commented:
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>
0
 
AntoniRyszardAuthor Commented:
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.NoClassDefFoundError: com/sun/enterprise/se
rver/J2EEServer
C:\j2ee1.3\bin>
0
 
AntoniRyszardAuthor Commented:
At the moment I have not installed a application server, suchas tomcat. Could any of the errors be related to this?

Thank you
0
 
AntoniRyszardAuthor Commented:
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
0
 
CEHJCommented:
>>j2ee -verbose

What is that - a batch file or a program?
0
 
AntoniRyszardAuthor Commented:
j2ee is a bat file located in the j2ee1.3\bin directory, on the web they seem to use -verbose to start this.
0
 
CEHJCommented:
Can you post it? You're probably right about missing installed components btw
0
 
AntoniRyszardAuthor Commented:
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.NoClassDefFoundError: 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.bat" 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.xml.sax.helpers.XMLReaderAdapter -Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl -Djms.home=%JMS_HOME% -Dcom.sun.jms.service.jdbc.dbpath=%JMS_DB_PATH% -Djms.properties=%J2EE_HOME%\config\jms_service.properties -Djava.security.policy==%J2EE_HOME%\lib\security\server.policy -Djava.security.auth.login.config=%J2EE_HOME%\lib\security\serverlogin.config -Dcom.sun.enterprise.home=%J2EE_HOME% -classpath %CPATH% com.sun.enterprise.server.J2EEServer %*

:END
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.