Skip to main content

Using JavaFX offline: problems

2 replies [Last post]
schimki86
Offline
Joined: 2009-04-23
Points: 0

Hi!

I have to use an JavaFX applet offline. This means: the HTML, which contains the applet have to work too, if the computer is not connected to the internet and have not used JavaFX before. I tried downloaded the following jnlp files:

javafx-rt.jnlp
jogl.jnlp (used by javafx-rt.jnlp)

The .jar and archives used by javafx-rt.jnlp too:
for Example
javafx-rt-natives-windows-i586__V1.2.0_b233.jar
javafx-rt-windows-i586__V1.2.0_b233.jar

All the jnlp are part of my Project in a "javafx"- directory. I changed the path's of recources in the jnlp's to local path's: e.g.: becomes , etc.

But I get the following error:

Ausnahme: null
com.sun.deploy.net.FailedDownloadException: Ressource konnte nicht geladen werden: file:/D:/Projekte/eKiosk-prototyp/javafx/lib/javafx-rt-windows-i586__V1.2.0_b233.jar
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.downloadResources(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by:
java.util.zip.ZipException: ZIP file must have at least one entry
at java.util.zip.ZipOutputStream.finish(Unknown Source)
at java.util.zip.DeflaterOutputStream.close(Unknown Source)
at java.util.zip.ZipOutputStream.close(Unknown Source)
at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.downloadResources(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ausnahme: com.sun.deploy.net.FailedDownloadException: Ressource konnte nicht geladen werden: file:/D:/Projekte/eKiosk-prototyp/javafx/lib/javafx-rt-windows-i586__V1.2.0_b233.jar

The recource javafx-rt-windows-i586__V1.2.0_b233.jar can not be found, but if I call the path file:/D:/Projekte/eKiosk-prototyp/javafx/lib/javafx-rt-windows-i586__V1.2.0_b233.jar in the Browser the file will be downloaded...

Hope someone can help me to make my applet usable for people who had no Internet and JavaFX before. It is very important.

THX,
Danny

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
behrens
Offline
Joined: 2003-10-26
Points: 0

I;ve been able to get some JavaFX apps to run from a command prompt by copying all the needed jars and DLLs into a directory and making sure the classpath has them all.

Here is the batch file I used for a JavaFX 1.1 command (JavaFX 1.2 might have different jars - not sure).

SET CP=".;C:\Program Files\Java\jdk1.6.0_12\jre\lib\rt.jar;%JAVAFX_HOME%\lib\javafxc.jar;%JAVAFX_HOME%\lib\javafxrt.jar;%JAVAFX_HOME%\lib\shared\Scenario.jar;C:\Program Files\NetBeans 6.5\javafx2\javafx-sdk1.0\lib\desktop\javafxgui.jar"

javafxc -classpath %CP% circle.fx
javafx -classpath %CP% circle

Also - what happens when you try to run from the Java Control Panel - on the general Tab, click View, then right click on your application and select Run-offline.

vinayjgeorge
Offline
Joined: 2010-10-27
Points: 0

Hi
First I would like to say I am a very very new to javafx. I had the same problem of running the applet while offline. Later I downloaded the dtfs.js file and gave the path of the first script to the dtfs.js file. Later on The file was loaded and played successfully.
If needed more information can contact me on vinayjgeorge@gmail.com.
Happy if you reply me through mail.

Thank you