Solved

runnig java apps

Posted on 2003-11-19
9
411 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

729 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