DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5
  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.

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links