🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1572

Re: win32 API calls

#1572
From: TBerry
Date: Thu, 06 Dec 2001 14:45
33 lines
1751 bytes
Thank you

Avi Abrami wrote:

> TBerry wrote:
>
> > Anyone out there tried to access win32 API? All I want is to get the
> > username entered at o/s login. I've add "com.ms.win32" to my classpath
> > and included it to JBuilder without a problem. It compiles but at
> > runtime I get:
> >
> > Can't link Win32 API
> > java.lang.UnsatisfiedLinkError: .....
> >
> > which I gather is because what I'm doing is not supported by my JVM.
> >
> > Anyone know how to resolve this (I'd rather not install Microsoft's
> > JVM), or even better, is there a more Java solution to getting the
> > logged-in user's name?
> >
> > Thank you
> > Tom Berry
>
> Hi Tom,
> Look at the javadoc for class 'java.lang.System',
> and then try this...
>
> System.getProperty("user.name")
>
> Should give you what you want.
>
> Good Luck,
> Avi.
Technical Details
Message-ID: <3C0F84A0.B98C0F19@vhb.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!fu-berlin.de!news.uni-paderborn.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3C0EB8A0.D3A3FD09@vhb.com> <3C0F044B.49AD7499@intersystemsww.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,499af87b5b6945ad
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-12-06 06:46:19 PST
Message-ID: <3C0F84A0.B98C0F19@vhb.com>
Date: Thu, 06 Dec 2001 09:45:52 -0500
From: TBerry <tberry@vhb.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: win32 API calls
References: <3C0EB8A0.D3A3FD09@vhb.com> <3C0F044B.49AD7499@intersystemsww.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 204.243.174.175
X-Trace: dnews 1007649635 204.243.174.175 (6 Dec 2001 06:40:35 -0800)
Lines: 34
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!fu-berlin.de!news.uni-paderborn.de!newsfeed01.sul.t-online.de!t-online.de!dnews