SCJP 6. Learning more now.
Rahul Sudip Bose wrote:
C:\run code\foo>java -classpath \foo\bar\baz\bing:\foo\bar MyClass
Ikpefua wrote:
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
Ikpefua Jacob-Obinyan wrote:
C:\run code\foo>java -classpath . bar.MyClass
Invoke the java command EXACTLY as specified above, and it should work.
SCJP 6. Learning more now.
Rahul Sudip Bose wrote:
C:\run code\foo>java -classpath \foo\bar\baz\bing:foo\bar MyClass
SCJP 6. Learning more now.
Seetharaman Venkatasamy wrote:
and if both path1 and path2 has same version of class then first specified(path1) one wins the race!
SCJP 6. Learning more now.
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
OCPJP6-05-11
"Your life is in your hands, to make of it what you choose."
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
SCJP 6. Learning more now.
Rahul Sudip Bose wrote:My directory structure is ok...I am inside foo for execution - ok...no package statements in class files - ok...typed command in book with windows separators \ and ; --ok...
but still there is an error...i guess i will have to keep this aside for now and move ahead.
here is what i have been doing :
C:\run code\foo>java -classpath \foo\bar\baz\bing;\foo\bar MyClass
Before i proceed ahead can someone confirm this : If the compiler finds the desired class file in the 1st classpath itself, it wont look further ???
thanks to all.
Seetharaman Venkatasamy wrote:
execute this: C:\run code>java -classpath .\foo\bar\baz\bing;.\foo\bar MyClass . not tested though![]()
<edit>
add period(.) operator before \foo\bar\baz\bing and \foo\bar.
[or] remove the \ and just use foo\bar\baz\bing and foo\bar.
</edit>
SCJP 6. Learning more now.
Rahul Sudip Bose wrote:
Now can someone tell me whats happening... ???
SCJP 6. Learning more now.
Rahul Sudip Bose wrote:the book clearly says :
And this command line is invoked from /foo
java -classpath /foo/bar/baz/bing:/foo/bar MyClass
i did that from foo> (using windows separators), but it didnt work. So should they have printed "from run code" or whatever your folder name is ?
Ikpefua wrote:
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
SCJP 6. Learning more now.
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
Ikpefua Jacob-Obinyan wrote:@Rahul Java
From the last line......in both commands.
SCJP 6. Learning more now.
Rahul Sudip Bose wrote:
This chapter is simply irritating. I seems that no serious developer uses CMD, so i thought that skimming this chapter would be fine.
Ikpefua wrote:
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
expectation is the root of all heartache - shakespeare. tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|