Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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
 
please buy this thing and then I get a fat cut of the action:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic