my dog learned polymorphism
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
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
I agree. Here's the link:
subject: Calling OS specific API functions
It's not a secret anymore!