-
Enhancement
-
Resolution: Not an Issue
-
P4
-
None
-
1.2.0
-
generic, x86
-
generic, windows_95
Name: clC74495 Date: 09/08/98
(Not sure what category this should fall into.) The
following is from the JMF-Interest list:
(The answer text is from Sean Sullivan.)
On Mon, 27 Jul 1998, Ivan Yanasak wrote:
> [...] I've
> installed JDK1.2beta4 and Sun JMF1.0.1 (on a Win95 platform) as
> well as the sample code from the book's CD-ROM (not the Intel
> JMF).
>
> The STP server seems to come up fine, but when attempting to
> bring STPClientApplet.html up with appletviewer, I get:
>
> I/O exception when loading: javax.media.ControllerListener
> java.lang.NoClassDefFoundError: javax/media/ControllerListener error when
> loading: jmfbook.examples.pulldatasource.stp.client.STPClientApplet
> java.lang.NoClassDefFoundError: javax/media/ControllerListener
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:355)
> at
> java.security.SecureClassLoader.defineClass(SecureClassloader.java:74)
> at
> [...]
I encounter a similar error when I run any of Sun's
JMF sample applets:
C:\JMF1.0\samples\Player>appletviewer Sample1.html
I/O exception when loading: javax.media.ControllerListener
java.lang.NoClassDefFoundError: javax/media/ControllerListener error
when loading: SimplePlayerApplet
java.lang.NoClassDefFoundError: javax/media/ControllerListener
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:355)
[...]
My configuration:
Microsoft Windows 98
Sun JMF 1.0.1
JDK 1.2 beta 4
appletviewer.exe from JDK 1.2 beta 4
CLASSPATH=c:\jmf1.0\lib\jmf.jar + . + the JDK 1.2 stuff
> I've looked at the index of jmf.jar, and
> javax.media.ControllerListener.class is present (and non-zero in length).
> My CLASSPATH is also set to search jmf.jar correctly.
>
> [...]
>
> If not, any clues as to what is happening here?
According to the JDK 1.2 Security Architecture documentation
(online at http://java.sun.com/products/jdk/1.2/docs/
guide/security/spec/security-spec.doc5.html#20588):
"Classes that are stored on the local file system but
should not be treated as system classes should be on
[the CLASSPATH / java.class.path].
[...] Classes that are stored on the local file system but
should not be treated as system classes should be on
this path. Classes on this path are loaded with a secure
class loader and are thus subjected to the security policy
being enforced."
Based upon this information, I assume that the classes in
JMF.JAR are not being treated as system classes. They are
subject to some kind of system security policy.
There is a command line parameter for appletviewer which
allows you to explicitly set the list of system classes.
By using the -Xbootclasspath parameter, you can force the JVM
to treat the classes in JMF.JAR as system classes:
appletviewer
-J-Xbootclasspath:c:\jmf1.0\lib\jmf.jar;
c:\jdk1.2beta4\jre\lib\rt.jar
JMFPlayerApplet.html
After I ran this, the applet loaded. But, when I try loading
an AVI file from the file system, I get this error:
Exception occurred during event dispatching:
java.lang.UnsatisfiedLinkError: no jmfaudio in java.library.path
at java.lang.ClassLoader.loadLibrary(Compiled Code)
at java.lang.Runtime.loadLibrary0(Runtime.java:384)
at java.lang.System.loadLibrary(System.java:620)
at com.sun.media.jmf.audio.HaeMixer.<clinit>(HaeMixer.java:95)
Perhaps Sun can suggest a workaround?
-Sean
p.s. - side note:
With JDK 1.2 beta 4, Java Standard Extensions
are supposed to get installed into C:\jdk1.2beta4\jre\lib\ext
In the future, I'm sure we'll see the JMF.JAR file
installed into the Extension directory.
(Review ID: 36045)
======================================================================