Click to See Complete Forum and Search --> : WIndows API


NewToJava
09-19-2006, 01:46 PM
I am new to Java.
I am working on a browser base navigation system, that will be used to access files on a windows NT network.

This navigation system will run on an intranet and not on a webserver.

I would like to able to retrieve the users "WIndows NT" user name behind the scenes.
I will be storing custom databases on the users machines in same directory.
The path would be something like this
"C:\Documents and Settings\Username\My Documents\Database"

I would like the user to be able to click a button and open a specific file.

I know how to retrieve the "WIndows NT" user in VBA.
It is done using a call to Windows API.

Is that possible to do using java?

Khalid Ali
09-19-2006, 06:47 PM
No

chazzy
09-19-2006, 07:09 PM
if you can guarantee your users are using ms IE, you can try the tip here

http://forum.java.sun.com/thread.jspa?threadID=766416&messageID=4370503

drch
09-23-2006, 01:56 AM
public static void main(String[] args)
{
java.util.Properties p = System.getProperties();
java.util.Enumeration keys = p.keys();
while( keys.hasMoreElements() )
{
String key = (String) keys.nextElement();
System.out.println( key + " = " + p.getProperty(key) );
}
}


Take note of the results for they keys user.name and user.home.