I have an applet that is trying to say
import netscape.javascript.*
No matter how I try to compile it, I get the error
package netscape.javascript does not exist
I am primarily using ant for building; here is the pertinent section of my build.xml file:
<property name="output" location="javaclasses" />
<target name="compile">
<javac srcdir="./"
destdir="${output}"
includes="**/*.java"
classpath="./,\
javaclasses/packages/epsgraphics.jar,\
/usr/lib/jvm/java-1.5.0-sun-1.5.0_update13-sr2/jre/lib/plugin.jar,\
javaclasses"
listfiles="yes">
</javac>
</target>
Note that plugin.jar is included in my classpath. Using jar -tf <...>/plugin.jar, I can see that it contains the netscape package, the javascript subdirectory, and the JSObject.class I am interested in.
Attempting to resolve this manually with the command line
javac -classpath "./;javaclasses/packages/epsgraphics.jar;/usr/lib/jvm/java-1.5.0-sun-1.5.0_update13-sr2/jre/lib/plugin.jar;javaclasses" myApplet.java
gives the same error.
Moving plugin.jar to my local directory, or any other directory specified in the classpath (which worked just fine until I tried accessing plugin.jar) and re-jiggering the classpath so it can be located gives the same result: it can't find netscape.javascript.
I'm using javac from java-1.5.0-sun-1.5.0_update13-sr2 on Suse Linux 10.3.
What am I missing here?