2014-07-09 4 views
1

Java Web Start를 사용하여 실행되는 Java 응용 프로그램 (JAR 파일)이 있습니다. 실제로 실행중인 응용 프로그램의 측면에서 모두 위즐입니다.Java Webstart를 사용하여 바탕 화면 바로 가기 만들기

JWS가 설치 한 바로 가기가 작동하지 않는 이유는 무엇입니까? 여기

<information> 
    <title>My App</title> 
    <vendor>My Company</vendor> 
    <homepage href="http://example.com"/> 
    <description>My Description</description> 
    <description kind="short">desc short</description> 
    <icon href="splash.png" kind="splash"/> 
    <icon kind="shortcut" href="icon.png" /> 
    <shortcut online="false" install="true"> 
     <desktop/> 
     <menu submenu="My APP"/> 
    </shortcut> 
</information> 

는 지금은 하나의 큰 문제는 바로 가기가 우리의 IT 정책에 의해 차단 설치할 것을 알고 내 JNLP 파일 <information> 태그입니다. 나는 내가의 Javaws 도구에서 그 일을 시도했지만 그 중 하나가 작동하지 않았다 자바 캐시 뷰어

에서 직접

enter image description here

그것을 할 경우

Install Blocked

바로 가기 설치 않습니다.

javaws -verbose -import -silent -shortcut my-file.jnlp 

응용 프로그램을 배포 할 때 자동으로 바로 가기를 설치할 수 있도록하려면 어떻게해야합니까?

답변

0

우리는 또한 JNLP 표기법에 바로 가기를 만드는 몇 가지 문제가있다, 그래서이 코드를 수행합니다

public static final String JAVAXJNLP_INTEGRATION_SERVICE = "javax.jnlp.IntegrationService"; 

public static void criaAtalhosWebStart() { 
    IntegrationService integ; 
    try { 
     integ = (IntegrationService) ServiceManager.lookup(JAVAXJNLP_INTEGRATION_SERVICE); 
     if (integ != null) { 
      if (!integ.hasDesktopShortcut() || !integ.hasMenuShortcut()) { 
       integ.requestShortcut(true, true, "Shorcut Label"); 
      } 
     } 
    } catch (UnavailableServiceException ex) { 
     System.out.println("Error in creating shorcut: " + ex.getMessage()); 
    } 
} 

이것은 jnlp.jar에 의해 제공됩니다 JNLP 통합 서비스를 사용합니다. 이 jar 파일은 JRE와 함께 번들로 제공되므로 빌드 프로세스를 구성해야 찾아 낼 수 있지만 클라이언트에 제공 할 필요는 없습니다.

관련 문제