aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes chapter 10 question 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 » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "chapter 10 question" Watch "chapter 10 question" New topic
Author

chapter 10 question

Janki Shah
Ranch Hand

Joined: Nov 23, 2011
Posts: 136
If I compile .java file using below line how do I run it?


directory structure for this is, myProject/source/MyClass.java. Here, all .class files are stored in folder name classes. So, all .class file will be stored in myProject/classes/ path. To run this .class file, is there any other way except going in to classes folder to run them? like this c:\myPoject\classes>java MyClass
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

say to the java where your class file stays using -cp after your java command
Janki Shah
Ranch Hand

Joined: Nov 23, 2011
Posts: 136
Thank you Seetharaman.
like this, java -cp classes MyClass
Seetharaman Venkatasamy wrote:say to the java where your class file stays using -cp after your java command
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Janki Shah wrote:Thank you Seetharaman.

hope you got... you are welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: chapter 10 question