File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes java package problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java package problem" Watch "java package problem" New topic
Author

java package problem

satya sahu
Ranch Hand

Joined: Mar 26, 2003
Posts: 97
Hi,
I have to run the java files using a batch script in windows XP.
I have a java file at path : c:\folder1\subfolder1\test\TestProgram.java
The java file is given below:

package subfolder1.test;

public class TestProgram{
public static void main(String args[]){
System.out.println("Hello");
}
}
For compilation i can write
javac TestProgram.java

Now what i have to write in the batch script file to execute this file ?

Thanks in advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42913
    
  68
A batch file is at its most basic just a sequence of command line invocations. So if you just put the exact same command you'd type on the command line into the batch file, it should just work.
 
Don't get me started about those stupid light bulbs.
 
subject: java package problem