Dear CornedBee.
Thanks for ur help. but is there a way for the system to determine the path on its own without specifying the path, eg.
c:\\java\project ?????
Tq,
Neptune.
Printable View
Dear CornedBee.
Thanks for ur help. but is there a way for the system to determine the path on its own without specifying the path, eg.
c:\\java\project ?????
Tq,
Neptune.
Huh?
Which path do you want?
let me explain more detail. that day u give me a solution to determine # files in a directory.
here it is:
java.io.File dir = new java.io.File("c:\\java\project");
int count = dir.list().length;
"c:\\java\project" is the pathname right?
so, is there anyway for the system to know the path without us typing this-->"c:\\java\project" by the time the above 2 codes is being executed?
hope u can read me.
Sincerely;
Nepunel.
Which path name? I think there is a File.getCwd or something to get the current directory, which may or may not be what you want.
However, in this sentence
"for the system to know the path "
"the path" refers to nothing. Sorry, semantic error, I can't compile your sentence to brain code ;)
Haha. i m so sorry.
i think the File.getCwd is wat i want. i just want to know the current directory in a drive.
Let say computer A and B.
inside A, user compile and run its java file inside c:\\java\project
meanwhile inside B. another user run its java file inside d:\\assignment
so, this 2 directory is totally different right? therefore, it'll be meaningless to specify the pathname like c:\\java\project inside my pc(let say C) as it gives no meaning for computer B?
hope u understand as i also :confused:
Neptune.
if possible, can i hav ur contact like icq#?
70788560
And I found this (was tricky...)
http://java.sun.com/j2se/1.4.2/docs/api/index.html