• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help!: AdviceClient.java does not compile

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic