Executing a java .class file from outside the containing folder
I'm trying to run a java .class file from the command line in XP from outside the containing folder but I'm having trouble making it work.
Say the file is:
I'm at the command prompt in C:\ and I type:
java -cp H:\Java\HelloWorld
I get that class definition not found error. Of course it works fine when I run the file from the same folder.
The reason I need to do this is that I need to run the file from another program, by opening java.exe and passing it the filepath and other arguments.
I hope someone can help, it's probably very basic but it's soooo frustrating! :confused: