I am still confused.Please explain this exapmle?
test|
GetJar.java|
myapp |
Foo.java
public class GetJar{
public static void main(String...a)
{
System.out.println(myapp.Foo.d);
}
}
package myapp;
public class Foo{
public static void main(
String args[])
{
public static int d=8;
}
}
A)javac -classpath MyJar.jar GetJar.java
java GetJar
This answer is correct.why java does not use the classpath option.Jvac uses and why java does not use it?
Why this answer is wrong.
javac -classpath MyJar.jar GetJar.java
java -classpath MyJar.jar GetJar
Please clarify my doubt.i AM TOTALLY CONFUSED