简体   繁体   English

Eclipse e4应用程序无法在Java Web Start中启动

[英]Eclipse e4 application does not start in Java Web start

I have written an Eclipse E4 application. 我已经编写了一个Eclipse E4应用程序。 Now we need to publish this to the users with Java Web Start. 现在,我们需要使用Java Web Start将其发布给用户。 I found a "how to" on the Eclipse website . 我在Eclipse网站上找到了“操作方法”。 The project has been exported correctly (signed and jnlp files are created). 项目已正确导出(已创建签名和jnlp文件)。 Now when I start the application using Web Start everything looks good until the application itself need to start. 现在,当我使用Web Start启动应用程序时,一切看起来不错,直到需要启动应用程序本身为止。 No errors are given and nothing can be found in the Web Start logs. 没有给出错误,并且在Web Start日志中找不到任何内容。

This is the JNLP main page that we use: 这是我们使用的JNLP主页:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp 
    spec="1.0+" 
    codebase="http://localhost:80" 
    href="test.jnlp"> <!-- URL to the site containing the jnlp application. It should match the value used on  export. Href, the name of this file -->
  <information>
    <!-- user readable name of the application -->
    <title> Test Application </title>  
    <!-- vendor name -->
    <vendor>My company</vendor>
    <!-- vendor homepage --> 
    <homepage href="My company website" /> 
    <!-- product description -->
    <description></description> 
    <icon kind="splash" href="splash.gif"/>
  </information>

  <!--request all permissions from the application. This does not change-->
  <security>
    <all-permissions/>
  </security>

  <!-- The name of the main class to execute. This does not change-->
  <application-desc main-class="org.eclipse.equinox.launcher.WebStartMain">
    <argument>-nosplash</argument>
  </application-desc>

  <resources>
    <!-- Reference to the launcher jar. The version segment must be updated to the version being used-->
    <jar href="plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417.jar"/>

    <!-- Reference to all the plugins and features constituting the application -->
    <!-- Here we are referring to the wrapper feature since it transitively refers to all the other plug-ins  necessary -->
    <extension 
        name="Wrapper feature"
        href="features/CR_IT_Client_Feature_1.0.0.201608230817.jnlp"/>

    <!-- Information usually specified in the config.ini -->

    <!-- The id of the product to run, like found in the overview page of the product editor -->
    <property 
        name="eclipse.product" 
        value="CR-IT System Platform.product"/>
  </resources>

  <!-- Indicate on a platform basis which JRE to use --> 
  <resources os="Mac">
    <j2se version="1.5+" java-vm-args="-XstartOnFirstThread"/>
  </resources>
  <resources os="Windows">
    <j2se version="1.4+"/>
  </resources>
  <resources os="Linux">
    <j2se version="1.4+"/>
  </resources>
</jnlp>

I did some researched and did found a log file of web start. 我做了一些研究,并找到了Web Start的日志文件。 In the log there you can find the error: "Missing Permissions manifest attribute in main jar: http://localhost:80/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar ". 在日志中,您可以找到错误:“主jar中缺少权限清单属性: http:// localhost:80 / plugins / org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar ”。 My manifest file looks like: 我的清单文件如下所示:

Manifest-Version: 1.0
Permissions: all-permissions
Application-Name: CR-IT System Platform
Bundle-ManifestVersion: 2
Bundle-Name: CR-IT System Platform
Bundle-SymbolicName: CR-IT_client;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.ac.client.eclipse.Activator
Bundle-Vendor: AC
Require-Bundle: javax.inject;bundle-version="1.0.0",
 org.eclipse.core.runtime;bundle-version="3.11.1",
 org.eclipse.swt;bundle-version="3.104.2",
 org.eclipse.e4.ui.model.workbench;bundle-version="1.1.100",
 org.eclipse.jface;bundle-version="3.11.1",
 org.eclipse.e4.ui.services;bundle-version="1.2.0",
 org.eclipse.e4.ui.workbench;bundle-version="1.3.1",
 org.eclipse.e4.core.di;bundle-version="1.5.0",
 org.eclipse.e4.ui.di;bundle-version="1.1.0",
 org.eclipse.e4.core.contexts;bundle-version="1.4.0",
 org.eclipse.nebula.widgets.pshelf;bundle-version="1.1.0",
 org.eclipse.equinox.launcher;bundle-version="1.3.100",
 org.eclipse.e4.core.services;bundle-version="2.0.0",
 org.eclipse.e4.tools.css.spy;bundle-version="0.12.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.osgi.framework;version="1.3.0"
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
 swing2swt.jar,
 libs/json-simple-1.1.1.jar,
 libs/gettext-commons-0.9.8.jar,
 libs/java_websocket.jar

Does someone know a sollution for this strange issue? 有人知道解决这个奇怪问题的方法吗?

Changed the manefest file inside the jar. 更改了罐子中的清单文件。 This by doing jar -ufm 通过执行jar -ufm

The changes that I added are: Permissions: all-permissions 我添加的更改是:权限:所有权限

Codebase: *
Application-Name: <<App name>>
Trusted-Only: true
Trusted-Library: true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM