• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

help!: AdviceClient.java does not compile  RSS feed

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, guys!

Please give me a hand on this: I'm almost done with the first chapter of HF EJB. I was able to compile and deploy AdviceBean and its interfaces just fine. However, when I try to compile AdviceClient.java from ~projects/advice
using the command:
C:\~\projects\advice>javac -classpath {$CLASSPATH}: AdviceAppClient.jar AdviceClient.java

I get the following errors:

AdviceClient.java:4: package headfirst does not exist
import headfirst.*;
^
AdviceClient.java:5: package javax.ejb does not exist
import javax.ejb.*;
^
AdviceClient.java:15: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class
;
^
AdviceClient.java:15: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class
;
^
AdviceClient.java:15: cannot resolve symbol
symbol : class AdviceHome
location: class AdviceClient
AdviceHome home = (AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class
;
^
AdviceClient.java:16: cannot resolve symbol
symbol : class Advice
location: class AdviceClient
Advice advisor = home.create();
^
AdviceClient.java:20: cannot resolve symbol
symbol : method PrintStackTrace ()
location: class java.lang.Exception
ex.PrintStackTrace();
^
7 errors

My Classpath has a reference to j2sdkee1.3.1\lib\j2ee.jar and j2sdkee1.3.1\lib.
What is the problem and how can I fix it? Please help!!!
 
Svitlana Dukhovna
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed it. The problem was in the command I've been using. The correct one for windows is:
javac -classpath %CLASSPATH%;c:/</YOUR_PATH to/>AdviceAppClient.jar AdviceClient.java
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!