• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please help on an ejb compile error!!

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following code(CabinRemote.cpp) is extracted from the book enterprise javabeans. I 'm trying to compile it. But I got the following error:
================
CabinRemote.java:5: package javax.ejb does not exist
public interface CabinRemote extends javax.ejb.EJBObject {
^
1 error
==================

Following is the env. variables in my system:
CLASS_PATH=c:\j2ee1.3\lib;c:\java1.4\lib; c:\java1.4\jdk\lib;c:\j2ee1.3\lib\j2ee.jar

------------------CabinRemote.cpp -----------------

package com.titan.cabin;

import java.rmi.RemoteException;

public interface CabinRemote extends javax.ejb.EJBObject {
public String getName() throws RemoteException;
public void setName(String str) throws RemoteException;
public int getDeckLevel() throws RemoteException;
public void setDeckLevel(int level) throws RemoteException;
public int getShipId() throws RemoteException;
public void setShipId(int sp) throws RemoteException;
public int getBedCount() throws RemoteException;
public void setBedCount(int bc) throws RemoteException;
}
 
david hu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I made a mistake. I should use CLASSPATH instead of CLASS_PATH.
After fixing this mistake, it compiles fine (in dos command line).

But If I compile it in Eclipse, I still got the same error.

Can anyone tell me how to add j2ee.jar to kind of "classpath" in eclipse, so I would not get compile error from it.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic