my dog learned polymorphism
The moose likes Java in General and the fly likes Convert .jar to .exe file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Convert .jar to .exe file" Watch "Convert .jar to .exe file" New topic
Author

Convert .jar to .exe file

Hewa Naimanage Sumedha Amalka
Greenhorn

Joined: Oct 31, 2006
Posts: 19
Hai guys,
I have a simple problem about converting .jar file to .exe file, the thing is I am not familiar in C or C# (Infact I dont know any code in C or C#)so need some thing full detailed guide ness about the process,

If there is any convertible software�s available please tell me I have tried with JSmoother but it did not work, so if there is a software for this task please send some information about it

Thanks


SCJP 1.4 71%, SCWCD 1.5 84%, SCBCD 90%, SCMAD 98%
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6592
    
    1

I dont know of any software that can do that. I dont think it can be done, but thats just a strong hunch. The whole point behind a jar is that you can run it in any operating system and it is delivered as a single package.

You can execute the package by associating the jar extension with java runtime in windows.


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Hi,
1st let me try to clarify one small point, WHY do you want to do this? If you did some googling.. you would probably find that many articles simpling saying don't do this cause this truly destroys the Java's platform independence feature. If you want the application to execute when the .jar is double clicked, certainly .jar can provide this facility. The following article will give your more details Article. Hope this helps you in some way. Regards..


SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35257
    
    7
While there are compilers that will compile Java source or class files into native code, Johns point is a good one: a jar file is double-clickable like an executable. What benefit are you looking for in a native executable that you don't get with a jar file?

I'm not sure what C and C# have to do with this - are you trying to convert Java source code into C source code?


Android appsImageJ pluginsJava web charts
Hewa Naimanage Sumedha Amalka
Greenhorn

Joined: Oct 31, 2006
Posts: 19
Guys, I can understand what are you trying to explain but the thing is the .jar file can not be run a machine which does not have a JVM !

So, in my project, I very much needed to do this task !

I have heard some programmers says this can be done with a simple code of C or C# programming that�s why I asked is there wya to do this task in C or C#.

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35257
    
    7
Have a look at GCJ, which can compile Java source code and byte code to native code.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Convert .jar to .exe file
 
Similar Threads
java project exe
Installing Tomcat.
How to make install setup of java project
How are java programs distributed ?
Win32 exe wrappers for .jar or .class files