我们决定按照 this 对我们的 JNLP 文件进行签名神谕指南。由于我们有不同的 JNLP,我们采用了第二种方法(使用 JNLP 模板签署 JAR 文件)。
这是我们提取到模板中的代码:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="*" href="*">
<information>
<title>*</title>
<vendor>My vendor</vendor>
<description>My description</description>
<icon href="splash.jpg" kind="splash" width="700" height="400" size="115258"/>
<offline-allowed />
<shortcut>
<menu submenu="My submenu"/>
</shortcut>
</information>
<security>
<all-permissions/>
</security>
<resources locale="en es ja">
<j2se version="1.6+" initial-heap-size="128m" max-heap-size="384m" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="myjar.jar" main="true" download="lazy" part="core" size="*"/>
<jar href="lib/commons-lang-2.6.jar" download="lazy" part="commons" size="297085"/>
...
<jar href="lib/trident-6.0.jar" download="lazy" part="core" size="114496"/>
<property name="jnlp.myProperty" value="*"/>
<property name="log4j.configuration" value="*"/>
</resources>
<application-desc main-class="com.mycom.myapp.MyClass">
</application-desc>
</jnlp>
...这是我们实际使用的 JNLP 之一:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://mylocation.mycom.com/jnlp/myapp/" href="myapp.jnlp">
<information>
<title>My App - Production version</title>
<vendor>My vendor</vendor>
<description>My description</description>
<icon href="splash.jpg" kind="splash" width="700" height="400" size="115258"/>
<offline-allowed />
<shortcut>
<menu submenu="My submenu"/>
</shortcut>
</information>
<security>
<all-permissions/>
</security>
<resources locale="en es ja">
<j2se version="1.6+" initial-heap-size="128m" max-heap-size="384m" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="myjar.jar" main="true" download="lazy" part="core" size="4189501"/>
<jar href="lib/commons-lang-2.6.jar" download="lazy" part="commons" size="297085"/>
...
<jar href="lib/trident-6.0.jar" download="lazy" part="core" size="114496"/>
<property name="jnlp.myProperty" value="http://mylocation.mycom.com/jnlp/myapp/MyApp.properties"/>
<property name="log4j.configuration" value="http://mylocation.mycom.com/jnlp/myapp/log4j.xml"/>
</resources>
<application-desc main-class="com.mycom.myapp.MyClass">
</application-desc>
</jnlp>
请注意,我将通配符 (*) 用于:
我将模板放在适当的 JNLP-INF 文件夹中(也有适当的名称),然后我们签署了 JAR。但是,我们不断收到带有以下消息的 JNLPSigningException:
Failed to validate signing of launch file. The signed version does not match the downloaded version.
有谁知道我错过了什么吗?
最佳答案
我遇到了同样的问题,但事实证明我的 src/JNLP-INF/APPLICATION.JNLP签名中包含的文件 .jar文件(用作签名的 jnlp 文件)不同于 application.jnlp在 <applet> 中定义的 Web 应用程序中使用的文件标签。一旦我让它们相同,错误就消失了。
注意在 .jar 中使用签名的 JNLP 文件文件,文件需要准确命名 JNLP-INF/APPLICATION.JNLP因为它用作模板以匹配在应用程序中调用的 jnlp:
关于java - 启动由模板签名的 JNLP 时继续获取 "JNLPSigningException [Failed to validate signing of launch file]",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19528656/
我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar
我正在使用puppet为ruby程序提供一组常量。我需要提供一组主机名,我的程序将对其进行迭代。在我之前使用的bash脚本中,我只是将它作为一个puppet变量hosts=>"host1,host2"我将其提供给bash脚本作为HOSTS=显然这对ruby不太适用——我需要它的格式hosts=["host1","host2"]自从phosts和putsmy_array.inspect提供输出["host1","host2"]我希望使用其中之一。不幸的是,我终其一生都无法弄清楚如何让它发挥作用。我尝试了以下各项:我发现某处他们指出我需要在函数调用前放置“function_”……这
我真的很习惯使用Ruby编写以下代码:my_hash={}my_hash['test']=1Java中对应的数据结构是什么? 最佳答案 HashMapmap=newHashMap();map.put("test",1);我假设? 关于java-等价于Java中的RubyHash,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/22737685/
最近,当我启动我的Rails服务器时,我收到了一长串警告。虽然它不影响我的应用程序,但我想知道如何解决这些警告。我的估计是imagemagick以某种方式被调用了两次?当我在警告前后检查我的git日志时。我想知道如何解决这个问题。-bcrypt-ruby(3.1.2)-better_errors(1.0.1)+bcrypt(3.1.7)+bcrypt-ruby(3.1.5)-bcrypt(>=3.1.3)+better_errors(1.1.0)bcrypt和imagemagick有关系吗?/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ru
我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test
我正在尝试从Postgresql表(table1)中获取数据,该表由另一个相关表(property)的字段(table2)过滤。在纯SQL中,我会这样编写查询:SELECT*FROMtable1JOINtable2USING(table2_id)WHEREtable2.propertyLIKE'query%'这工作正常:scope:my_scope,->(query){includes(:table2).where("table2.property":query)}但我真正需要的是使用LIKE运算符进行过滤,而不是严格相等。然而,这是行不通的:scope:my_scope,->(que
我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub