Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to get the current working directory in a Java Web Start application

Reply
Thread Tools

How to get the current working directory in a Java Web Start application

 
 
Ahmed Moustafa
Guest
Posts: n/a
 
      09-19-2003
In a Java Web Start application,
<code>System.getProperty("user.dir")</code> throws an access denied
exception, how can the current working directory be retrieved?

Thanks in advance,

 
Reply With Quote
 
 
 
 
Ike
Guest
Posts: n/a
 
      09-20-2003
This is JUST an idea Ahmed, which I have been toying with, but am stuck
on....
In Windows, if I create a batch file, called getcwd.bat, which contains the
sole line of text, as follows:

print %0 >getcwd.prn

And I double click on it from the file manager
it will output a string to getcwd.prn, which contains a full string to the
path that it is in. Thus, if I do this, from within the path where my
executable class is in, I can read and parse getcwd.prn to determine where I
am.

However, I can make it work manually, but not from within a java
applicaiton. If you CAN...would you kindly, KINDLY pass it on to me and the
group. Thanks, Ike

"Ahmed Moustafa" <(E-Mail Removed)> wrote in message
news:5Awab.9104$(E-Mail Removed) ink.net...
> In a Java Web Start application,
> <code>System.getProperty("user.dir")</code> throws an access denied
> exception, how can the current working directory be retrieved?
>
> Thanks in advance,
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Java web start to start application on the command line by thefile name albert kao Java 3 02-02-2011 11:21 PM
How to update the current web page? (delete current web page + rewrite the page) laryten@yahoo.com Javascript 3 10-12-2006 07:33 PM
get the path of current Java file directory Matt Java 1 06-06-2004 02:36 AM
How can I pass "-verbosegc" to a java application which is launched by "Java Web Start" Willi Sanders Java 0 11-25-2003 11:58 AM
Perlish way to get absolute path of current working directory? Bob Walton Perl Misc 9 09-26-2003 01:48 PM



Advertisments