• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help installing J2EE on WinXP Pro

 
Joe Kaz
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
I just replaced my NT box with a new Win XP Pro machine and am trying to get my Java environment into shape under XP.
First, I successfully installed J2SE 1.4 by the two simple steps of running its install and then adding .; and c:\j2sdk1.4.0_02\bin; to XP's Path variable. (XP does not have a CLASSPATH variable and it was apparently not needed.) TextPad picked everything up fine.
However when I follow the same procedure for installing J2EE, meaning simply running the J2EE install and then putting c:\j2sdkee1.3.1\lib\j2ee.jar; into the Path, the J2EE classes are not being found.
Can anyone tell me what I am missing here regarding XP? (I tried adding a CLASSPATH variable with c:\j2sdkee1.3.1\lib\j2ee.jar;, and also rebooting, but that didn't help.)
I am aware that Sun's site says J2EE is only available for NT and Win 2000 Pro but hope fervently this just means supported.
Thanks very much in advance for this help.
Joe Kaz
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe,
You don't actually need to put the j2ee.jar file into your PCs PATH variable, just the %J2EE_HOME%\bin directory. Make sure you have defined %JAVA_HOME% and %J2EE_HOME%, and then run "j2ee -verbose" from the command line.
Failing this, take a look at the instructions in this month's newsletter for an alternative way to start up the server.
Hope that helps!
Simon
 
Joe Kaz
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clarification: I don't need the RI server - I just need the J2EE servlet classes to compile my servlets which I will run later under Tomcat.
So my immediate problem is a compile problem - classes just not being found.
Also I do have %JAVA_HOME% and %J2EE_HOME% in Path, with JAVA_HOME and J2EE_HOME as User Variables set appropriately, and it hasn't helped.
Thanks
Joe Kaz
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, you just need %J2EE_HOME%\lib\j2ee.jar in your CLASSPATH. Alternatively, grab yourself a copy of Tomcat and put %TOMCAT_HOME%\common\lib\servlet.jar in your CLASSPATH.
HTH
Simon
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to compile you need to put the servlet.jar of the j2ee_ref in the classpath. There should be one. I think j2ee.jar is for ejb stuff, jndi and the like. Or you can copy the servlet.jar from the server you want to run your servlet. Or why not download tomcat and install it on your xp?
 
Joe Kaz
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still no luck Simon, but I do thank you for your help here. I have now got my XP Pro variables loaded up as follows. Everything here was added after simply having just c:\j2sdk1.4.0_02\bin; in my Path worked fine to get good JDK compilations.
User Variables:
(new) %JAVA_HOME% is .; c:\j2sdk1.4.0_02\bin;
(new) %J2EE_HOME% is c:\j2sdkee1.3.1;
System Variables:
(new) CLASSPATH is .; c:\j2sdkee1.3.1\lib\j2ee.jar;%J2EE_HOME%\lib\j2ee.jar;
(pre-existing) Path is now .; %JAVA_HOME%;%J2EE_HOME%;c:\j2sdk1.4.0_02\bin;c:\j2sdkee1.3.1\lib\j2ee.jar;
Thanks
Still stumped
Joe Kaz
 
HanMing Low
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Simon is right in his later mail that you don't actually need J2EE-RI.
What you need is to install Tomcat, then, use the Tomcat servlet.jar to compile it.
e.g.
c:\MyWeb\servlet\hello>javac -classpath C:\Tomcat4.0.4\common\lib\servlet.jar HelloServlet.java
Then, you should be able to compile the servlet.
Cheers.

Han Ming
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!