Solved

Setting J2EE_HOME JAVA_HOME?

Posted on 2004-09-16
13
3,596 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:AntoniRyszard
13 Comments
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 12077875
SET J2EE_HOME=c:\jjdk1.4 would be better as j2ee.jar is also in jdk1.4 path
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12078459
SET JAVA_HOME=c:\jdk1.4
SET J2EE_HOME=c:\j2ee1.3

SET PATH=%PATH%;%JAVA_HOME%\bin;%J2EE_HOME%\bin
0
 

Expert Comment

by:Emilda
ID: 12080797
>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
 

Author Comment

by:AntoniRyszard
ID: 12084171
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
 
LVL 86

Accepted Solution

by:
CEHJ earned 25 total points
ID: 12084229
0
 

Author Comment

by:AntoniRyszard
ID: 12084843
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:AntoniRyszard
ID: 12084868
At the moment I have not installed a application server, suchas tomcat. Could any of the errors be related to this?

Thank you
0
 

Author Comment

by:AntoniRyszard
ID: 12085146
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 12085357
>>j2ee -verbose

What is that - a batch file or a program?
0
 

Author Comment

by:AntoniRyszard
ID: 12085420
j2ee is a bat file located in the j2ee1.3\bin directory, on the web they seem to use -verbose to start this.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12085601
Can you post it? You're probably right about missing installed components btw
0
 

Author Comment

by:AntoniRyszard
ID: 12085687
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 12193192
:-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now