Accessing Windows APIs


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Accessing Windows APIs

  1. #1
    Join Date
    May 2004
    Posts
    26

    Accessing Windows APIs

    Hi,
    I need some baby steps here. How can I make my java program access the Windows APIs???

    Do I have to resort to JNI? Or is there something more direct?

    I have never tried this before. Would appreciate some information on this.

  2. #2
    Join Date
    May 2004
    Posts
    26
    Anybody?

  3. #3
    Join Date
    Feb 2004
    Posts
    541
    Well since Java is platform independent i'd assume JNI is the only way. I've never used it though, so I don't know how you would do that.

  4. #4
    Join Date
    May 2004
    Posts
    26
    Thanks for the response Mike.

    Though I did have a feeling that Windows version of the JVM does provide a way to access some of the APIs exposed by windows to be contacted directly by java. Yes, that would take away the platform-independence of Java, but the same happens for many Swings components.

    To take an example, if I want my java program to output some contents to a windows printer spooler, how do I go about it?

  5. #5
    Join Date
    May 2004
    Posts
    11
    Printing is a bad example because Java has ways nowadays to print. Take a look at:
    http://www.javaworld.com/javaworld/j...020-print.html

    However, any windows specific calls (like use of win23 apis) will need to be done through JNI.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center