aspose file tools*
The moose likes JNLP and Web Start and the fly likes jmf on web start Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "jmf on web start" Watch "jmf on web start" New topic
Author

jmf on web start

alper yesilyurt
Greenhorn

Joined: Jan 08, 2008
Posts: 1
Hi friends,

Currently I am dealing with a project which includes distribution of JMF(java media framework) over the web. For this purpose, web start seems a nice approach.

Moreover, JMF requires some native libraries which should be deployed from web start. I had problems at this point and strongly need help. I could not achieve deploying these libraries from web start hence running JMF from web start.

I had no problem at running JMF from local JRE in standard java desktop applications. This means that required dlls can be successfully loaded and linked from standard applications but not from web start applications.

I have read lots of forums and web sites and did what is said (at least I think I did), but could not solve the problem. Most probably, I need to do some simple configurations but at this point I totally don�t know what to do. Below, I want to mention shortly what I did to deploy JMF over the web start and the exceptions and error I faced with. I will be very happy if you find something wrong in these steps and tell me what to do:

1.I jared all dlls related with the JMF : To do that, from Eclipse ee, I selected about 15 jmf dlls, right clicked them, chose �export� as jar, and obtained a jar from these dlls.

2.Then, I signed them using keytool and jarsigner tools of java to give the project unrestricted access for media processing.

3.Then, I added this jar to the webcontent folder of the project with other jars and files.

4.After that, I added following tag to the jnlp file of the project: <nativelib href="http://193.140.214.29:8080/jmfproject/jmf-native-all.jar"/>

5.I also added required System.loadLibrary() methods to my code in the order which gives no problem. (In the forums I read previously, these codes are required to load native dlls to the environment in which project will be run.)

Note: I deployed project on Apache Tomcat Server.


Below, I give my complete jnlp file;


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

<jnlp spec="1.0" codebase="http://193.140.214.29:8080/jmfproject" href="http://193.140.214.29:8080/jmfproject/jmfproject.jnlp">

<information>
<title>jmfproject</title>
<vendor>Techneon ltd.</vendor>
<icon href="http://193.140.214.29:8080/jmfproject/techneon.jpg" kind="default"/>
<icon href="http://193.140.214.29:8080/jmfproject/techneon.jpg" kind="splash"/>
</information>

<security>
<all-permissions/>
</security>


<resources OS = "Windows">
<j2se version="1.6.0_03" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="http://193.140.214.29:8080/jmfproject/jmf.jar"/>
<nativelib href="http://193.140.214.29:8080/jmfproject/jmfnative.jar"/>




</resources>

<application-desc main-class="JmfprojectStarter"/>

</jnlp>


And below is the cronical exception I faced with:

java.lang.NullPointerException
at Jmfproject.<init>(Jmfproject.java:241)
at JmfprojectStarter.main(JmfprojectStarter.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jmf on web start