Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

making exe file from java code

 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i nid some help in making an exe file from my java codes, i have several classes, one which has the main function, and i need to make an application (.exe) file from it, how can i do this? is there a software which can do this (i really just need to generate an exe file) or anything that i could use/do? we tried using exej.exe for this but it doesn't work, are there any others out there? thanks!
 
Jayant Raj
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christine,
An excellent tool for solving ur problem is JSmooth. The url is http://jsmooth.sourceforge.net/ . I have used this tool in production . This gives u an exe wrapper over ur jar file. Try this and let me know if u need further help.
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any specific reasons for making java as platform dependent ??
 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks! I'll be trying JSmooth now. I am doing this for my undergraduate thesis, I've developed an entire system using java and my professor wants me to be able to install it in any computer which may not have java available on it. in short, he requires that I make an application out of it. if i don't then my thesis isn't considered as finished. i hope you could really help. thanks. i am actually graduating this April
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.exe files are specific to the Windows platform, so as mentioned above, this will make it so your program cannot run on other platforms. You should check out our FAQ for other suggestions that essentially have the same effect. In particular, scroll down to question #16 which has a few links for you to read about the other options you have.

Layne
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The short: if you're told to create an application get the specs right before you start and choose your tools accordingly.

You can get your installer to install a JVM or set your system specs to include a JVM.
If the requirements you were given preclude that option you shouldn't have used Java to start with and your prof is quite right in telling you you're not done until you have a native application for the platform, something you should have considered before using Java.
Would you have used Visual Basic to create an application if you were told it had to run natively on a Sun SparcStation under Solaris?
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not try using Java WebStart? That way, it can be run on any computer that has the appropriate version of Java. Also, it's easy to "install" as it's just a link on a website. Good luck!
 
K Riaz
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by christine clarin:
my professor wants me to be able to install it in any computer which may not have java available on it.


I would question you professors knowledge in this area. Surely he knows that to run a Java program, you need, at the very least, a Java Runtime Environment? It is a very foolish requirement. I can only assume that he has only ever written software for production on native platforms.

The best thing to do is to make an installer (lots on sourceforge), bundle the JRE so if it detects no Java, it can install it. Otherwise, it can copy a JAR file with your project and a shortcut to a Windows Batch file to run the JAR.

Avoid making a native executable.
[ March 29, 2005: Message edited by: Kashif Riaz ]
 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TO ALL: thanks for the help guys. My thesis is already finished! All I have to do is write the paper now...

hi jayant Raj, i tried using JSmooth, it worked but we opted for exej, it's a wrapper too. thanks for the help!

Quoting Jeroen Wenting "The short: if you're told to create an application get the specs right before you start and choose your tools accordingly."
-- hi jeroen, we were instructed to program in Java, we didn't know we had to produce an application until the semester was about to end. anyway, everything turned out well. we just installed a JVM

Quoting james Carman "Good luck!"
-- thanks!!! �

Quoting Kashif Riaz "I would question you professors knowledge in this area. Surely he knows that to run a Java program, you need, at the very least, a Java Runtime Environment? It is a very foolish requirement."
-- yes i think he doesn't know much about java, he's more of an algorithm guy, more on AI.


THANKS AGAIN!
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, you didn't say that Java was a requirement
If it was and later you are told you need a native application then you have clashing requirements.
The realworld solution would be to either convince the customer that the two requirements are mutually exclusive.
Seems you've done that and gotten permission to install a JVM
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic