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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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 GetJar.java and Foo.java:

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 http://www.coderanch.com/t/591259/java-programmer-SCJP/certification/Doubts-Chapter-fron-Kathy-Seira
I agree. Here's the link: http://aspose.com/file-tools
subject: classpath problem.
Similar Threads
Chapter 10 K&B Self Test Question 11 Help
Confusion over java classpath
Doubt at K&b chapter 10,question 11
Question related to self test question in SCJP (Sierra/Bates) Java 6 book