Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java and Windows Interaction

Reply
Thread Tools

Java and Windows Interaction

 
 
Adam
Guest
Posts: n/a
 
      07-25-2004
Does anyone know a way using Java to find the username of the person
currently logged into Windows? I have thought that I could access the
Windows registry to find the current user, but unfortunately I can't see a
way to access and read the registry. I've had a dig through JavaDocs and the
web but haven't been able to find anything I can use.

I have found, but do not want to use, commercial classes and code. If
someone could just point me in the right direction it would be most
appreciated.

Thanks..
Adam.


 
Reply With Quote
 
 
 
 
Mark Thornton
Guest
Posts: n/a
 
      07-25-2004
Adam wrote:
> Does anyone know a way using Java to find the username of the person
> currently logged into Windows? I have thought that I could access the
> Windows registry to find the current user, but unfortunately I can't see a
> way to access and read the registry. I've had a dig through JavaDocs and the
> web but haven't been able to find anything I can use.
>
> I have found, but do not want to use, commercial classes and code. If
> someone could just point me in the right direction it would be most
> appreciated.
>
> Thanks..
> Adam.
>
>


System.getProperty("user.name")

 
Reply With Quote
 
 
 
 
Adam
Guest
Posts: n/a
 
      07-25-2004
<embarrassment>
Cough...

Mmm.. thanks. Didn't realise it was that easy.. </embarrassment>

Thanks again..
Adam.

"Mark Thornton" <mark-p-> wrote in message
news:...
> Adam wrote:
> > Does anyone know a way using Java to find the username of the person
> > currently logged into Windows? I have thought that I could access the
> > Windows registry to find the current user, but unfortunately I can't see

a
> > way to access and read the registry. I've had a dig through JavaDocs and

the
> > web but haven't been able to find anything I can use.
> >
> > I have found, but do not want to use, commercial classes and code. If
> > someone could just point me in the right direction it would be most
> > appreciated.
> >
> > Thanks..
> > Adam.
> >
> >

>
> System.getProperty("user.name")
>



 
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
student-tutor interaction java emekadavid Java 2 05-17-2008 05:00 AM
Interaction between a Java app and Internet Explorer sponxe@gmail.com Java 7 02-09-2008 09:50 PM
Java and COM interaction amir.companieh@gmail.com Java 2 08-02-2006 10:03 PM
interaction between JEE-Server and Windows PC App. Frank Langelage Java 2 07-02-2006 05:40 PM
Java application with web interaction B@za Java 6 01-26-2004 08:51 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57