using C++ and Java together
Hello all, can anyone give me some directions on how and what is the best way to build an application that uses both C++ and Java?
I''m working in a project in which all the graphic part and main loop will be handled in C++, but the internet comunication by a module in Java.
All your suggestions will be appreciated. Thanks
/\
/__\ C.Z. Hagen
I want to play with MetallicA!
It''s quite unusual to do things that way around. Projects I''ve worked on which have intermixed Java and C++ have tended to use Swing for the UI and C++ for the lower level stuff. JNI is an option, but it''s more hassle than it''s worth for what you are doing - i.e. it will be more difficult to go through JNI to use Java''s comms functionality than it will to simply do the comms in C++. One of the easier ways of communicating between the two is through sockets, but if you are using sockets in C++, why not just do the entire comms stuff with C++? Perhaps you can shed more light on why the architecture needs to be this way.
--
The placement of a donkey''s eyes in its head enables it to see all four feet at all times.
--
The placement of a donkey''s eyes in its head enables it to see all four feet at all times.
quote:Original post by kvh
He probably intends to use DirectX or OpenGL for game graphics.
That doesn''t explain why he''d want to do the comms in Java.
--
The placement of a donkey''s eyes in its head enables it to see all four feet at all times.
The idea is to port one old Delphi 2.0 game (no directX) made by a friend and me years ago, to VC++ (directX).
But, since he is quite good at Java, I though that that will be usefull to handle the internet communications, server/client stuff while using a C++ UI possbile MFC.
And since I don''t know a bit of Java, I wanted to ask about how to do this task, if feasible.
Or does anyone has some other idea of this this job?
/\
/__\ C.Z. Hagen
I want to play with MetallicA!
But, since he is quite good at Java, I though that that will be usefull to handle the internet communications, server/client stuff while using a C++ UI possbile MFC.
And since I don''t know a bit of Java, I wanted to ask about how to do this task, if feasible.
Or does anyone has some other idea of this this job?
/\
/__\ C.Z. Hagen
I want to play with MetallicA!
sorry I ment in the last post that he is good at java, so I tought we
could make a mutant game of OpenGL or DirectX, and internet communication bia Java.
/\
/__\ C.Z. Hagen
I want to play with MetallicA!
could make a mutant game of OpenGL or DirectX, and internet communication bia Java.
/\
/__\ C.Z. Hagen
I want to play with MetallicA!
Just a side note - you can access OpenGL through java, via packages like gl4java (can''t remember what the link is...sorry- search for it). NeHe has tutorials for it on his site & Sun used it for their JCanyon example.
I read something about making the DLL''s in Java (I think, it might have been something else though...)
I haven''t ever really had any use for DLL''s (I''m still in my console development stage...), so I wouldn''t know if this is possible (it should...DLL''s are precompiled, aren''t they?)
"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
I haven''t ever really had any use for DLL''s (I''m still in my console development stage...), so I wouldn''t know if this is possible (it should...DLL''s are precompiled, aren''t they?)
"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement