Results 1 to 3 of 3
  1. #1
    porchrat is offline Senior Member
    Join Date
    Mar 2009
    Posts
    105
    Rep Power
    0

    Default Help understanding packages and classpaths

    OK when I set the classpath using javac I am setting the path to a location on the harddrive, this I understand, is this location the location of the class containing the main method? also what exactly does 'package' do and how does this relate to the classpath?
    Last edited by porchrat; 04-24-2009 at 07:33 PM.

  2. #2
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default

    no, the classpath points to the root of the package structure.

  3. #3
    porchrat is offline Senior Member
    Join Date
    Mar 2009
    Posts
    105
    Rep Power
    0

    Default

    Quote Originally Posted by emceenugget View Post
    no, the classpath points to the root of the package structure.
    Thank you for the response.

    Am I then correct in assuming that the package function in the various java classes would be the rest of the path to the class itself?

    I have read the sections in my textbook, but am battling with not only the concept, but the practical application of it too.

Similar Threads

  1. Understanding this recursive function
    By LifeWithJava in forum New To Java
    Replies: 3
    Last Post: 12-30-2008, 06:26 AM
  2. [SOLVED] Help with understanding nullpointexcepion
    By soxfan714 in forum New To Java
    Replies: 4
    Last Post: 11-11-2008, 05:51 AM
  3. Replies: 3
    Last Post: 02-12-2008, 12:03 PM
  4. What are classpaths!?
    By jimm1 in forum New To Java
    Replies: 1
    Last Post: 02-03-2008, 06:54 PM
  5. Understanding Vectors
    By cbrown08 in forum New To Java
    Replies: 7
    Last Post: 11-05-2007, 07:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •