Creating DLL's (Java people come here!)

Blitz3D Forums/Blitz3D Programming/Creating DLL's (Java people come here!)

Erroneouss(Posted 2004) [#1]
can you create DLL's in Java?
and like use CallDLL() for a *.h file?
my previous tries have not worked... :(
if you can, do you just create the method in java, and
use calldll() for the method? and... oh man... im soooo
confused... ive confused myself... :D lol... so would you just make a .h for the DLL for the method stating and "javah" it? i want a couple of things from java... just experimenting, like seeing if i can use the Java built in swing or awt GUIs...


Strider Centaur(Posted 2004) [#2]
Um, that would be real tough I think, Java is not really a system language. The solution would almost certainly require some native interface in something like C or C++ that JAVA could interface with. JAVA does support native interfaces, so yea it can be done in a sort of left handed way. The question is why? There is nothing Blitz offers that is not presently available in JAVA, well short of the syntax and a couple things Ill mention later. There is even good 3D support and some entity support for JAVA now.

Im guessing this is to enable the use of JAVA code in Blitz, somthing like a scripting language? If so, Id say your
going the wrong way, you could fairly easily port most Blitz Commands into native JAVA, so making a Blitz Script in JAVA would be my approach to this. The hardest part would be the parser.

On a side note, I did a speed test on JAVA3D with my underwater fog demo and there was no visable speed change to what Iv got in Blitz so far with debugger off( since both use hardware acceleration ). However, JAVA supports OpenGL and optionaly DirectX9, today. Dealing with the JAVA3D Object Tree takes some getting use to, but it really makes since after a while, or you become brain washed enough to just do it and not think about it.

To be fair, Blitz is alot easier to setup for 3D than JAVA3D, and the built in entity support in blitz is awesome, but in just about all other ways JAVA is rapidly becoming the better language for games, IMHO. I normally only use Blitz to prove concepts that I later recode in JAVA. This is even starting to change as more and more JAVA3D tools are starting to roll out.

There are already several games in heavy use coded in JAVA. If Im not misstaken that Realm whatever game in the UK is one. :)


Erroneouss(Posted 2004) [#3]
yeah i just wanted to use the Java gui in blitz because its more window-ish than any other blitz3d gui other than winblitz3d which i cant get to work on my computer, but ive decided i will use C# because 1. i know it works 2. much easier 3. looks even more windows-ish :D
...i saw j3d, pretty cool stuff... just saw some thing on java3d at a marching band compition last weeked, they had marching band sims running in java3d and it was pretty cool... *YAY!! Bellbrook got 1st in the division!!!* :D
so.... just disregard this thread whoever else reads it...