签名的Jar可以作为可执行文件运行吗? [英] Can a signed Jar be run as an executable?

查看:105
本文介绍了签名的Jar可以作为可执行文件运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问,因为我有一个运行的未签名jar和一个没有签名的签名版本。查看清单,我看不到签名的主要类别。

I ask because I have an unsigned jar that runs and a signed version that doesn't. Looking at the manifests, I see no main class thing for the signed one.

我是否必须从网络开始运行已签名的jar?

Do I have to run a signed jar from web start?

推荐答案

不一定,但是如果你没有Main-class:在清单中,你不能将它作为可执行文件运行。如果你知道主类,你可以使用java可执行文件运行它,例如

Not necessarily, but if you don't have a Main-class: in the manifest, you can't run it as an executable. If you know the main class, you can run it using the java executable, eg

$ java -classpath ./myjar.jar MyClass

这篇关于签名的Jar可以作为可执行文件运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆