Using Jardiff

Hi,
I want to use jardiff. I have downloaded JnlpDownloadServlet and trying to implement it.
I read complete documentation, but sill I',m not clear about the 2 approaches.
Plz correct me If I'm wrong.
1) I have to change .jar file name, considering BNF notation.
else
2) I can have version.xml file located in each directory, so i need not to change .jar file name.
Is my understanding correct?
I choose second approach and I have included version.xml file in directory
<jnlp-versions>
     <resource>
          <pattern>
               <name>com.mastek.elixir.backoffice.client.jar</name>
               <version-id>1.1</version-id>
          </pattern>
          <file>com.mastek.elixir.backoffice.client.jar</file>
     </resource>
     <resource>
          <pattern>
               <name>com.mastek.elixir.backoffice.common.jar</name>
               <version-id>1.1</version-id>
          </pattern>
          <file>com.mastek.elixir.backoffice.common.jar</file>
     </resource>
<jnlp-versions>Following is jnlp file
<jar href="lib/com.mastek.elixir.backoffice.client.jar" version="1.1"/>
  <jar href="lib/com.mastek.elixir.backoffice.common.jar" version="1.1"/>I',m getting following error...
Missing version field in response from server when accessing resource: (http://localhost:8888/elixir/lib/com.mastek.elixir.backoffice.client.jar, 1.1)Stacktrace
JNLPException[category: Download Error : Exception: null : 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)Can you tell me what is the problem? Am i missing something?

Hi everyone,
After a long fight................................I could use jardiff.
I'm using 2nd approach i.e version.xml file
What is given in JNLPServeletDownloads developers guide to add
<web-app>
     <servlet>
        <servlet-name>JnlpDownloadServlet</servlet-name>
        <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
     </servlet>
     <servlet-mapping>
        <servlet-name>JnlpDownloadServlet</servlet-name>
        <url-pattern>/app/*</url-pattern>
     </servlet-mapping>
  </web-app>It was not working, with above configuration,
I made changes as this n its working now.
<servlet-mapping>
        <servlet-name>JnlpDownloadServlet</servlet-name>
        <url-pattern>*.jnlp</url-pattern>
    </servlet-mapping>
     <servlet-mapping>
        <servlet-name>JnlpDownloadServlet</servlet-name>
        <url-pattern>*.jar</url-pattern>
    </servlet-mapping>Regards,
Shishirk

Similar Messages

  • [jnlp newbie] can jardiff update manifest information?

    Hi all
    ( not fluent with jnlp)
    suppose that package com.mybiz.things changes from version 1.2 to 1.3
    this information is specified in the MANIFEST of myapp.jar
    now myapp.jar is updated using jardiff
    how can jardiff change the package version information in the MANIFEST of myapp.jar?
    (bully option: consider the whole MANIFEST.MF and change it as any other file in the jar?)
    thanks

    JM.Kelly wrote:
    Solution found:
    ..After this everything worked 100%Note that there were errors in the original JNLP shown, that are probably still there. If a JNLP file is invalid it is anybody's guess as to how it will be parsed by a JWS client. To validate JNLP files as well as perform many other checks on the resources, point JaNeLA *(<- link)* at the main JNLP file.
    I am not saying that validation of the JNLP file will make shortcuts work on Mac. Do the Macs. run Java 1.6.0_18+? If so, shortcuts can be installed using methods that return success/failure, through the IntegrationService *(<- link).*

  • Multiple servers -- multiple Cache (JWS)

    Hi,
    I'm working on a Kana Software deployed with Java Web Start.
    Each time we change the web server (crash or ...) we have to download all soft components (jar, Jre ...) even if the user has already exactly the same files on his machine but under an other IP tree.
    Does anyone know how we could:
    - Use the same cache even if the web server changed
    OR/AND
    - Turn Off the "update check" of JWS and only use the IP address used as an argument in the JNLP File
    Thanks in advance.
    Xap
    Here is an extract of one of my JNLP files
    codebase="http://IP:port/xxxWebServer/
    <application-desc main-class="xxxxx">
    <argument>-serverlist</argument>
    <argument>http://IP:port/xxxxWebServer/servers.xml</argument>
    </application-desc>

    Hi! gauravgarg,
    I already have solution for JWS version control without using jardiff. But as i've already told you, I know how to make it works but i don't know if it proper to do this. So, if anyone here will kind enough to give me an advice, please....
    Ok. it's simple you just make a folder for each version you want. The directory should be somethings like :
    mainApp.jnlp
    \v1.0\mainApp.jar
    \v1.1\mainApp.jar
    \v1.2\mainApp.jar
    now, in mainApp.jnlp you just put the folder name in front of jar file.
    <jar href="\v1.0\mainApp.jar"/>
    Yeah. When you want to update just change jnlp file
    <jar href="\v1.1\mainApp.jar"/>
    and you can also change it back to \v1.0\ if user didn't clear cache or delete file in JWS's cache folder, they should automatically use the cache without download again.
    ummm I don't know if this explanation is understandable.. please reply me if you get it or not...
    Hope it works.
    Have more fun.
    Jeng

  • Alternative for Huge Update

    Hi,
    I have an application deployed with JAVA Web Start. The application download is a huge. I want to avoid the download first time as well as everytime the application is updated. Downloads works fine when within intranet but we want to support the same application over internet, where we would be downloading the application on the support PC through internet. In such scenario its a problem to download the entier application for every update. Moreover the jar that is sent as an update with every release is available with us.
    Is there some alternative method so that we need not download the application everytime there is an update but update the JAVA Web Start Cache locally??
    I have tried the vamp utility but it seems to be working only for the first time installation. Am i correct??
    Sachin

    Either split up your app into smaller pieces (more jar files) or setup your server to use jardiff (read the Java WebStart developers guide).This will allow you to send out only the changes instead of the entire app.

  • Using fonts when launching from JNLP

    Hello,
    I followed the directions in this link http://fxexperience.com/2010/05/how-to-embed-fonts/ and was able to add and use fonts in my javafx program when launched from Netbeans. But when I try to launch from JNLP, the fonts do not show up (the text shows up as Arial).
    Is there something special I need to do to access the fonts in the jar and utilize them?
    As the link directed I created a fonts folder in my src folder where I store all the .ttf file, and created a fonts.mf file in META-INF where I map a name to the font file. Works fine when launching from netbeans.
    thanks in advance for your help
    jose

    I've found the problem! It's the timestamp for the JNLP file. But unfortunately I can't figure out the workaround as yet.
    To explain the problem it would be best to start with my application's installation procedure:
    The applcation is installed by way of CD (using javaws -import) as downloading an 8mb jar file over dialup is unwieldy. Subsequent updates are retrieved from the server. Jardiffs are sent back to the webstart client so updates over dialup becomes manageble.
    The application jar file in the CD is version 1.0. Let's say the server is now at version 1.3 with the timestamp 2005-10-01 00:00:00.
    The user installs the application using the CD today which gives his JNLP file the timestamp of 2005-10-03 00:00:00.
    When the application is started, it calls the server to check for updates. Although the JNLP file returned from the server specifically states that the current version is at version 1.3 Java Web Start insists on using the timestamp to perform the comparison first.
    Since the timestamp of the JNLP file in the user's pc is dated later than the JNLP file in the server, Java Web Start ignores the version checking and assumes that the application in the server is the latest and greatest.
    Has anyone encountered a similiar situation? The only solution I can think of is to hack the JNLPDownloadServlet to return a date that's way in the future so that Java Web Start picks up the changes... sigh.
    Is it possible to disable the timestamp checking for the JNLP files? As again, help is mucho appreciated and there are 10 duke dollars at stake too :)

  • Java, Jardiff Version Difference

    HI,
    we are using JAva Web Start to launch our application. in our application, we also have used version based implementarion. it is working fine & only JArdiff is getting returned.
    However, there are some of our JARs which get automatically updated. If somebody from the front end generates the property file, JAR gets updated with required changes in version & jnlp change also. Generation of property files is a frequent thing. So if anybody for long time does not log in, the version of propery JAR on his machine will be much older than the latest version.
    whenever such problem occurs, sometimes JArDiff doesn't wrk properly. It gives the message " missing signed entries" On checking for signing files, we found those files are intact & also get downloaded on client machine But after that JWS stalls giving above message. This problem occurs if the version difference is too much else it does not happen.
    Also, server log shows that JARDiff is returned perfectly. I'm not getting why exactly the problem exixts & why it occurs only at few client machines. Can anybody throw light on this? pls..

    Can you tell us what versions of Java Web Strat and Java are you running ?
    /Dietz

  • Disable jardiff for version based downloads

    We have a mix of third party jars and our own application's jar files.
    We want to specify versions for all jars, but disable jardiff generation for the third party jars.
    We want to use versions for all jars in order to prevent network access to check if the files have been updated due to network latency issues and Webstart's low tolerance for network problems.
    Can jardiff be disabled for certain jars?

    If you are using version.xml file, then you can disable jardiff generation by keeping only the current version's resource in the version file. For jardiff file to be generated, the version.xml file should contain the current version and previous versions resource tags.
    HTH,
    Amit

  • Why does not my JarDiff work?

    We are using JRE 1.6,but I have a question about versioning. When Versioning is used, does webstart still download the entire jar file if a new version is found on the web server. I think with incremental updates, you can have webstart only retrieve the updated classes but I am under the impression that with standard versioning, webstart will take the whole jar if a new version is found.
    When java web start has version 1.0 and wants 1.2 it makes the request:
    xxx.jar version-id 1.2 current-version-id 1.0
    but I can't find "current-version-id 1.0" in requestquerystring, Why?
    my jnlp file:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="http://localhost:8087/zjf/iBanker/webstart/" href="abs40.jnlp">
         <information>
              <title>ABS40 Run</title>
              <vendor>NANTIAN</vendor>
              <description>Abs40 System (Signed)</description>
              <shortcut>
    <desktop/>
    </shortcut>
    </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <j2se version="1.5+"/>
    <jar href="jars/signeds/abs40.jar" main="true" download="lazy" version="1.2"/>
         </resources>
         <application-desc main-class="com.nantian.abs40.test.tools.LayoutTest">
         </application-desc>
    </jnlp>
    my web.xml file:
    <web-app>
         <servlet>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
    <!--
    <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
    -->
    <init-param>
              <param-name>
              logLevel
              </param-name>
              <param-value>
              DEBUG
              </param-value>
         </init-param>
         <init-param>
              <param-name>
              logPath
              </param-name>
              <param-value>
              D:\jnlpdownloadservlet.log
              </param-value>
         </init-param>
              <init-param>
         <param-name>
         jnlp-extension
         </param-name>
         <param-value>
         .jnlp
         </param-value>
         </init-param>
              <init-param>
         <param-name>
         jar-extension
         </param-name>
         <param-value>
         .jar
         </param-value>
         </init-param>
    </servlet>
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
         <servlet-name>JnlpDownloadServlet</servlet-name>
    <url-pattern>/ibanker/*</url-pattern>
    </servlet-mapping>
    <mime-mapping>
    <extension>jar</extension>
    <mime-type>application/x-java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <mime-mapping>
         <extension>jardiff</extension>
         <mime-type>application/x-java-archive-diff</mime-type>
    </mime-mapping>
    </web-app>
    I was wondering if anyone can confirm this for me.
    Also, has anyone had problems signing jars whle using versioning?
    Regards,
    qujbin

    I would try force quitting the app via the multitasking bar, restarting (power cycling your phone), and then resetting the phone (holding sleep/wake and home button for about 5 seconds or until it shuts off) first.

  • Using the JnlpServlet

    Hi, I want to use the jnlpServlet to deploy an application; but I also need dynamic arguments
    I mean, currently I send the arguments to a servlet (using POST), and I add those parameters to the jnlp
    Is there any way to do it using the jnlpServlet, so I can use the jardiff feature??
    Thanks

    The source to the JNLPServlet is posted in the JDK samples directory, so you can modify this servlet to also do what your servlet is doing.
    /Andy

  • Jardiff Error

    For some of my third party jar files which are versioned, I get the following exception at application launch from Webstart:
    Exception:
    JNLPException[category: Download Error : Exception: java.util.zip.ZipException: duplicate entry: inetsoft/report/images/printer2.gif : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.applyPatch(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.access$1(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.getResource(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)
    Wrapped Exception:
    java.util.zip.ZipException: duplicate entry: inetsoft/report/images/printer2.gif
         at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
         at java.util.jar.JarOutputStream.putNextEntry(Unknown Source)
         at com.sun.javaws.jardiff.JarDiffPatcher.writeEntry(Unknown Source)
         at com.sun.javaws.jardiff.JarDiffPatcher.writeEntry(Unknown Source)
         at com.sun.javaws.jardiff.JarDiffPatcher.applyPatch(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.applyPatch(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.access$1(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.getResource(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)
    Is there a way to disable jardiff for these?
    Thanks,

    Windows invokes an application based on it's associated mime-type or file extension. When you double-click a file on your PC, Windows uses the file extension to find the associated application. For .jnlp files this is Web Start if you've installed WebStart . When you download a resource via the Web, Windows uses the mime type specified in the HTTP response for finding the associated application. For mime types application/jnlp this is Web Start. If the web server does not set the content type correctly, then the browser will not know that the file returned is of type application/jnlp. Therefore it cannot be associated with Web Start and it follows it's default behaivor...opening the file itself for you to see. To fix this problem you must specify the jnlp mime type in your web server. The WebStart documentation has information on how to do this. There are also many, many entries on this forum with descriptions on how to set the mime type on various web servers.

  • JWS - JNLP - icon using .ico-files?

    After reading the enhancements here http://download.oracle.com/javase/6/docs/technotes/guides/javaws/enhancements6.html
    I tried to use .ICO-files in the JNLP-<icon>-Tag without success. Also .PNG-files don't work.
    The search with google also found only questions but no answers.
    Additionally I only found samples using .GIF-files!
    We want to use "rounded" pictures for desktop links, thus we need a format with transparent colors support.
    Additionally we want to have the ability to use different sizes depending on desktop settings.
    The .ICO-file format - out of the box - supports both of that!
    Does anyone has a RUNNING sample-JNLP using an .ICO-file or .PNG-file? Or can point me to a solution to that problem?
    Running: Java 1.6.0.22, Windows XP & Windows 7
    Thanks in advance

    Hello,
    have you took the application/x-java-archive-diff MIME type into your tomcat-web.xml?
    I have found this in the jnlp-specifications:
    >
    6.3 Version-based Download Protocol
    For the version-based download protocol, all resources are uniquely identified by a URL/version-id pair. Thus, a JNLP Client can at any given time request a specific version of a resource located at a specific URL.
    The JNLP Client issues an HTTP GET request that includes the specific version of the resource that it needs. The request includes the field version-id, which specifies the requested version. For example, given the following jar element:
    <jar href="http://www.mysite.com/b.jar" version="2.3+"/>
    then the JNLP Client must issue the following HTTP GET request14:
    http://www.mysite.com/c.jar?version-id=2.3%2B
    The JNLP Client must examine the HTTP response status code and MIME type to determine if the result was successful. The valid responses are described in section 6.1.2. For the above jar element, the application/x-java-archive-diff MIME type cannot be returned. It can only be returned for incremental requests.
    The version string used in the request is not necessarily exact, e.g., 2.3+. The Web server must specify the exact version-id of the resource that is returned in the response by setting the HTTP header field: x-java-jnlp-version-id. The exact version returned must be one that matches the requested version string.
    6.3.1 Incremental Updates for JAR files
    JNLP allows incremental updates to be applied to JAR files. Typically, downloading an incremental update will be much faster than downloading the new version. Incremental updates are distributed in the form of JARDiff files, which are described in Appendix B.
    If the JNLP Client has a previous version of a given JAR file already cached, e.g., version 2.2, then this fact can be specified in the request. The Web server can then potentially provide an incremental update that can be applied to the existing file, instead of returning the contents of the new file.
    An incremental update is enabled by providing information about the version that is already cached by the JNLP Client in the HTTP request. The field current-version-id is used to specify the existing local version. For example:
    http://www.mysite.com/c.jar?version-id=2.3%2B&current-version-id=2.2
    The current-version-id must always be exact. If several versions of a given resource are in the cache, then the highest version-id that is lower than the requested version should be used. The Web server is not required to return an incremental update, but could just return the requested JAR file.
    The returned contents of the response are the same as for the request without the current-version-id field, except that a JARDiff file might be returned. In that case, the response MIME type must be application/x-java-archive-diff.
    >
    MfG
    hansmueller

  • How do I have JnlpDownloadServlet sign the .jardiff?

    Hi,
    I am deploying a webstart application as a .war thats using the JNLP versioning conventions. We'll call the app jar:
         app__V1.0.0.jar
    It's undergone repacking / signing / repacking / signing / packing successfully and is deployed successfully via the .war to:
         app_V1.0.0.jar.pack.gz
    It deploys via the JnlpDownloadServlet just fine! However, I now have a new .jar version:
         app__V1.0.1.jar
    Again, it deploys superbly if the WebStart client does not have the V1.0.0 app. If your are updating the V1.0.0 app though the following happens...
    JnlpDownloadServlet creates a .jardiff (as I had hoped) but the client chokes on it as the .jardiff has not been signed.
    How do I have JnlpDownloadServlet sign the .jardiff?
    What configuration parameters/environmental variables do I need to set. I am afraid I can't find anything on this subject out there!
    Thanks in advance!
    Martin

    I'm not sure how your are going about deploying updates.... What we do, is just put the updated version of our jar, alongside the old version.... For example:
    MyApp__V1.0.0.jar
    MyApp__V1.0.1.jar
    MyApp__V1.0.2.jar
    in this example, all three jars are signed. The download servlet just finds the version, that the client has installed, and then gets the differences between that and the latest. And just sends these differences. This difference file does not need to be signed.
    Cheers.

  • Cannot verify signature block file using BC

    I get the below exception when verifying a signed jar.The public key is from the certificate created from the Bouncy Castle's Provider
    java.lang.SecurityException: cannot verify signature block file META-INF/LVL1
         at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:202)
         at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176)
         at java.util.jar.JarVerifier.processEntry(JarVerifier.java:276)
    Signature algorithm used is : "SHA1WithRSAEncryption"
    LVL1.SF and LVL1.RSA are in place inside the jar.No issues in creating the certificate and signing the jar as well.
    The provider is added to the Security thro security.addprovider() dynamically.
    Any pointers to resolve this issue ?

    I have JRE 1.5.0_14 in the client machine.
    Once this exception comes, no matter how many times I tried to relaunch the application same exception (cannot verify signature block is shown. Once i restart the server, its working fine.
    Regarding jardiff, Yes. we use it.
    Also, this exception is not shown on every machine which are trying to download same update. Only on few..
    Any idea regarding this, please share it.
    Chakri
    Edited by: chakriv on Mar 22, 2010 9:02 PM

  • How do I use Edge Web Fonts with Muse?

    How do I use Edge Web Fonts with Muse - is it an update to load, a stand alone, how does it interface with Muse? I've updated to CC but have no info on this.

    Hello,
    Is there a reason why you want to use Edge Web Fonts with Adobe Muse?
    Assuming you wish to improve typography of your web pages, you should know that Muse is fully integrated with Typekit. This allows you to access and apply over 500 web fonts from within Muse. Here's how you do it:
    Select a text component within Muse, and click the Text drop-down.
    Select Add Web Fonts option, to pop-open the Add Web Fonts dialog.
    Browse and apply fonts per your design needs.
    Muse also allows you to create paragraph styles that you can save and apply to chunks of text, a la InDesign. Watch this video for more information: http://tv.adobe.com/watch/muse-feature-tour/using-typekit-with-adobe-muse/
    Also take a look at these help files to see if they help you:
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-1.html
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-2.html
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-3.html
    Hope this helps!
    Regards,
    Suhas Yogin

  • How can multiple family members use one account?

    My children have iphones, ipads, ipods and mac books, my problem is how do you use home sharing with the devices and not get each others data.  My Husband just added his iphone to the account and got all of my daughters contacts.  I understand they could have there own accounts but if i buy music on itunes and both children want the same song, I don't feel i should have to pay for it twice.  Is there away we can have home sharing on the devices and they can pick and choose what they want? and is this icloud going to make it harder to keep their devices seperate?

    My children have iphones, ipads, ipods and mac books, my problem is how do you use home sharing with the devices and not get each others data.  My Husband just added his iphone to the account and got all of my daughters contacts.  I understand they could have there own accounts but if i buy music on itunes and both children want the same song, I don't feel i should have to pay for it twice.  Is there away we can have home sharing on the devices and they can pick and choose what they want? and is this icloud going to make it harder to keep their devices seperate?

Maybe you are looking for