Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

class compile err,pls help

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic