Get your CodeRanch badge!*
The moose likes Beginning Java and the fly likes Calling OS specific API functions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Calling OS specific API functions" Watch "Calling OS specific API functions" New topic

Calling OS specific API functions

Michael Moritzer

Joined: May 28, 2001
Posts: 1
Hello, I am wondering how to call operating specific API functions. The JVM doesn obviously not know anything about them, so I thought about writing a native component that calls the low-level API (e.g. a windows DLL), and then call the exported DLL from within my java class. But how ? Via RMI ? How can I export a function from a native component so that a java class can invoke it ?
Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
no you would't need RMI , but you would need JINI to be able to call the native methods. After registring the dll with the system you can use java api to load these libriaries and then work with them.

Val SCJP <BR>going for SCJD
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
The Sun tutorial on JNI

"JavaRanch, where the deer and the Certified play" - David O'Meara
Consider Paul's rocket mass heater.
subject: Calling OS specific API functions
Similar Threads
native keyword ?
how to execute DLL file using Java ?
printer not calling through this program..
Calling DLL function