how to convert exe file to .jar file? [duplicate]

ⅰ亾dé卋堺 提交于 2019-12-24 01:29:34

问题


Possible Duplicate:
How can I extract java exe to jar

Is there a way to convert exe to jar file? for example i have an exe file that was written with java first, then i convert to jar file then exe file. Can i convert it back to jar file? 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? I searched many sites but couldn't come up with the answer yet. Is it impossible or not? Does any one know a program to covert EXE files to JAR files, I know there are a lot to do the opposite.


回答1:


You cannot "convert" it, you can try to extract the JAR file which is inside, but:

  1. some Java-to-EXE packagers don't actually embed JAR files into EXE files, but for example they embed .class files or use other techniques;
  2. some Java-to-EXE packagers try to 'protect' the intellectual property of the developer by making it difficult to recover the JAR and/or the .class files.
  3. some Java-to-EXE compilers do actually compile the code into an executable. So no luck.

I'd start using an EXE Resource Inspector, like Resource Hacker. I have to inform you that extracting resouces from an executable you didn't create yourself may be illegal, depending on the license it is released with.




回答2:


Conversion of jar to exe is highly implementation dependent and so is the reverse conversion procedure.

Edit: This question has been answered here: How can I extract java exe to jar



来源:https://stackoverflow.com/questions/7760126/how-to-convert-exe-file-to-jar-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!