Can Java link to Windows API's?


    Sponsored Links


  • 1. where is certain java files
    Where can I find certain java java files that represent java.lang.* files. My question essentionally is where I can put the jikes.exe java compiler so it finds the java.lang.* packages so it doesn't give me an error saying it can't find those packages. Thanks, Robin
  • 2. Serializing an object to xml
    Hi! I'd like to serialize an object includind its annotations. Is this possible? Are there any tool to make this task? An example @MyClassAnnotation(value=true) public class Foo{ private int i; public void setI(int i){ this.i=i; } @MyMethodAnnotation(value=8) public int getI(){ return i; } } Thank you!
  • 3. What is the name of this?
    Hi, I am studying the chapter devoted to JTables in Sun's Tutorial. I found a construct like this: JTable ltable = new JTable(new MyTableModel()) { //Implement table cell tool tips. public String getToolTipText(MouseEvent e) { ... } ... } If I understand it, this is the declaration and immediate initialization of an instance a class derived from JTable, whose method getToolTipText is being overriden. I don't know if I like this in practice (I find it obfuscating and exactly the opposite of "reusable"), but anyway, I would like to know what the name of this type of construct is so that I can read about it in the langspec. Any help? Thanks in advance.
  • 4. java to .exe
    Are there any good java to .exe progrms available for free. I looked and found none. Thanks. -Robin

Can Java link to Windows API's?

Postby Casey Hawthorne » Thu, 06 Nov 2003 15:10:57 GMT

Can Java link to Windows API's?


Re: Can Java link to Windows API's?

Postby Christopher Blunck » Fri, 07 Nov 2003 12:51:59 GMT

Hi Casey!

Sure.  Java provides an interface to do this exact task - it's called the
Java Native Interface (JNI).  The idea is that there are lots of
applications out there that need to interface with native services (like
Windows APIs).  The result is that the Java authors have provided some
Java binding support so that you can write a C function that takes a Java
call and essentially turns it into a native call to another library.  Do a
google search for JNI and you'll probably find exactly what you're looking


Return to JAVA


Who is online

Users browsing this forum: No registered users and 20 guest