• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please Help me in setting up environment variables

 
kan kan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am new to EJB.I have got compilation errors with AdiceBean.java in HeadFirst.
operating System=Win XP
path=C:\j2sdkee1.3.1\bin;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin
J2EE_HOME=C:\j2sdkee1.3.1
JAVA_HOME=C:\Program Files\j2sdk_nb
CLASS_PATH=C:\j2sdkee1.3.1\lib\j2ee.jar
please,please help me out with this setting up environment variable.Really appreciete your help and time.
Thanks
Kan
 
David Harrigan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It would be helpful if you could post the compliation errors that you are getting...
Thanks.
-=david=-
 
kan kan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,
Thanks for coming forward to help me.These are my error msgs
AdviceBean.java:2: package javax.ejb does not exist
import javax.ejb.*;
AdviceBean.java:3:cannot resole symbol
sysmbol :class SessionBean
location:class headfirst.AdviceBean
public class AdviceBean implements SessionBean{
AdviceBean.java:17:cannot reslove symbol
symbol: class SessionContext
please help me to resolve these errors.
Thanks for your time
Kan
 
David Harrigan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Seems that the compliation can't find the j2ee.jar.
This is what I have in order to successfully compile. Compare it with your command and see if you can progress from there.
CLASSPATH=,;c:\javastuff\j2ee1.3.1\lib\j2ee.jar
javac -classpath %CLASSPATH%;adviceclientjar.jar AdviceClient.java
java -classpath %CLASSPATH%;adviceclientjar.jar AdviceClient
The adviceclientjar.jar is the jar that is generated by the J2EE RI by Sun on deploymnet (tick the box) that contains the stubs and skeletons used by RMI. You need to put this on your classpath so that the compile works (e.g., your AdviceClient java class can find AdviceHome, Advice etc...)
Of course this is just for compiling the AdviceClient. To compile the bean, remote home and component interfaces simple cd into the relevant directory, keep the classpath (as described above - modified to suit your program locations) the same and type...
javac -classpath %CLASSPATH% *.java
Hope this helps.
-=david=-
[ January 11, 2004: Message edited by: David Harrigan ]
 
Kitee Shek
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much! I had the exact same problem.
But now this is what I see when I run it
javax.naming.CommunicationException: can't find serial context provider at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:63)
Any ideas anyone?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic