• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please help on an ejb compile error!!

 
david hu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • 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
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!