File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes classpath problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "classpath problem." Watch "classpath problem." New topic

classpath problem.

sharma ishu
Ranch Hand

Joined: Sep 10, 2012
Posts: 70
Given the following directory structure:





And given the contents of and

public class GetJar{
public static void main(String[] args){

package myApp;
public Foo{ public static int d=8;}

The cirrent directory is "test", and myApp/Foo.class is placed in aJAR file called MyJar.jar located in test.

How did the following invocation work?

java GetJar

This is question number 11 from chapter 10 of book "SCJP 6 by Kethy and Bates".
Please answer my question.
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924

please refer this link
I agree. Here's the link:
subject: classpath problem.
It's not a secret anymore!