Solved

runnig java apps

Posted on 2003-11-19
9
406 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
matchUp  challenge 9 71
best (free) software to access postgres db (java) 1 18
base64 decode encode 12 96
Java Timer (static) 9 10
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now