如何将java exe解压缩到jar [英] How can I extract java exe to jar

查看:344
本文介绍了如何将java exe解压缩到jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我知道的exe是用java编写的。我知道java程序可以制作成exe,并且有工具将jar文件转换为exe但是可以转换回来吗? AFAIK jar文件可以在任何可以运行java的平台上运行,我想在mac上使用windows编译的java程序而不使用任何额外的虚拟化(wine,vmware)

I have an exe that I know was written in java. I understand that java programs can be made into an exe and there are tools to convert jar files to exe but is it possible to convert back? AFAIK jar files can be run on any platform that can run java and I would like to use a windows compiled java program on mac without using any extra virtualisation (wine,vmware)

推荐答案

这取决于如何构建exe:

It depends how the exe has been built:


  • 如果它只是简单包装,像 JSmooth 这样的工具(正如主题),同样的工具可以提取jar

  • 如果已经编译了,例如gcj(如由这个问题说明,...我不确定。

  • 如果它是由静态编译器编译的(或 AOT - 提前 - ),我相信不是可以提取orignial罐子。

  • If it has simply wrapped, with a tool like JSmooth (as suggested by this thread), the same tool can extract the jar
  • If it it has been compiled, with for instance gcj (as illustrated by this question),... I am not sure.
  • If it has been compiled by a static compiler (or AOT - Ahead-Of-Time -), I believe it is not possible to extract the orignial jars.

这篇关于如何将java exe解压缩到jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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