aspose file tools*
The moose likes Beginning Java and the fly likes Making Java Code a stand alone application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Making Java Code a stand alone application" Watch "Making Java Code a stand alone application" New topic
Author

Making Java Code a stand alone application

jiggy ellsworth
Greenhorn

Joined: Jan 04, 2005
Posts: 3
Hey all, and thanks in advance!

I'm looking for a way to turn a very simple java program into a stand alone application. Similar to VB, when you create a .exe file. I would like to use Windows task scheduler to execute the java program daily or whatever.

Just to make sure, you can't call the compiled .class file directly, can you?
Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 349

You do not really need to convert your java executable to an EXE file. You can use a batch file for starting the program. You can schedule execution of this batch file in Task Sceduler.
jiggy ellsworth
Greenhorn

Joined: Jan 04, 2005
Posts: 3
Thx Jonathan, it worked. Just to get my mind around it, here's my development process. Please let me know if this is what you had suggested.

1/ Create & Compile a simple java application
javac Testing.java
2/ Create a Test.exe (contains the line below)
java Testing
3/ Call the Test.exe
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You might want to look into creating an executable jar:
http://www.coderanch.com/t/391746/java/java/Game-Tutorials-Creating-Executable-JAR


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
jiggy ellsworth
Greenhorn

Joined: Jan 04, 2005
Posts: 3
Yea, I think the .jar file approach might be a little more fundamentally sound. Anyways, I apologize for not searching the forum on this topic, as I've found several good threads after I started this one. Thx for the help java ranchers!
 
Don't get me started about those stupid light bulbs.
 
subject: Making Java Code a stand alone application