tags:

views:

2931

answers:

2

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)

+5  A: 

It depends how the exe has been built:

  • 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.
VonC
maybe try to run it through a java decompiler
Dan
+1  A: 

If your application was wrapped using JSmooth, you can look in your default temp directory (C:\Documents and Settings\Username\Local Settings\Temp) while the application is running.

Open a windows explorer window to the temp dir, then start up your application. You should see a jar file show up (Temp#.jar). Just make a copy of this and you should be on your way.

James Van Huis