Skip to main content
gamedev.net
🔒 Locked

[java] How do I use DirectX with Java?

Started by rajivtm Aug 11, 2003 at 9:09 PM 3 replies 500+ views
Original Post
rajivtm
rajivtm
Does anyone know where I can find the libraries required for programming with DirectX in Java or a site with instructions on using it? Thanks for any help you can give me, Rajiv
misterX
misterX
A long time ago, i''ve seen such a library, from microsoft i believe. it''s ages ago. If i remember right, it was called JdirectX, but there was no hit on google, so i suppose it has been abandonned/removed.
There are maybe 2 ways to get it:
-Taking an "amateur" binding to directX, which has no guarantee and usually have developpement lacks.
-Maybe tricking around could make the j# libs for managed DX usable, i''ve no idea, it''s maybe impossible, i don''t know, it''s just an idea.
Else than that, i don''t know how it could be done (exept making your own binding, but that''s too much work).


Otherwise, there are many good alternatives of any kind:
For the quick and easy, there is javanerd''s api
For the officialy used, look at the java media api
For the low-level access fan, there is a SDL port (still under developpement...)
rajivtm
rajivtm
Thanks, your reply was very helpful. I''ll just use one of your suggested alternatives.

Rajiv
sagwagon
sagwagon
Or you could just try:

import ddraw.h;
import dsound.h;
import dinput.h;

Make sure the .h files are in your classpath of course.
tortoise
tortoise
heh, I hope that was a joke

rajivtm, what are your needs with java and directx? You may find a java opengl solution to work, such as LWJGL or JOGL.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.