[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

runnig java apps

Posted on 2003-11-19
9
Medium Priority
?
415 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
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 90 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

872 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