Relative file location in a J2EE server or any java process.

If you create file using File f=new File(“direc/file.txt”), you won’t know where it creates the file. So use f.getAbsolutePath() to print the location of the file the Java api thinks the file should be in.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: