Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie problem: FileReader (from a existing file in Windows)

Status
Not open for further replies.

JavaSun

Programmer
Sep 18, 2005
3
SE
Hi!

I use Netbeans 4.0. I want to show the 'My favourites links' from Explorer in a 'dropdown list'. The path where this file is placed use to be this: C:\Documents\Smith\Favorites\Links in Windows. I can read and handle files that I create but I do not see the solution for an existing file in Windows.

Thanks.
 
Whats your question exactly - don't quite follow ...

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
OK. I will try to explain it better. All I want to do is to access, read and show local files from a JAVA applet. The files that I want to open and show are those favourites’ websites addresses’ that the user save in Explorer. I mean when you are surfing and find a site you like you save it in ‘Favourites’. Windows save them in C:\Documents and Settings\Username\Favourites\Links. And there is my problem. I do not know how to open, read and show from existing files in Windows.

Thanks
 
BTW, the applet will have to be signed, as an applet is not allowed to access th file system by default for security reasons. Google for "signed applet" to learn more.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
The example I gave you shows the way.

The favourite files are regural text files, you just need to read them and extract the URL contained in them.

Cheers,
Dian
 
check out the javadocs for java.lang.System:
public static String getenv(String name)

Gets the value of the specified environment variable. An environment variable is a system-dependent external named value.
if you want to find the user-specific directory.

seeking a job as java-programmer in Berlin:
 
Now I am starting to see the light. Thanks you all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top