Syntax of the JNLP file (web start) for JFX to allow desktop shortcut/icon?

I'm having a hard time getting this to work. I'm using NetBeans v7.1.2. First of all - the resulting .jnlp file comes with the applet, as well as the application specification. The classloader is different in both of the cases from what I've seen.
<applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="jwsapp" >
<param name="requiredFXVersion" value="2.0+"/>
</applet>
<jfx:javafx-desc width="800" height="600" main-class="jwsapp.Main" name="jwsapp" />
What I did was edit out the applet part - now there is no entry in the "Type" of application in the javaws cache, it's simply blank. And it's still launched as an applet (judging by the console trace). Now we have "<jfx:javafx-desc", instead of application-desc? What does that affect? Is it safe to just fallback to 'application-desc' (then the type is properly detected)? I haven't been able to find any info on this whatsoever.
Shortcuts.. I have Java 2.1.1 installed and this:
          <shortcut online="false">
               <desktop/>
          </shortcut>
does absolutely nothing for me. The shortcut never appears (even though this addition to .jnlp was designated by NetBeans). Moreover, how would I go about attaching icons to this shortcut?
Does anyone have a working .jnlp example, that is actually able to allocate a shortcut with a predefined icon on the desktop? Thank you.
Edited by: 919083 on Aug 12, 2012 5:06 AM
Edited by: 919083 on Aug 12, 2012 5:07 AM

It works fine for me.
I'm using latest FX samples and latest 7u6 on Mac OS X.
Tested with slightly modified version of BrickBreaker.jnlp that includes
<shortcut online="false">
<desktop/>
</shortcut>
and the shortcut is always created to me.
Could you please try the latest 7u6 build?
If it's still reproducible, please file a new bug at http://javafx-jira.kenai.com/
and also could you please attach an example to reproduce the problem?

Similar Messages

  • Does the Browser cach the jnlp-file?

    I have a problem, I think with the browser's caching. As I modify the *.jnlp-File, the old version is loaded, not the new one!
    Or is the old version cached by the webStart-Caching-Mechanism?
    To update the jnlp-file, sometimes it is helpful to clear the Clients webStart cache.
    Is that correct?
    regards,
    ulli

    The browser does in fact cache the jnlp and it can be a real problem. If there is no expiration on the JNLP then the browser may load it from cache instead of going to your web server on the next access. This means you may have modified your JNLP on the server for a new release, but users can start your application WITHOUT GETTING THE LATEST JNLP!
    You can solve this problem by serving the JNLP file from your own servlet (or other HTTP serving technique) and setting the expire header. Setting it to 0 does the right thing.
    Do NOT however, set "Pragma", "no-cache". no-cache stops the browser from writing the JNLP to the file system...this in turn causes a problem when Web Start tries to find the jnlp file after the browser starts Web Start....the jnlp file is not there.
    Note that the JnlpDowloadServlet provided by Sun in the Web Start developers kit does NOT expire the JNLP file...you must fix this code yourself if you want it to work correcly. Sun was supposed to make this source code available but I can't find it anywhere. We used a de-compiler to de-compile the code, fix it and re-jar it.

  • Web start for Java 7 (update 8) on MacOS Lion can't create shortcut

    We have a Webstart working fine on Java 6, lately one of our user updated to Java 7, and the shortcut of this Web Start can not be successfully installed. with this exception:
         Match: Running JREInfo Version match: 1.7.0.08.ea == 1.7.0.08.ea
         Match: Running JVM args match: have:<-Xmx256m -Xms128m> satisfy want:<-Xmx256m -Xms128m>
    java.io.FileNotFoundException: /Users/ryantan/Library/Application Support/Oracle/Java/Deployment/cache/6.0/4/61fa8384-5f843c43.icns (No such file or directory)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:138)
         at java.io.FileInputStream.<init>(FileInputStream.java:97)
         at com.sun.javaws.MacOSXShortcutUtil.copy(Unknown Source)
         at com.sun.javaws.MacOSXShortcutUtil.createBundle(Unknown Source)
         at com.sun.javaws.MacOSXLocalInstallHandler.createBundle(Unknown Source)
         at com.sun.javaws.MacOSXLocalInstallHandler.createShortcuts(Unknown Source)
         at com.sun.javaws.LocalInstallHandler.installShortcuts(Unknown Source)
         at com.sun.javaws.LocalInstallHandler.performIntegration(Unknown Source)
         at com.sun.javaws.LocalInstallHandler.install(Unknown Source)
         at com.sun.javaws.Launcher.notifyLocalInstallHandler(Unknown Source)
         at com.sun.javaws.Launcher.prepareResources(Unknown Source)
         at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
         at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
         at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
         at com.sun.javaws.Launcher.launch(Unknown Source)
         at com.sun.javaws.Main.launchApp(Unknown Source)
         at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
         at com.sun.javaws.Main.access$000(Unknown Source)
         at com.sun.javaws.Main$1.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:722)
    =========================
    in the JNLP file we have these lines declare a shortcut on desktop, and it works exactly for Java 6 on same machine:
    <shortcut online="true">
    <desktop/>
    <menu submenu="XXXXX">
    </shortcut>
    so I was wondering if any one have encountered same issue like this? please give me some hint about how to work around with this, Thanks in advance.
    Ryan Tan

    Ryan
    Which icon do you use? If it's a .png icon, then it's a known bug (id - 7189893) and this bug will be fixed soon.
    As a workaround, you can export the icon to different format (supported formats - gif jpeg jpg icns) to see if it helps.
    Dmitry

  • Application does not load when the JNLP file URL is given

    Hi,
    I have created a JNLP file to load a swing based application and i'm trying to host it on a tomcat web server.
    But when i type in the URL in the browser window, nothing happens. No errors shown.I'm not able to figure out where i have gone wrong. following are the steps i have followed:
    1)Created a .jar file which contains all the class files required for the application to run
    2)created another jar file containing the main class file which loads the application.
    3)included these two jar files in the JNLP <resource> tag
    4)placed the 2 jar files along with the jnlp file in the ROOT directory of the web server.
    5)type in teh URL of the jnlp file which is supposed to start the appilcation.
    please do let me know if i'v done anything wrong in the above steps..
    TIA,...

    Check if the href attribute in the html file is
    referencing the jnlp file correctly or not.I'm not using any HTML file to access this jnlp... i'm directly giving the URL smthing like this--> http://localhost:8080/test/client.jnlp
    where, client.jnlp is present in a directory called test under the ROOT directory of the tomcat/webapps.
    i hope this is the way to do it!!! plz do correct me if i'm wrong...!!!
    TIA...

  • Fail to update the jnlp file

    The application allowed user to run offline. So ,I use <offline-allowed/> in the JNLP file.
    It works well in JDK5.0:
    1.the application can run if the network is dropped.
    2.the jnlp file will be updated if the server update the JNLP.
    But in when I change JDK to version 1.4.2, something unreasonable happened:
    Even I update the server's JNLP, the client still use the old JNLP and not update it.
    In the JWS1.4.2 Developer Guide, it says:"If offline-allowed is specified, Java Web Start will also check to see if an update is available. However, if the application is already downloaded the check will timeout after a few seconds, in which case the cached application will be launched instead."
    What is the "a few seconds" mean?Is there any different between JDK1.4 and 1.5?
    The connection between client and server is not very good. I do think it may cause the problem above. But in the same connection condition, JDK1.5 works..
    So, is there any thing I can do to resolve this problem?

    <jse version="1.5+" />(is one possibility)

  • Dynamically generating the jnlp file

    Hi Experts,
    Im working on a project in which we launch the Eclipse RCP from the web UI (thin client).
    I want to dynamically generate the jnlp file cause I want to pass the session of the user from the web client to RCP.
    So for this i have thought of having a variable let say sessionID ,which will take value of the session
    sum thing like this...
    <application-desc main-class="com.rcp.core.HelloWorld">
    <property name="sessionID" value="$$userSessionId"/>
    </application-desc>
    But im not able to figure out how i will populate the sessionID variable.
    which class should be responsible for doing this?
    whether that class will be in the RCP code or in the Web code...i guess it is in the web code?
    Please if u can clarify these doubts then it will be great.
    Thanks
    ved

    usually you would use jsp or a servlet to generate the jnlp file.
    If you extend the JnlpDownloadServlet (found in the sample directory in the JDK) you can generate the session id.
    /Andy

  • How to disable access to internet completely in the jnlp file

    Hi All,
    Can someone help me in figuring out how to disable access to internet completely in the jnlp file.
    To be specific with the scenario if the client does not have the JRE installed, i would like to have it downloaded from the server where application runs instead of going to java.sun.com website which needs internet access.
    How can we configure it in such a way that it does not go to internet at all.
    Here is the snapshot of my jnlp file
    <j2se version="1.5.0+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="128m" max-heap-size="128m"/>
    I tried with the following and still unsuccessful.
    <j2se version="1.5.0+" initial-heap-size="128m" max-heap-size="128m"/>
    Could not find any useful information in the documentation.

    see post from Mike at:
    http://forum.java.sun.com/thread.jspa?threadID=704112&messageID=4082098#4082098
    for how to set up your own autodownload of jre from within your internet.
    /Andy

  • How to set  max-heap-size outside the jnlp file?

    Due to bug_id=6631056 It may not be possible to specify max-heap-size within
    the JNLP file for certain jnlp java applications.
    Are there other possibilities to specify this Jvm parameter?
    In the ControlPanel there is the possibility to specify Xmx for applets but not for jnlp.
    I have tried to add properties like
    "deployment.javaws.jre.0.args=Xmx\=128M" without success
    Many thanks

    Even in JNLP also you can specify the max heap size
    <j2se version="1.5+" initial-heap-size="128m" max-heap-size="512m"/>
    Thanks,
    Suresh
    [http://sureshdevi.co.in|http://sureshdevi.co.in]

  • Download  resources that are not listed in the JNLP file

    There is some way to download resources that are not listed in the JNLP file, and then
    ask for them with DownloadService ? (isResourceCached)
    thanks.

    currently, the jnlp spec requires DownloadService to access only resources specified in the jnlp file..
    changing this is a proposed RFE for the next spec version:
    4908304: JWS DownloadService should not require mention in JNLP file
    /Dietz

  • Where can I find the backup files in iTunes for my iPhone, I want a copy

    Where can I find the backup files in iTunes for my iPhone, I want to copy the backup files for all app's and phone numbers, I'm using Windows XP
    I just need to know where its hiding, a link that shows an address where would sure help

    First you'll need to make sure your XP is set up to view hidden files and folders.
    1. Open My Computer from the desktop or Start menu.
    2. In the Tools menu, click Folder Options.
    3. Click the View tab.
    4. In the "Advanced settings" pane under "Hidden files and folders" make sure that the "Show hidden files and folders" option is selected.
    5. Click OK.
    Now you should be able to track down your backup file at the location in the following document:
    [iTunes: "Backup could not be saved on the computer" alert message|http://support.apple.com/kb/TS2529]

  • Where can I get the texture file puzzle.psd for Photoshop CS4?

    Does anyone know where I can get the texture file puzzle.psd for Photoshop CS4?  I searched the web and got lots of links but none of them results in me downloading the puzzle.psd file.

    Thanks for pointing to this free puzzle action!  I ended up discovering several other great actions (both commercial and free) that I have a use for on the website of the puzzle action author.

  • No update-check on JNLP-file when start from other location than codebase

    we are using JWS version 1.0 and 1.4.2.
    Our clients have a common directory on the local disc which contains all the JNLP-files used in their organization. Some menu-links and some other applications are using this JNLP-files to launch and jump into the applications.
    The JNLP-file repository is provided by an http-URL location. The JNLP-files in the local directory are directed by the codebase-attribute to this repository.
    JWS processes the launch in following way:
    1. read the codebase and href-attribute from the launched JNLP-file.
    2. get timestamp from the original in the JNLP-repository
    3. check if already cached and with latest timestamp.
    4. download JNLP-file if not cached or not latest version.
    5. check/download all other resources.
    6. start the app.
    With JWS shipped with JRE 1.5 (Beta was fine) this doesnt work in the same procedure:
    1. copy the launched JNLP-file in the empty JWS-cache.
    2. set a new timestamp on the cached JNLP-file (it does not let the old timestamp).
    3. get timestamp from the original in the JNLP-repository (given with the codebase & href attribute)
    4. check if already cached and with the latest timestamp.
    5. download JNLP-file if not cached or not latest version. (will never appear because timestamp in cached version is newer)
    6. check/download all other resources.
    7. start the app. (with probably not latest resources)
    Is this behaviour ok or is this a Bug?

    hi Andy,
    we tried with 1.5.0_04, 1.5.0_06 and 1.5.0_07 and it was always the same problem.
    With the beta 1.5.0 (jawaws.jar's build.id = b64, 15/09/2004) it worked correctly.
    Roland.

  • To create a desktop shortcut icon for the application for a jar file

    Hi
    I have created a jar file for my application. when i double click this jar file, the application opens.
    What i want is--
    Instead of user clicking on the jar file, my application also has to create a desktop shortcut icon.
    If the user clicks on the icon which is on the desktop the application should open.
    Please suggest me.
    Thanks in advance.

    >
    Please suggest me.>Launch the application using java webstart. A webstart launch offers things like a splash screen, automatic updates, and desktop integration in the form of desktop shortcuts and program menu items. If the launch file specifies icons, they are used for the shortcuts, otherwise a generic icon is used.
    For a comparison between a sandboxed webstart launch and a plain app., try the [Text Width Checker|http://pscode.org/twc/].
    While the TWC can run OK within the security sandbox, many applications need to be digitally signed and request extended permissions, to do what they need to do.
    STBC is an all-permissions webstart launch.
    Edit 1:
    And for one that definitely suggests desktop shortcuts (I usually avoid them, in favor of a menu item only), try the sandboxed [demo of the PrintService|http://pscode.org/jws/api.html#prs], which prompts the user to choose.
    Edited by: AndrewThompson64 on Sep 2, 2008 10:49 PM

  • How to load .jar files when not specified in the .jnlp file

    Hello,
    We are deploying an application with JWS but due to the nature of this app, we need to download additional jar file only when the user has been authenticated. The jar file(s) we need to download can hardly be predicted (in term of name) and thus cannot be all listed as lazzy resource in the .jnlp file.
    However, we would like to take advantage of the various JWS features relateed to .jar download and cache and would prefer not to reinvent the wheel by implementing our on stuff (i.e. URLClassLoader with caching etc.).
    Any idea, suggestion?
    Thanks in advance.
    Fred.

    How about writing a second jnlp file with the optional jar listed in it and running it only if your user is authenticated?

  • What are the Jar files required,that for accessing the Type 4 Drivers.

    what are the Jar files required,that for accessing the Type 4 Drivers.
    Regards,

    Well it is Database Specific.
    Howevr there are few 3rd party .jar (Derby) which you can use it for accesing some standard databases.

Maybe you are looking for