Cannot find PortableRemoteObject

Greetings:

I am attempting to compile an EJB test client using the Sun tools. I am running on a Red Hat Linux environment. My classpath is as follows:

CLASSPATH=/home/work/research/jdk1.3.1_01

and I am attempting to do the compile using compile.sh, which contains the following script:

J2EE_HOME=/home/work/research/j2sdkee1.3

WKHOME=/home/work/research/testbean/practice1

CPATH=.:$J2EE_HOME/lib/j2ee.jar:$WKHOME/ClientJar1.jar

javac -classpath "$CPATH" TestClient1.java

Note that TestClient1.java is in the same directory as compile.sh. ClientJar1.jar is the client jar generated when I used deploytool to deploy my test Javabean.

When I run the script, I get the following error message:

"TestClient1.java:1: error:Cannot find type "javax/rmi/PortableRemoteObject"

I have searched through j2ee.jar, rt.jar, and a number of other jar files throughout the SDK and the J2EE. I can find no reference to PortableRemoteObject.

Have I found a bug in JDK1.3? If not, then how do I include this class so I can compile my files?

-Factor Three

[1133 byte] By [factor3] at [2007-9-26 9:13:51]
# 1

I am running the 1.3 version of the JDK, and the class you mention is included in the JRE rt.jar file. Try running the following command (replace $JAVA_HOME with the root of your jdk installation):

% jar tvf $JAVA_HOME/jre/lib/rt.jar | grep PortableRemoteObject

I get three results, one of which is the class you mention. Let me know what you get from the operation.

Thanks,

-Derek

slagdogg at 2007-7-1 20:25:12 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

Derek:

I do not know why I didn't find it before, having looked at rt.jar before, but that seems to have solved my problem. I must have been looking at the wrong rt.jar (the one I searched wasn't in the jre directory) or maybe I screwed up my grep call. Regardless, I can compile now.

Of course, now I have a runtime problem, but that is a different matter.

Thanks.

Factor Three

factor3 at 2007-7-1 20:25:12 > top of Java-index,Other Topics,Patterns & OO Design...