Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How to make *.exe file in Java

  Asked By: Jose    Date: Aug 31    Category: Java    Views: 757
  

Lets say I have a small game written in Java 1.4, now in order for me
to play that game i have to use my command line "java game".

Now what i want to do is to avoid to run java, lets say on a computer
that hava only JVM and dosnt hava SDK.

So, I would want my game to be in some kind of executable file. Is
there anyway to do it? I know in C++, compiler creates exe file and
thats it.

Please help, cuz I spend a lot of time creating small tool programs
but then cannot do anything with them since they only work on my comp
and if someone who has no experience with java he/she would nt be able
to run them.

Share: 

 

8 Answers Found

 
Answer #1    Answered By: Becky Baker     Answered On: Aug 31

u can make  .jar file  & call .jar file in a bat file this is one way.
it's working like a exe  file.
try it

 
Answer #2    Answered By: Stacie Martin     Answered On: Aug 31

I know how to make  jar but then i only made it
for Java Applets. How do I run  jar in a bat for Java
Application. I mean I am not asking for the whole
procedure just let me know whether its the same way as
for WebBrowser Applets

 
Answer #3    Answered By: Adali Fischer     Answered On: Aug 31

you have to create a .bat (windows)
like this;

start javaw myApp
exit

 
Answer #4    Answered By: Olga Kates     Answered On: Aug 31

Also When I do that in a bat file, i get JVM errror
cannot find main class

 
Answer #5    Answered By: Milind Mishra     Answered On: Aug 31

Ok forget it, it was class path fault. I got it
working

 
Answer #6    Answered By: Jamie Williams     Answered On: Aug 31

Will this work  on any computer I mean on those that
only hava JVM?

 
Answer #7    Answered By: Darrell Harvey     Answered On: Aug 31

You can also use 3rd party programs which creates an executable
For java. Search through the internet you can find it
Eg: exe4j
And lots of others..

 
Answer #8    Answered By: Bethany Hughes     Answered On: Aug 31

You can also send the entire standard java  packages
with the game  if you give it to your friend on a CD.
He doesn't have to install java as long as you have
the classpaths right to the intended packages (the
standard packages you may distribute legally this way
as long as you don't make  any changes to them), and he
won't notice a thing. Of course include the JVM as
well.

 
Didn't find what you were looking for? Find more on How to make *.exe file in Java Or get search suggestion and latest updates.




Tagged: