Jump to content
Sign in to follow this  
Gandalf14141

Java Jar File to Exe

Recommended Posts

Hey all, I was just wondering how I would get a program that was created in Java to an executable file. I've made a runnable Jar file but I can't seem to transform (If that would be the correct term) that file into an executable. I'm using Eclipse and launch4j. When I use launch4j it said that it failed. If anyone has any suggestions I would love to hear them!

 

Thanks!

 

PS: If it matters (which I don't think it would) I'm running Lion on my laptop.


Finally on here to update that I have officially quit! It's been fun.
[hide=Signature]
Gandalf14141.png
R.I.P Billy Mays and <3 My Friend C.D.S 7/8/09 <3
60,816th to 99 Fletching 03/07/09|220,309th Person to be Able to Kill Dusties 10 Year Cape on 12/20/14[/hide]

grammar2gr8dx.png

Share this post


Link to post
Share on other sites

Not sure I have an answer to your specific question, but I'd like to know why you're trying to do this. Seems that compiling Java into a native executable defeats the purpose of Java.


99 dungeoneering achieved, thanks to everyone that celebrated with me!

 

♪♪ Don't interrupt me as I struggle to complete this thought
Have some respect for someone more forgetful than yourself ♪♪

♪♪ And I'm not done
And I won't be till my head falls off ♪♪

Share this post


Link to post
Share on other sites

I'm just trying to get it so that I can just put it on a thumb drive(email, however else you share an item), just click on it and have it run. That way you don't have to open up Eclipse (or whatever else you would use to code) and you wouldn't have to open up a terminal and start the compilation there. If that doesn't make any sense I can come back and make clear things up. My goal is that I would be able to send it to someone who doesn't have any knowledge in coding to be able to open it and run the program. 


Finally on here to update that I have officially quit! It's been fun.
[hide=Signature]
Gandalf14141.png
R.I.P Billy Mays and <3 My Friend C.D.S 7/8/09 <3
60,816th to 99 Fletching 03/07/09|220,309th Person to be Able to Kill Dusties 10 Year Cape on 12/20/14[/hide]

grammar2gr8dx.png

Share this post


Link to post
Share on other sites

Typically the Jar file is good enough, although I haven't done much with Java on Macs. In Windows, the Jar file is what I use to distribute my programs, and usually it's just double click and they run (provided the Java Run time Environment is correctly installed on their computer). Alternatively, you could write a script (batch file in Windows, not sure the Mac equivalent) which also runs the Jar. The syntax would be similar to java -jar (name of your Jar file).jar


99 dungeoneering achieved, thanks to everyone that celebrated with me!

 

♪♪ Don't interrupt me as I struggle to complete this thought
Have some respect for someone more forgetful than yourself ♪♪

♪♪ And I'm not done
And I won't be till my head falls off ♪♪

Share this post


Link to post
Share on other sites

When I go to open the Jar file, there is a popup that says it can't be opened, check console for possible errors... Any idea what could cause this?


Finally on here to update that I have officially quit! It's been fun.
[hide=Signature]
Gandalf14141.png
R.I.P Billy Mays and <3 My Friend C.D.S 7/8/09 <3
60,816th to 99 Fletching 03/07/09|220,309th Person to be Able to Kill Dusties 10 Year Cape on 12/20/14[/hide]

grammar2gr8dx.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.