About Question com.enthuware.ets.scjp.v6.2.67 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
ETS User

About Question com.enthuware.ets.scjp.v6.2.67 :

Post by ETS User »

It will not execute because there is no . (dot) in default classpath.
I don't believe that is true.
$ unset CLASSPATH
$ java Foo
In Foo

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question com.enthuware.ets.scjp.v6.2.67 :

Post by admin »

That is because you don't have a classpath, in which case Java assumes that default class path is ".".
The question says that the classpath is set to ./classes, in which case "." is not part of the classpath and so it will not look in the current directory.

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests