Hello
Guest
Register
Login
1 Hour
1 Day
1 Week
1 Month
Forever
LWJGL 3.3.2 released
Menu
Home
Help
Search
Login
Register
go
LWJGL Forum
Programming
General Java Game Development
Using natives?
« previous
next »
Print
Pages: [
1
]
Using natives?
2 Replies
6710 Views
TechNick6425
29
Using natives?
«
on:
August 13, 2013, 14:38:02 »
I saw that LWJGL uses native DLLs and others, but how do you link these with Java, and how are they written in the DLL?
Logged
quew8
569
Because Square Eyes Look More Real
Re: Using natives?
«
Reply #1 on:
August 13, 2013, 17:42:45 »
If the native files are in the same directory as the program is executed in, they will be automatically included.
Alternatively you can pass the path to LWJGL in code before initializing anything using the "hidden switch" as described here.
http://www.lwjgl.org/wiki/index.php?title=LWJGL_Hidden_Switches
.
One other option is to load the natives yourself by calling.
Code:
[Select]
System.loadLibrary(pathToNatives);
Those are all the options that I know of.
Logged
Fool Running
828
Re: Using natives?
«
Reply #2 on:
August 15, 2013, 12:55:15 »
I think he's meaning how do you write the code to have Java call native libs. It uses the Java Native Interface. See
http://docs.oracle.com/javase/7/docs/technotes/guides/jni/
for more information or Google "java jni tutorial".
Logged
Programmers will, one day, rule the world... and the world won't notice until its too late.
Just testing the marquee option
Print
Pages: [
1
]
« previous
next »