• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

class compile err,pls help

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I just write very simply code for session bean,but when I compile it,error happened.following is output:
D:\helloworldproject\src>javac -d ../classes helloworld/*.java
helloworld/hello.java:5: package javax.ejb does not exist
import javax.ejb.*;
^
helloworld/hello.java:8: package javax.ejb does not exist
public interface hello extends javax.ejb.EJBObject {
^
helloworld/helloBean.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
helloworld/helloBean.java:5: cannot resolve symbol
symbol : class SessionBean
location: class helloworld.helloBean
public class helloBean implements SessionBean {
^
helloworld/helloBean.java:7: cannot resolve symbol
symbol : class SessionContext
location: class helloworld.helloBean
private SessionContext ctx;
^
helloworld/helloBean.java:29: package javax.ejb does not exist
public void setSessionContext(javax.ejb.SessionContext ctx){
^
helloworld/helloHome.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
helloworld/helloHome.java:7: cannot resolve symbol
symbol : class EJBHome
location: interface helloworld.helloHome
public interface helloHome extends EJBHome {
^
helloworld/helloHome.java:9: cannot resolve symbol
symbol : class CreateException
location: interface helloworld.helloHome
public hello create() throws CreateException,RemoteException;
^
9 errors
I think it seems class path,I installed j2sdke1.3.1 in "D" dirve and set CLASSPATH=D:\j2sdkee1.3.1\lib, anything wrong?
Pls help me,TKS
 
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by dave hu:
CLASSPATH=D:\j2sdkee1.3.1\lib

You can't point to directories containing JAR files; you have to specify each JAR file directly.
 
reply
    Bookmark Topic Watch Topic
  • New Topic