Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

.EXE file?

  Asked By: Ashan    Date: Aug 12    Category: Java    Views: 971
  

Do we have any tool for creating a windows executable .exe file for a
java binaries??
Going to the command prompt to key in the java run commands does not
feel like ur are on windows. Don't we have a click-and-run option to run
java binaries?

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Maria Miller     Answered On: Aug 12

you could use a .bat file, with something like this in it:

java %*

and associate classes with it - of course if your class is in a package
you have problems
if you need to control the classpath and maybe which jvm you might use
something like:

J:\java\jdk1.4.2\bin\java -classpath myprojectlibs.jar %*

or you could make a specific .bat file  for each test condition you want,
like:

J:\java\jdk1.3\bin\java -classpath canvas.jar
com.qlt.canvas.fractal.equation.Test fractint,par %1 %2

etc etc.

I once wrote a batch file which asked me which jvm to run  with (but I
can't remember how I did it - too long in unix land I guess).
Stuffing around with exe  files is a level of complexity you don't need
(and you still have to sort out classpaths etc).

 
Answer #2    Answered By: Elias Turner     Answered On: Aug 12

No, but you can make a executable  Jar file.

 
Answer #3    Answered By: Kifah Malik     Answered On: Aug 12

there are attempts to make binary files from the .class file, but
it is convoluted, hard and down right messy.

Besides if you want to make a windows  .exe file  then have a look at C#,
Eclipse isn't bad for hacking toget c# files and it ok for clients that
are only going to be windows clients.

Or write a VB program that runs a command  line "java cp "."
myDodgyJavaProgram

 
Answer #4    Answered By: Vicki Fields     Answered On: Aug 12

there are attempts to make binary files from the .class file, but
it is convoluted, hard and down right messy.

Besides if you want to make a windows  .exe file  then have a look at C#,
Eclipse isn't bad for hacking toget c# files and it ok for clients that
are only going to be windows clients.

Or write a VB program that runs a command  line "java cp "."
myDodgyJavaProgram

 
Answer #5    Answered By: Isra Demir     Answered On: Aug 12

Try a search on Google for java exe  and you will find plenty of tools
which can be used to create executables for java  applications. In most
cases the resulting exe is just a launcher for a JAR which is in the
same directory. I have found the best approach is to make your JAR
executable *and* to provide an exe and an installer for specific
platforms. This will give your application a professional, finished feel.

 
Didn't find what you were looking for? Find more on .EXE file? Or get search suggestion and latest updates.




Tagged: