This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

AdviceBean - compile time erorr  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Why compiler not able to trace the package. What environment variable am i missing can someone tell.

D:\projects\advice\src>javac -d ../classes headfirst/*.java
headfirst/AdviceHome.java:9: = expected
publice Advice create() throws CreateException , RemoteException;
^
headfirst/Advice.java:4: package javax.ejb does not exist
import javax.ejb.*;
^
headfirst/Advice.java:7: cannot resolve symbol
symbol : class EJBObject
location: interface headfirst.Advice
public interface Advice extends EJBObject{
^
headfirst/AdviceBean.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
headfirst/AdviceBean.java:6: cannot resolve symbol
symbol : class SessionBean
location: class headfirst.AdviceBean
public class AdviceBean implements SessionBean {
^
headfirst/AdviceBean.java:18: cannot resolve symbol
symbol : class SessionContext
location: class headfirst.AdviceBean
public void setSessionContext(SessionContext ctx){
^
headfirst/AdviceHome.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
headfirst/AdviceHome.java:7: cannot resolve symbol
symbol : class EJBHome
location: interface headfirst.AdviceHome
public interface AdviceHome extends EJBHome {
^
headfirst/AdviceHome.java:9: cannot resolve symbol
symbol : class publice
location: interface headfirst.AdviceHome
publice Advice create() throws CreateException , RemoteException;
^
9 errors

Jai
"Do to others what you would have them do to you"
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Youe j2ee libraries dont seem to be present. What does your %CLASSPATH% echo? And did you include it in your javac command.
[ February 19, 2004: Message edited by: Morgan Bath ]
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first compiler error points to "publice Advice ...". Try to remove "e" from "public"
 
Jai Verma
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I am using Win2000 environment and my path looks like : path=D:\jdk1.3.1_10\bin;D:\j2sdkee1.3.1\bin;D:\j2sdkee1.3.1\lib;
And I have corrected the publice typo in the code - Thanks Viktor.
what command should enable javac to trace the ejb package. Currently I am using D:\projects\advice\src> javac -d ../classes headfirst/*.java
 
Viktor Sadovnikov
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check authors' notes on http://www.oreilly.com/catalog/hfjejb/errata/hfjejb.help.
There is an explaination how to set CLASSPATH.
Regards,
Viktor
 
Jai Verma
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I can do it now.
I was using echo %CLASSPATH%
%CLASSPATH%;D:\jdk1.3.1_10\bin;D:\j2sdkee1.3.1\bin;D:\j2sdkee1.3.1\lib;
while the correct is
%CLASSPATH%;D:\jdk1.3.1_10\bin;D:\j2sdkee1.3.1\bin;D:\j2sdkee1.3.1\lib\j2ee.jar;
Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!