How To Run J2EE1.3 On Windows 98 (Win98)
843833Sep 1 2001 — edited Dec 10 2005I just successfully installed and started up the Sun J2EE1.3 beta 2 on Windows 98 SE and successfully deployed the Java Pet Store 1.1.2 to it. It is running and it is definitely possible to deploy. There have been too many questions in this forum and it took a few hours to get it going as the script files have errors in them for Windows98 (not my first choice of development platform).
This is a completely Vanilla deployment into fairly standard default directories.
Here are the steps I used:
JDK1.3.1 is installed into c:\jdk131
Java petstore is installed into c:\jps1.1.2
J2EE1.3 is installed into c:\j2ee13
You need to set the JAVA_HOME and J2EE_HOME environment variables now in your autoexec.bat file.
See below:
SET PATH=%PATH%;C:\jdk131\bin;
SET JAVA_HOME=C:\jdk131
SET J2EE_HOME=C:\j2ee13
Restart your machine.
Now change directories to:
C:\j2ee13\bin
==========================================
Here you need to change the setenv.bat file.
Below are the original lines in the file. I have commented them out with REM and replaced them with the lines below that. This is to work around the two = sign problem on a SET line.
REM set JAAS_OPTIONS=-Djava.security.auth.policy=%J2EE_HOME%\lib\security\jaas.policy
REM set SSL_OPTIONS=-Djavax.net.ssl.trustStore=%J2EE_HOME%\lib\security\cacerts.jks
REM set LISTEN_OPTIONS=-Dcom.sun.CORBA.connection.ORBListenSocket=SSL:0,SSL_MUTUALAUTH:0,PERSISTENT_SSL:1060
REM set JAVACMD=%JAVA_HOME%\bin\java -Xmx128m %SSL_OPTIONS% %JAAS_OPTIONS%
set JAVACMD=%JAVA_HOME%\bin\java -Xmx128m
set JAAS_A=java.security.auth.policy
set JAAS_B=%J2EE_HOME%\lib\security\jaas.policy
set SSL_A=javax.net.ssl.trustStore
set SSL_B=%J2EE_HOME%\lib\security\cacerts.jks
==========================================
After making these changes open up the j2ee.bat file in the same directory.
Again, lines at the end of the file need to be changed.
I have commented out the original line and replaced it with a new line below.
rem %JAVACMD% %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\login.config -Dcom.sun.enterprise.home=%J2EE_HOME% -classpath %CPATH% com.sun.enterprise.server.J2EEServer %*
@echo on
%JAVACMD% -D%SSL_A%=%SSL_B% -D%JAAS_A%=%JAAS_B% -D%LISTEN_A%=%LISTEN_B% -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\login.config -Dcom.sun.enterprise.home=%J2EE_HOME% -classpath %CPATH% com.sun.enterprise.server.J2EEServer %
In addition, look for lines in the sun .bat files that have a % * at the end. THIS COMPLETELY MESSES UP THE BAT. THEY NEED TO BE DELETED!
Once these changes are made you need to open up three DOS windows to run cloudscape, J2EE, and the deploytool. MAKE SURE YOU BUMP YOUR ENVIRONMENT UNDER THE PROPERTIES MENU to 2048 or HIGHER for each window.
Once all this is done, type in the first DOS window
cloudscape -start in the j2ee13\bin directory. You need to CTRL-C to kill when it is
no longer needed.
When this is finished in the second window type J2EE -verbose in j2ee13\bin directory.
It will give a message indicating successful start.
Try http://localhost:8000 to get the default web page.
If it doesn't start, check your variable and settings.
In DOS, type SET to see your variables and PATH to see your path. Mine works so unless your windows is messed up or the install of the files is bad it should run.
After this in the 3rd window, change to the j2ee13\bin directory again and type:
deploytool.
This brings up the deploytool and you will be able to deploy the pet store. Yes the deploy tool works too!
Follow the petstore installation docs to run.
http://localhost:8000/estore/index.html
Good luck and I hope this helps others.