| Author |
AdviceClient compiler error in HFE
|
Veena Pointi
Ranch Hand
Joined: Jun 20, 2002
Posts: 442
|
|
I am using windowsXP. When I compile AdviceClient with the command javac -classpath {$CLASSPATH}:AdviceClient.jar AdviceClient.java I get the following error AdviceClient.java:4: package headfirst does not exist import headfirst.*; ^ AdviceClient.java:5: package javax.ejb does not exist import javax.ejb.*; ^ AdviceClient.java:20: cannot resolve symbol symbol : class AdviceHome location: class AdviceClient AdviceHome home=(AdviceHome) PortableRemoteObject.narrow(o,AdviceHome.class) ^ AdviceClient.java:20: cannot resolve symbol symbol : class AdviceHome location: class AdviceClient AdviceHome home=(AdviceHome) PortableRemoteObject.narrow(o,AdviceHome.class) ^ AdviceClient.java:20: cannot resolve symbol symbol : class AdviceHome location: class AdviceClient AdviceHome home=(AdviceHome) PortableRemoteObject.narrow(o,AdviceHome.class) ^ AdviceClient.java:22: cannot resolve symbol symbol : class Advice location: class AdviceClient Advice advisor=home.create(); ^ 6 errors And when I compile AdviceClient with the command javac AdviceClient.java it compiles fine even when I have not included the AdviceAppClient.jar in classpath. Do I need to compile AdviceClient by including AdviceAppClient.jar inorder to run it successfully? Has anybody compiled and ran AdviceBean example from HFE book successfully? Thanks Veena [ February 08, 2004: Message edited by: Veena Point ]
|
SCJP1.4
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
*Winston Churchill
|
 |
Jayant Kulkarni
Ranch Hand
Joined: Dec 02, 2003
Posts: 56
|
|
Veena, It looks that your classpath setting has some problem. We all got this errors and they have been solved successfully. Check on http://www.wickedlysmart.com/HeadFirst/HeadFirstEJB/HeadFirstEJBNotes.html And see my earlier post on this example headed by - head first ejb pg:57 client problem!!!please help urgent Make sure that you have folder structure as described in the book and you have added * j2ee.jar * in the classpath setting. Hope this helps. Thanks, Jayant  [ February 09, 2004: Message edited by: Jayant Kulkarni ]
|
 |
Veena Pointi
Ranch Hand
Joined: Jun 20, 2002
Posts: 442
|
|
I am using jsdk1.4 .If I compile using the command javac -classpath %CLASSPATH%;adviceappClient.jar adviceclient.java I am getting following javac: invalid flag: and Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are us ed -classpath <path> Specify where to find user class files -sourcepath <path> Specify where to find input source files -bootclasspath <path> Override location of bootstrap class files -extdirs <dirs> Override location of installed extensions -d <directory> Specify where to place generated class files -encoding <encoding> Specify character encoding used by source files -source <release> Provide source compatibility with specified release -target <release> Generate class files for specific VM version -help Print a synopsis of standard options My path and classpath settings are PATH C:\WINDOWS;C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\j2sdkse1.4.1\bin;C:\j2sdkee1.3\bin CLASSPATH .;C:\j2sdkee1.3\lib\j2ee.jar;C:\veena\projects\advice\classes;C:\tomcat5.0\common\lib\servlet-api.jar;C:\Documents and Settings\VEENA\commons-collections.jar;C:\Documents and Settings\VEENA\commons-beanutils.jar;C:\Documents and Settings\VEENA\commons-logging.jar;C:\Documents and Settings\VEENA; I don't see anything wrong in classpath settings.Please can somebody help me in finding out the problem?It has been already 4th day I am living with this problem. Veena [ February 09, 2004: Message edited by: Veena Point ]
|
 |
Veena Pointi
Ranch Hand
Joined: Jun 20, 2002
Posts: 442
|
|
Atlast I solved compiletime problem.As always it was classpath problem.In my classpath the folder called Documents And Settings was creating the problem due to the space...Servlets were working well.But I faced problem with EJB's. Thanks to all. Veena [ February 09, 2004: Message edited by: Veena Point ]
|
 |
 |
|
|
subject: AdviceClient compiler error in HFE
|
|
|