Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Using Windows API

Reply
Thread Tools

Using Windows API

 
 
Ken Kast
Guest
Posts: n/a
 
      04-12-2004
If this is a duplicate post, I apologize. I originally put it out
this morn, but it's never shown up.

I have the following code in my Main class:

public class Main {
static {
System.loadLibrary("kernel32");
}
native private static short GetSystemDefaultLangID();

and in main I have

ID = GetSystemDefaultLangID(); // Get Language ID for this system

When it executes this line in debug mode the following exception is
thrown:

java.lang.UnsatisfiedLinkError: GetSystemDefaultLangID
at Main.GetSystemDefaultLangID(Native Method)
at Main.main(Main.java:92)
All the right directories are in the PATH variable.

I am teaching myself Java and this app is a porting of a working one
originally written in VB .NET, so I know the underlying code is OK.

Can anyone give me a hint what I'm doing wrong?

Thanks.
 
Reply With Quote
 
 
 
 
Christophe Vanfleteren
Guest
Posts: n/a
 
      04-12-2004
Ken Kast wrote:

> If this is a duplicate post, I apologize. I originally put it out
> this morn, but it's never shown up.
>
> I have the following code in my Main class:
>
> public class Main {
> static {
> System.loadLibrary("kernel32");
> }
> native private static short GetSystemDefaultLangID();
>
> and in main I have
>
> ID = GetSystemDefaultLangID(); // Get Language ID for this system
>
> When it executes this line in debug mode the following exception is
> thrown:
>
> java.lang.UnsatisfiedLinkError: GetSystemDefaultLangID
> at Main.GetSystemDefaultLangID(Native Method)
> at Main.main(Main.java:92)
> All the right directories are in the PATH variable.
>
> I am teaching myself Java and this app is a porting of a working one
> originally written in VB .NET, so I know the underlying code is OK.
>
> Can anyone give me a hint what I'm doing wrong?
>
> Thanks.


It did show up, and I gave you an answer.
Here it is on google:
http://groups.google.com/groups?selm...telenet-ops.be

--
Kind regards,
Christophe Vanfleteren
 
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
windows-api-0.2.0/lib/windows/api.rb:211: [BUG] Segmentation fault aidy.lewis@googlemail.com Ruby 2 10-25-2007 04:27 AM
.Net Profiler API in 64 bit windows -FunctionMapper callback API =?Utf-8?B?TGVv?= Windows 64bit 0 09-05-2007 06:10 PM
Profiling API or Membership API John123 ASP .Net 0 10-20-2006 03:18 PM
Calling the C API from Python and Python program from same C API -bidirectional Praveen, Tayal (IE10) Python 0 03-17-2005 06:33 AM
What API replaces the unlock API that existed in gcc 2.9.3? Shlomo Anglister C++ 1 08-02-2004 06:50 PM



Advertisments