This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 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 » 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: 41599
    
  55
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.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java package problem