I have a chess program (engine + GUI) written in java. I'm thinking of writing the engine using c++. Is it possible for java code in the GUI, to pass a string into c++ project, and then retrieve a string, like a method call..
I know theres a native keyword(might be relevant), can this be done easily without lots of complications?
The most important benefit of the JNI is that it imposes no restrictions on the implementation of the underlying Java VM. Therefore, Java VM vendors can add support for the JNI without affecting other parts of the VM. Programmers can write one version of a native application or library and expect it to work with all Java VMs supporting the JNI.
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
If you're writing the software in C++ because you think it will run faster than Java, then you might get disappointed later with the speed of your C++ code, because Java really isn't that much slower than C++ nowadays.
Yes, thats true, also... When you are doing a search in chess, even if you can get the effective branching factor at each node down to 6, the having a language that runs 6 times faster than java will produce a search of 1 ply deeper.
Its more a factor of program design than speed, however if you have a super computer like deep blue, then the speed alone will produce better results.
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad: