Class path setting for JMF

I'm new to JMF never ever worked on it before... and now i'm currently stuck up.... i cant configure JMF have no idea how to go about the class path settings and the whole procedure involving it......I have also gone through the JMF setup page but in vain....plz help!!
[278 byte] By [zoheb_ha] at [2007-11-26 21:19:16]
# 1

> I'm new to JMF never ever worked on it before... and

> now i'm currently stuck up.... i cant configure JMF

> have no idea how to go about the class path settings

> and the whole procedure involving it......I have also

> gone through the JMF setup page but in vain....plz

> help!!

Did JMF do it for you during installation?

qUesT_foR_knOwLeDgea at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 2
i installed it on win 98 ..it did make a few changes in my auto execute.bat file....but the sample code given in the sample code n tutorials , doesn work....infact no jmf code works.....
zoheb_ha at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 3

'cant configure JMF have no idea how to go about the class path settings and the whole procedure involving it...'

Are you new to Java programming - if so have you had a look through the basic Java Tutorials - here

http://java.sun.com/docs/books/tutorial/

JMF is an 'add-on' to the main Java installation, so you need to get that installed / working before you get to JMF

(Please ignore the above if you're already happy with Java -

we'll need more info about what kind of error you're getting if we're to be able to help you

Stefan_Marica at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 4

"have no idea how to go about the class path settings and the whole procedure involving it..."

This is such a huge problem!

I do not know how people do not know how to set a classpath!

This should be the first thing a person learns, aside from hitting the power switch! (oh ****, I have mine on auto turn on, i forget how to turn on my computer)

Take a look at any forum, how many questions relate to CLASSPATH ?

sorry its monday

warren@clellanddataa at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 5

After installing JMF(on win-Xp and win98) the enironment variables are set to the following:

CLASSPATH=.;.;.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1E\lib;C:\WINDOWS\java\classes;%JMFDIR%\lib\jmf.jar;%JMFDIR%\lib\sound.jar;.;%CLASSPATH%

PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Rational\ClearQuest;%JMFDIR%\lib;%PATH%

After this I tried running the JMFDiagnostics applet using an appletviewer . I have jdk1.6.0 installed on my m/c.

It gives me the following error:

JMF Diagnostics:

Java 1.1 compliant browser.....Maybe

JMF classes.....Not Found

I also went through JMF troubleshooting n tried the solutions mentioned there but in vain.

I also made sure that the sound.jar and jmf.jar files are in C:\Program Files\Java\jdk1.6.0\jre\lib\ext .

When I run the SimplePlayerApplet code (using appletviewer) given in the tutorials it gives me the following error:

java.lang.NoClassDefinitionFoundError: javax/media/controllerLIstener.

After doing all this JMF doesn run on my m/c.plz help, workin on a colg proj which is due soon.

zoheb_ba at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 6

> ..I tried running the JMFDiagnostics applet using an appletviewer .

My experience suggests the diagnostics applet

is not very good. I am able to run and develop

JMF based apps. here, but my browsers report

similar results to what you got.

> When I run the SimplePlayerApplet code (using appletviewer) ..

Do you specifically want to develop an applet?

Applets are best left to developers with a long

experience with Java, as they can cause all sorts

of problems.

Note also, that if deploying either a web start

launched applet or application (both are free

floating, outside a browser window), it is much

easier to ensure the JMF classes are available.

Here is an example of both application and

applet launched using web start

http://www.physci.org/jws/#jtest

While here is my best attempt at launching

an app. that is specifically JMF, using web start..

http://www.javasaver.com/testjs/jmf/#test3

AndrewThompson64a at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 7

I'm also working on JMF these are the errors i get after running the SimplePlayerApplet.java file

C:\j2sdk1.4\bin>javac SimplePlayerApplet.java

SimplePlayerApplet.java:39: package javax.media does not exist

import javax.media.*;

^

SimplePlayerApplet.java:55: cannot resolve symbol

symbol : class ControllerListener

location: class SimplePlayerApplet

public class SimplePlayerApplet extends Applet implements ControllerListener {

^

SimplePlayerApplet.java:58: cannot resolve symbol

symbol : class Player

location: class SimplePlayerApplet

Player player = null;

^

SimplePlayerApplet.java:182: cannot resolve symbol

symbol : class ControllerEvent

location: class SimplePlayerApplet

public synchronized void controllerUpdate(ControllerEvent event) {

^

SimplePlayerApplet.java:88: cannot resolve symbol

symbol : class MediaLocator

location: class SimplePlayerApplet

MediaLocator mrl = null;

^

SimplePlayerApplet.java:106: cannot resolve symbol

symbol : class MediaLocator

location: class SimplePlayerApplet

if ((mrl = new MediaLocator(mediaFile)) == null)

^

SimplePlayerApplet.java:122: cannot resolve symbol

symbol : variable Manager

location: class SimplePlayerApplet

player = Manager.createPlayer(mrl);

^

SimplePlayerApplet.java:123: cannot resolve symbol

symbol : class NoPlayerException

location: class SimplePlayerApplet

} catch (NoPlayerException e) {

^

SimplePlayerApplet.java:190: cannot resolve symbol

symbol : class RealizeCompleteEvent

location: class SimplePlayerApplet

if (event instanceof RealizeCompleteEvent) {

^

SimplePlayerApplet.java:225: cannot resolve symbol

symbol : class CachingControlEvent

location: class SimplePlayerApplet

} else if (event instanceof CachingControlEvent) {

^

SimplePlayerApplet.java:226: cannot resolve symbol

symbol : variable Controller

location: class SimplePlayerApplet

if (player.getState() > Controller.Realizing)

^

SimplePlayerApplet.java:230: cannot resolve symbol

symbol : class CachingControlEvent

location: class SimplePlayerApplet

CachingControlEvent e = (CachingControlEvent) event;

^

SimplePlayerApplet.java:230: cannot resolve symbol

symbol : class CachingControlEvent

location: class SimplePlayerApplet

CachingControlEvent e = (CachingControlEvent) event;

^

SimplePlayerApplet.java:231: cannot resolve symbol

symbol : class CachingControl

location: class SimplePlayerApplet

CachingControl cc = e.getCachingControl();

^

SimplePlayerApplet.java:241: cannot resolve symbol

symbol : class EndOfMediaEvent

location: class SimplePlayerApplet

} else if (event instanceof EndOfMediaEvent) {

^

SimplePlayerApplet.java:244: cannot resolve symbol

symbol : class Time

location: class SimplePlayerApplet

player.setMediaTime(new Time(0));

^

SimplePlayerApplet.java:246: cannot resolve symbol

symbol : class ControllerErrorEvent

location: class SimplePlayerApplet

} else if (event instanceof ControllerErrorEvent) {

^

SimplePlayerApplet.java:249: cannot resolve symbol

symbol : class ControllerErrorEvent

location: class SimplePlayerApplet

Fatal(((ControllerErrorEvent)event).getMessage());

^

SimplePlayerApplet.java:250: cannot resolve symbol

symbol : class ControllerClosedEvent

location: class SimplePlayerApplet

} else if (event instanceof ControllerClosedEvent) {

^

19 errors

C:\j2sdk1.4\bin>

Please help as i have some assignments to do on it. Thanks!

carb0na at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 8

I ran the SimplePlayerApplet.java file successfully but the applet is not getting initialised. I'm supposed to work with applets as it is a "requirement" for my project. This is what happens in the background when i run SimplePlayerApplet.java

C:\j2sdk1.4\bin>appletviewer SimplePlayerApplet.java

java.lang.NoClassDefFoundError: javax/media/ControllerListener

at java.lang.ClassLoader.defineClass0(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:509)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12

3)

at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:146)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:112)

at java.lang.ClassLoader.loadClass(ClassLoader.java:262)

at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:473)

at sun.applet.AppletPanel.createApplet(AppletPanel.java:548)

at sun.applet.AppletPanel.runLoader(AppletPanel.java:477)

at sun.applet.AppletPanel.run(AppletPanel.java:290)

at java.lang.Thread.run(Thread.java:536)

zoheb_ha at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 9
> I'm supposed to work with applets as it > is a "requirement" for my project.It is fortunate that applets can be launched usingweb start.
AndrewThompson64a at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 10
I have no clue as to how to use web start.
zoheb_ha at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 11

> I have no clue as to how to use web start.

OK - so are you interested in learning*, or

did you just want me to feel sorry for you?

Note that those are the only two things I

can offer to you.

* It is not very hard, and I estimate that

you will be able to get a more useful and

robust launch using web start, sooner,

than an equivalent web page based

applet.

AndrewThompson64a at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 12
would u plz explain it to me.
zoheb_ha at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 13

> would u plz explain it to me.

Sure.

( If you have not tried those examples that I

linked to earlier, please try them to get a feel

for how it works for the end user. )

You create a web start launch file* for the applet,

that contains much of the same information

as the applet element in HTML, to tell it what

jars are needed, and that main class to load.

This launch file should be with file type JNLP

(e.g. 'jmfproject.jnlp'), you simply link to it in

the same way as you might link to the applet

page, and when a user with a web start enabled

computer (a modern Java Plug-In) clicks the

link, it comes onscreen.

* A very simple JNLP for a project might look

something like this (this is adapted from the

first example on the JMF page I linked to)..

<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="1.0"

codebase="http://www.javasaver.com/testjs/jmf/"

href="animplayer.jnlp">

<information>

<title>Animation Player</title>

<vendor>Andrew Thompson</vendor>

</information>

<resources>

<j2se

href="http://java.sun.com/products/autodl/j2se"

version="1.5+"/>

<jar href="animplayer.jar" />

<jar href="jmf.jar" />

</resources>

<application-desc main-class="AnimPlayer">

<argument>anim/2005-11-26.mov</argument>

</application-desc>

</jnlp>

AndrewThompson64a at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 14

i got this error while running the code given by you.

An error occurred while launching/running the application.

Title: Animation Player

Vendor: Andrew Thompson

Category: Download Error

Unable to load resource: http://www.javasaver.com/testjs/jmf/jmf.jar

JNLPException[category: Download Error : Exception: java.io.IOException: HTTP response 404 : LaunchDesc: null ]

at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)

at com.sun.javaws.cache.DownloadProtocol.getDownloadSize(Unknown Source)

at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)

at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)

at com.sun.javaws.Launcher.downloadResources(Unknown Source)

at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)

at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)

at com.sun.javaws.Launcher.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

java.io.IOException: HTTP response 404

at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)

at com.sun.javaws.cache.DownloadProtocol.getDownloadSize(Unknown Source)

at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)

at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)

at com.sun.javaws.Launcher.downloadResources(Unknown Source)

at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)

at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)

at com.sun.javaws.Launcher.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

zoheb_ha at 2007-7-10 2:58:03 > top of Java-index,Security,Cryptography...
# 15

> Unable to load resource: http://www.javasaver.com/testjs/jmf/jmf.jar

Oopps.. my bad. That error was introduced by

me as I was quickly editing two JNLP files

down to the simplest possible single JNLP,

the actual path for that jar (just checked it by

direct fetch) is ..

http://www.javasaver.com/testjs/jmf/lib/jmf.jar

Note however, that I really posted that more to

show how it might be done. Even the path to

the media file (in the arguments) was shortened

to make it ..'prettier' to view on-screen.

If you would like to see that project working, I

recommend trying the 1st link on the JMF

page that I linked to earlier.

But I would like to get to talking about what *your*

application actually needs, as it will need different

paths, and can probably be optimized to make the

download smaller.

AndrewThompson64a at 2007-7-21 18:15:26 > top of Java-index,Security,Cryptography...