This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes run java file using batch program? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "run java file using batch program?" Watch "run java file using batch program?" New topic
Author

run java file using batch program?

sudip Kumar
Greenhorn

Joined: Apr 21, 2008
Posts: 14

how to write a batch file for running a java application? I am using Websphere for Java
Mustafa Musaji
Ranch Hand

Joined: May 03, 2008
Posts: 52
Just like if you were launching it using command line. You most probably need to include any libs your program uses and the main entry point for the program.

java -cp [libs] [package] [arguments]


SCJP 5.0 - Passed
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32599
    
    4
You might do well to write javaw instead of java; then you don't get an unnecessary command-line window opening.
 
I agree. Here's the link: jrebel
 
subject: run java file using batch program?
 
Similar Threads
run java using batch
run java code through bat file
java program that can run a .class file in msdos, is this possible?
DOS command window
JFrame & Jar Files