Solved

Conversion of Java to a *.Exe

Posted on 2004-08-11
17
216 Views
Last Modified: 2010-03-31
Hi

Just to ask you expert, if i got a java program and i always need t JBuilder to run it before i can use, is there any program tat can convert the java to a exe file where by i can double click and it will run. No need a Jbuilder to run it

James2
0
Comment
Question by:xxxmen
  • 4
  • 3
  • 2
  • +2
17 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 50 total points
ID: 11781019
You do not need to make it an .exe in order to run it with a double click, besides making it an exe breaks the concept of run-anywhere java.

YOu can bundle it in a jar file using a manifest thgat indicates the main class and it will run with a double click:

http://java.sun.com/docs/books/tutorial/jar/basics/manifest.html

0
 
LVL 36

Expert Comment

by:Zyloch
ID: 11781024
Hi

The whole point of Java is so it's platform independant. If you must, this site has a list of Java compilers (just click the top two links, one for Native Compilers and the other for Bytecode compilers. There are some more info at the bottom links).

http://www.geocities.com/marcoschmidt.geo/jcomp.html#native

However, it may be a lot better to make a JAR file:

http://java.sun.com/docs/books/tutorial/jar/basics/

Regards,
Zyloch
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 11781028
Ahh, sorry stale window

Regards
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 35

Expert Comment

by:girionis
ID: 11781045
If you still want to go with the .exe solution here are some URLs:

http://gcc.gnu.org/java/index.html
http://www.xlsoft.com/en/products/jet/jetpro.html
0
 
LVL 35

Expert Comment

by:girionis
ID: 11781048
> Ahh, sorry stale window

It's ok, it happens all the time :)

0
 
LVL 24

Expert Comment

by:sciuriware
ID: 11781696
JAVA -> .exe .......

don't expect a huge gain in speed!

the present JRE (java.exe or javaw.exe and friends) is so smart that .exe is almost useless.

;JOOP!
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11781725
> that .exe is almost useless.

Apart from obfuscation... ;-)
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 11781766
Just my opinion:  those few who are interested in your code are those who can overcome any barriers.

Like: pro-thieves are not withheld by customer-level locks.

;JOOP!
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11781784
"those few who are (really) interested in your code (and are skilled at java and/or assembler) are those who can overcome any barriers."

;-)
0
 

Author Comment

by:xxxmen
ID: 11783378
hmmm i got one user do not wan know how to use Jbuilder so if i create a application for him. He will have no knowledge of how to use it. Unless is a easy file where he double click it and able to use it easily
0
 
LVL 35

Expert Comment

by:girionis
ID: 11783397
Your best bet is to use a jar with the appropriate manifest for the main class. Then double click on the jar file and you are set. Take a look at the links posted about jar and manifest file.
0
 

Author Comment

by:xxxmen
ID: 11870226
sorry
hmmmm most of them give the solution
but i yet to try it out
so i wan to keep this thread open
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 12061939
Yes, rate him A and please punish xxxmen.
;JOOP!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eclipse shortcuts 9 55
login jsp example 24 50
hibernate example issues from command prompt 10 41
Crystal Reports Licensing Questions 4 12
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question