• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

How do I set the classpath for J2EE apis?

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;


public interface AdderHome extends EJBHome {
Adder create () throws RemoteException, CreateException;
}
------------------------------------------------------------------
when i Complie this Programm in command prompt it gives me Error the follwing Errors
----------------------------------------------------------

C:\jboss-3.2.4RC2\classes>javac AdderHome.java
AdderHome.java:2: package javax.ejb does not exist
import javax.ejb.*;
^
AdderHome.java:6: cannot resolve symbol
symbol : class EJBHome
location: interface AdderHome
public interface AdderHome extends EJBHome {
^
AdderHome.java:7: cannot resolve symbol
symbol : class Adder
location: interface AdderHome
Adder create () throws RemoteException, CreateException;
^
AdderHome.java:7: cannot resolve symbol
symbol : class CreateException
location: interface AdderHome
Adder create () throws RemoteException, CreateException;
^
4 errors

plz explain me wht to do to remove this error

[ April 12, 2006: Message edited by: Akhilesh Yadav ]
[ April 12, 2006: Message edited by: Mark Spritzler ]
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't have the ejb classes on your classpath.
 
Akhilesh Yadav
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how do i set classpath
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has nothing to do with J2EE, it is just basic Java. How are you compiling your classes? Command-line? IDE?

Assuming command-line, javac takes a -classpath argument that you can use to provide the classpath to compile with. Example:
javac -classpath .;c:\somelocation\j2ee.jar *.java
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic