L
lbrtchx
I am getting
~
ClassNotFoundException . . . "Caused by" . . . FileNotFoundException
~
exceptions
~
C:\JApps\JApplet>appletviewer -J-Djava.security.policy=test00.policy
test00.html
load: class WP04_Japplet00 not found.
java.lang.ClassNotFoundException: WP04_Japplet00
at
sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:626)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:778)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:707)
at sun.applet.AppletPanel.run(AppletPanel.java:361)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: C:\JApps\JApplet
\test00_signed.jar\test00.class (The system cannot find
the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:
70)
at
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:
161)
at
sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:295)
at sun.applet.AppletClassLoader.access
$100(AppletClassLoader.java:44)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:
173)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:170)
... 8 more
~
the thing is that I can see the actual file right there in the jar
exactly where appletviewer is telling me it can not find it
~
C:\JApps\JApplet>jar -tvf test00_signed.jar
1962 Wed Jul 25 16:08:20 EDT 2007 META-INF/MANIFEST.MF
2083 Wed Jul 25 16:08:20 EDT 2007 META-INF/MM_G.SF
1095 Wed Jul 25 16:08:20 EDT 2007 META-INF/MM_G.DSA
0 Wed Jul 25 16:08:20 EDT 2007 META-INF/
828 Wed Jul 25 16:08:20 EDT 2007 AuthorCommentsBox00.class
669 Wed Jul 25 16:08:20 EDT 2007 JControls00.class
1956 Wed Jul 25 16:08:20 EDT 2007 LocalResource02.class
543 Wed Jul 25 16:08:20 EDT 2007 navBar00.class
573 Wed Jul 25 16:08:20 EDT 2007 navBarPix02.class
323 Wed Jul 25 16:08:20 EDT 2007
OptionsIndexOutOfBoundsException00.class
946 Wed Jul 25 16:08:20 EDT 2007 PixSel04.class
836 Wed Jul 25 16:08:20 EDT 2007 PixSelCtrl00.class
661 Wed Jul 25 16:08:20 EDT 2007 PixSelName04.class
286 Wed Jul 25 16:08:18 EDT 2007 PopUpAktnH00.class
3200 Wed Jul 25 16:08:18 EDT 2007 PUpAktn14.class
885 Wed Jul 25 16:08:18 EDT 2007 PUpSel00$1.class
1100 Wed Jul 25 16:08:18 EDT 2007 PUpSel00.class
892 Wed Jul 25 16:08:20 EDT 2007 PUpSpdSel00$1.class
589 Wed Jul 25 16:08:20 EDT 2007 PUpSpdSel00$2.class
2238 Wed Jul 25 16:08:20 EDT 2007 PUpSpdSel00.class
1655 Wed Jul 25 16:08:20 EDT 2007 SldSpd04.class
738 Wed Jul 25 16:08:20 EDT 2007 SplitPanes02$1.class
720 Wed Jul 25 16:08:20 EDT 2007 SplitPanes02$2.class
1497 Wed Jul 25 16:08:20 EDT 2007 SplitPanes02.class
1023 Wed Jul 25 16:08:20 EDT 2007 TreeDemo02$BookInfo.class
5316 Wed Jul 25 16:08:20 EDT 2007 TreeDemo02.class
8212 Wed Jul 25 16:08:20 EDT 2007 WP04_JApplet00.class
0 Tue Jul 24 17:31:28 EDT 2007 images/./
0 Tue Jul 24 17:31:28 EDT 2007 images/./gui/
946 Wed Feb 17 22:44:30 EST 1999 images/./gui/cut.gif
200 Mon Sep 04 09:06:32 EDT 2006 images/./gui/warning1.gif
0 Tue Jul 24 17:31:28 EDT 2007 images/./pix/
42499 Sun Sep 17 23:22:54 EDT 2006 images/./pix/BidOldMonkeyHalf.jpg
~
I am using windows
~
C:\JApps\JApplet>java -version
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
~
to sign the jar file and run the appletviewer with a batch file
~
SET _KD=WP04_JApplet00
SET _SNDKD=%_KD%_signed
SET _KSTR="keys.kstr"
SET _STRPW="password"
SET _DNM="[email protected], OU=wwwabc, O=org, L=noplace, ST=AR, C=US"
SET _ALIAS="(e-mail address removed)"
echo "// __ del(eting) %_KSTR%, *.jar, *.class"
del %_KSTR%
echo "del *.jar"
del *.jar
echo "del *.class"
del *.class
echo "// __ Compiling all classes in directory"
javac *.java
echo "// __ jar(ring) all classes in directory"
jar cvf0 %_KD%.jar *.class -C "images/" .
keytool -genkey -keystore %_KSTR% -storepass %_STRPW% -keypass %_STRPW
% -dname %_DNM% -alias %_ALIAS%
keytool -export -keystore %_KSTR% -storepass %_STRPW% -alias %_ALIAS% -
file %_KD%.cer
jarsigner -keystore %_KSTR% -storepass %_STRPW% -keypass %_STRPW% -
signedjar %_SNDKD%.jar %_KD%.jar %_ALIAS%
echo "del *.class"
del *.class
del %_KD%.jar
appletviewer -J-Djava.security.policy=%_KD%.policy %_KD%.html
~
which I have used without any problems in other cases
~
What is going on there?
~
Thanks
lbrtchx
~
ClassNotFoundException . . . "Caused by" . . . FileNotFoundException
~
exceptions
~
C:\JApps\JApplet>appletviewer -J-Djava.security.policy=test00.policy
test00.html
load: class WP04_Japplet00 not found.
java.lang.ClassNotFoundException: WP04_Japplet00
at
sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:626)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:778)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:707)
at sun.applet.AppletPanel.run(AppletPanel.java:361)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: C:\JApps\JApplet
\test00_signed.jar\test00.class (The system cannot find
the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:
70)
at
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:
161)
at
sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:295)
at sun.applet.AppletClassLoader.access
$100(AppletClassLoader.java:44)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:
173)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:170)
... 8 more
~
the thing is that I can see the actual file right there in the jar
exactly where appletviewer is telling me it can not find it
~
C:\JApps\JApplet>jar -tvf test00_signed.jar
1962 Wed Jul 25 16:08:20 EDT 2007 META-INF/MANIFEST.MF
2083 Wed Jul 25 16:08:20 EDT 2007 META-INF/MM_G.SF
1095 Wed Jul 25 16:08:20 EDT 2007 META-INF/MM_G.DSA
0 Wed Jul 25 16:08:20 EDT 2007 META-INF/
828 Wed Jul 25 16:08:20 EDT 2007 AuthorCommentsBox00.class
669 Wed Jul 25 16:08:20 EDT 2007 JControls00.class
1956 Wed Jul 25 16:08:20 EDT 2007 LocalResource02.class
543 Wed Jul 25 16:08:20 EDT 2007 navBar00.class
573 Wed Jul 25 16:08:20 EDT 2007 navBarPix02.class
323 Wed Jul 25 16:08:20 EDT 2007
OptionsIndexOutOfBoundsException00.class
946 Wed Jul 25 16:08:20 EDT 2007 PixSel04.class
836 Wed Jul 25 16:08:20 EDT 2007 PixSelCtrl00.class
661 Wed Jul 25 16:08:20 EDT 2007 PixSelName04.class
286 Wed Jul 25 16:08:18 EDT 2007 PopUpAktnH00.class
3200 Wed Jul 25 16:08:18 EDT 2007 PUpAktn14.class
885 Wed Jul 25 16:08:18 EDT 2007 PUpSel00$1.class
1100 Wed Jul 25 16:08:18 EDT 2007 PUpSel00.class
892 Wed Jul 25 16:08:20 EDT 2007 PUpSpdSel00$1.class
589 Wed Jul 25 16:08:20 EDT 2007 PUpSpdSel00$2.class
2238 Wed Jul 25 16:08:20 EDT 2007 PUpSpdSel00.class
1655 Wed Jul 25 16:08:20 EDT 2007 SldSpd04.class
738 Wed Jul 25 16:08:20 EDT 2007 SplitPanes02$1.class
720 Wed Jul 25 16:08:20 EDT 2007 SplitPanes02$2.class
1497 Wed Jul 25 16:08:20 EDT 2007 SplitPanes02.class
1023 Wed Jul 25 16:08:20 EDT 2007 TreeDemo02$BookInfo.class
5316 Wed Jul 25 16:08:20 EDT 2007 TreeDemo02.class
8212 Wed Jul 25 16:08:20 EDT 2007 WP04_JApplet00.class
0 Tue Jul 24 17:31:28 EDT 2007 images/./
0 Tue Jul 24 17:31:28 EDT 2007 images/./gui/
946 Wed Feb 17 22:44:30 EST 1999 images/./gui/cut.gif
200 Mon Sep 04 09:06:32 EDT 2006 images/./gui/warning1.gif
0 Tue Jul 24 17:31:28 EDT 2007 images/./pix/
42499 Sun Sep 17 23:22:54 EDT 2006 images/./pix/BidOldMonkeyHalf.jpg
~
I am using windows
~
C:\JApps\JApplet>java -version
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
~
to sign the jar file and run the appletviewer with a batch file
~
SET _KD=WP04_JApplet00
SET _SNDKD=%_KD%_signed
SET _KSTR="keys.kstr"
SET _STRPW="password"
SET _DNM="[email protected], OU=wwwabc, O=org, L=noplace, ST=AR, C=US"
SET _ALIAS="(e-mail address removed)"
echo "// __ del(eting) %_KSTR%, *.jar, *.class"
del %_KSTR%
echo "del *.jar"
del *.jar
echo "del *.class"
del *.class
echo "// __ Compiling all classes in directory"
javac *.java
echo "// __ jar(ring) all classes in directory"
jar cvf0 %_KD%.jar *.class -C "images/" .
keytool -genkey -keystore %_KSTR% -storepass %_STRPW% -keypass %_STRPW
% -dname %_DNM% -alias %_ALIAS%
keytool -export -keystore %_KSTR% -storepass %_STRPW% -alias %_ALIAS% -
file %_KD%.cer
jarsigner -keystore %_KSTR% -storepass %_STRPW% -keypass %_STRPW% -
signedjar %_SNDKD%.jar %_KD%.jar %_ALIAS%
echo "del *.class"
del *.class
del %_KD%.jar
appletviewer -J-Djava.security.policy=%_KD%.policy %_KD%.html
~
which I have used without any problems in other cases
~
What is going on there?
~
Thanks
lbrtchx