Get the directory of the entry file
From: Allan Bruce (allanmb_at_TAKEAWAYf2s.com)
Date: 06/30/04
- Next message: Roedy Green: "Re: Cannot load image in applet after placing it in a package"
- Previous message: Yu SONG: "Re: How do I get String.split() to do what I want?"
- Next in thread: Andrew Thompson: "Re: Get the directory of the entry file"
- Reply: Andrew Thompson: "Re: Get the directory of the entry file"
- Reply: Chris Smith: "Re: Get the directory of the entry file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Jun 2004 12:44:21 +0100
Is it possible to get the directory of the file that contains my main()? I
have a few data files in a subdirectory within this directory and I want to
access them like this:
public static final String myDataSubdir = "Data\\";
public static final String myDataFile = "Data1.txt";
// access the file using the below as my String
// myMainDirectory + myDataSubdir + myDataFile
Thanks
Allan
- Next message: Roedy Green: "Re: Cannot load image in applet after placing it in a package"
- Previous message: Yu SONG: "Re: How do I get String.split() to do what I want?"
- Next in thread: Andrew Thompson: "Re: Get the directory of the entry file"
- Reply: Andrew Thompson: "Re: Get the directory of the entry file"
- Reply: Chris Smith: "Re: Get the directory of the entry file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]