• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java package problem

 
satya sahu
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic