?
Solved

java and path

Posted on 2006-05-15
7
Medium Priority
?
178 Views
Last Modified: 2011-09-20

I would like to implement a filepath where i generate the directory directly from java.....
its mean whenever some one use the program so he can establish the directories automatically....
0
Comment
Question by:Maggieshah
  • 2
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 252 total points
ID: 16685846
Use

File home = new File(System.getProperty("user.home"));
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 248 total points
ID: 16688072
>> where i generate the directory directly from java

You mean create a directory? For that you need something like:

File f = new File ( "directories you want to create" ) ;

if ( ! f.exists () )
  f.mkdirs () ;
0
 

Author Comment

by:Maggieshah
ID: 16688673

jbuilder should create  afoldero r directory by itself when i compile or do something.....because when im selling the program i want no one shoul dthink about where and how to put the directories....
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16688723
That's why i mentioned what i did. Also you can be sure of having the permissions to read from and write to that directory
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16689084
When you run the program, you might be running on a machine that does not have JBuilder (it might be used only for development). Can you explain the broader requirement?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question