Results 1 to 2 of 2
  1. #1
    ras_oscar is offline Member
    Join Date
    Jun 2013
    Posts
    54
    Rep Power
    0

    Default Find the pathname for the Java .jar file

    I am beginning to write my application. It will require the Java source file and a series or separate support files that the application will create and manage. I would like the application to place these files in the same directory as the Java source file. What function would I use to determine that directory name? I'd prefer not to hard code a location, and I'd prefer not to ask the application user to select a location.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Find the pathname for the Java .jar file

    Why should your application require the Java source?

    The usual approach for supporting files is to place them in a subdirectory of the user's home directory. There's a System property that you can use to find the home directory.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Find all identifiers in a java file
    By fam2315 in forum New To Java
    Replies: 5
    Last Post: 10-28-2012, 02:12 AM
  2. file pathname
    By lemontree45 in forum New To Java
    Replies: 3
    Last Post: 08-18-2011, 02:00 AM
  3. java file reader, jgrasp can't find the file
    By aramiky818 in forum New To Java
    Replies: 3
    Last Post: 04-22-2011, 02:06 AM
  4. cannot find the class file when running the java command
    By kulangotski in forum New To Java
    Replies: 4
    Last Post: 01-18-2011, 11:34 AM
  5. Replies: 0
    Last Post: 02-05-2010, 03:49 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
  •