Solved

runnig java apps

Posted on 2003-11-19
9
408 Views
Last Modified: 2013-11-23
i know this is not really a java related question, but i guess many of you have come upon this problem:

i distribute my app with the JRE and a BATch file which starts the jvm (something like
"start ./jre/bin/javaw -classpath myclasspath; com.bla.bla.myMainClass")

it works ok but i don't  think it looks too professional, so i want to make it an executable somehow...
so if you know a tool for converting a bat to exe (i couldn't find one) or if you have another solution, please answer

thanks
0
Comment
Question by:hapciu
  • 3
  • 3
  • 3
9 Comments
 
LVL 15

Expert Comment

by:jimmack
ID: 9783692
You probably need to have a look at tools like InstallAnywhere, InstallShield and so on.

Have a search on Google for:

java install tool
0
 
LVL 15

Expert Comment

by:Javatm
ID: 9783697
>> if you know a tool for converting a bat to exe

     I know several tools but if create a .exe for a java your gonna lose important and cool stuff from
     Java so If I where you I'll just create a jar file a native exe of Java Platform

1.) In creating a Jar file what you need to do is to create a " manifest.tmp" file using notepad.
     In the notepad type this:

     Main-Class : YourMainClassHere

     Comment : if your main class is = a it should look like >>

     Main-Class : a

    Then save it as manifest.tmp and put this to the folder of your classes.

2.) Then go to DOS or command promt then go to the directory of your classes
     Then try typing this to the directory of your folder :
   
     c:\jdk1.4.2\javac\bin\jar Filename.jar manifest.tmp *.class

     The jdk1.4.2 is the jdk version, dont forget to change the Filename.jar
     with your own jar name.

3.) Go to your sub directory and double click on the Jar file it should work.

Previous Question :
http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20774096.html

Hope this helps . . .
JAVATM
0
 

Author Comment

by:hapciu
ID: 9783732
well i can't affort  an installer like installAnywhere, so i use the free Inno Setup wich does it job right. Which is placing all my files (my classes, the jre and my batch) in a user-sellected dir. all i want is to make my bat an exe, for distributing it.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 15

Expert Comment

by:jimmack
ID: 9783759
According to the Inno Setup web page (http://www.jrsoftware.org/isinfo.php), it...

"Supports creation of a single EXE to install your program for easy online distribution. Disk spanning is also supported."

Does this not work when Java files are included?
0
 

Author Comment

by:hapciu
ID: 9783765
the previous answer was before i read your answer, Javatm. sorry.
i know what you mean. BUT
1. i don't care if i loose system-independency (my users will have windows)
2. having my (possibly dumb) users click a bat or click a jar is almost the same. so i want an exe

thanks for the answer and i admit the jar solution is the most elegant, but i'm kinda required to make an exe for this project.

could you direct me to those bat2exe tools you said you know ?

thanks
0
 

Author Comment

by:hapciu
ID: 9783788
jimmack: yes but AFTER my user installs my app, he gets a bat for running my app. i don't want that. i want to make my bat an exe ....
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9783794
Ah.  I see.
0
 
LVL 15

Accepted Solution

by:
Javatm earned 30 total points
ID: 9783843
0
 
LVL 15

Expert Comment

by:Javatm
ID: 9783956
You could try this to make your java an exe :

// Its a free trial
http://www.ej-technologies.com/products/exe4j/overview.html

Hope it helps . . .
JAVATM
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

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