문제

We use java Webstart to deploy a java application on our intranet. The application receives frequent updates. Once in awhile a user will launch the application from their desktop icon after we have updated the JARs / WAR on the webserver (timestamp changed) and Java Webstart will launch the old version instead of downloading a new one.

Here is a paste of our JNLP, as you can see offline-allowed is on, but update check always and policy always. Also, download flag is eager. From my understanding these options should always result in a check of cache against timestamp on server and a download of the JAR file.

I'm starting to get frustrated with Webstart! Has anyone seen similiar problems? Any solutions? I'm getting sick of walking people through clearing their webstart cache manually every third or fifth update.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
<jnlp spec="1.0+" codebase="$$codebase" href="$$name">
  <information>
    <title>TITLE</title>

    <vendor>VENDOR</vendor>

    <description>Our Utility Application</description>

    <description kind="short">Our Utility Application PRD</description>
    <icon href="images/util_icon.png" height="64" width="64"/>
    <offline-allowed/>
    <shortcut online="true">
      <desktop />
      <menu submenu="Utility Apps"/>
    </shortcut>
  </information>

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

  <update check="always" policy="always" />

  <resources>
    <!-- requires 1.6+ -->
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" java-vm-args="-ea" initial-heap-size="128m" max-heap-size="512m" />

    <!-- application code, download jar before we start. -->
    <jar href="OurUpdatedJarName.jar" main="true" download="eager" />

    <property name="configfile" value="updatedJarName.config" />
  </resources>

  <application-desc main-class="main.Client">
    <argument>-D</argument> 
  </application-desc>
</jnlp>
도움이 되었습니까?

해결책

You might have solved the issue - But jnlp spec="1.0+" - The element is supported only after jnlp spec 6.0+. Probably thats is one of the reasons for your updates failing.

다른 팁

BDC 서비스 응용 프로그램이 아닌 보안 저장소 서비스 응용 프로그램 문제와 같습니다.

보안 저장소 응용 프로그램 ID가 해당 멤버가 있는지 확인하십시오 (Windows ID를 가장하는 데 사용한 ID).Central Admin - Secure Store Service - 관리 - 대상 응용 프로그램을 클릭하십시오 - 다음을 클릭하고 외부 콘텐츠 형식에 액세스 할 수있는 권한이 필요한 모든 사용자를 "멤버"로 추가하십시오.

여기에 이미지 설명 여기에 이미지 설명을 입력하십시오

I had the same issues as yours and solved it by doing the following:

  1. Change

    <jar href="OurUpdatedJarName.jar" ...

    to

    <jar href="OurUpdatedJarName-$VERSION.jar" ...

  2. Put $VERSION into the <a href="foo-$VERSION.jnlp">Run</a>

We automatically update $VERSION for every deployment.

I know it's an ugly solution but it's one that works for us everytime.

this problem is caused by offline-allowed tag.

Per JNLP spec

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. Given a reasonably fast server connection, the latest version of the application will usually be run, but it is not guaranteed. The application, however, can be run offline.

we have distributed java web start applications over a dozen countries and when we have found that the application wasn't updating correctly it was for a miss-configuration of the county net, or in the network settings of user computer, mostly the proxy. In our central officines in spain java web start allways work ok.

I've been using the java webstart nextx.jar clone. I traced my not updating JAR issue to the use of the URLConnection.getLastUpdated() method. Since it uses the HEAD method to get the lastUpdated of the filename, this is the reason why sometimes it does not download due to caching of the getLastUpdated(). We decided to use our own method of refreshing our application as webstart is flawed.

무인 서비스 계정은 모든 인증 된 사용자에게 동등한 데이터 액세스를 제공하는 범용 계정입니다.모든 서비스 또는 각 서비스 응용 프로그램에 대해 하나의 계정을 사용할 수 있습니다.

그것이 서비스 앱의 특정 데이터 소스에 제한하려는 경우 Secuirty에 의존한다면 전용 계정이 필요합니다. 그렇지 않으면 하나를 모두 사용할 수 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top