Jump to content
  • Advertisement
Sign in to follow this  
RAZORUNREAL

[java] gcjh can't find class files

This topic is 4843 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

First, the background. I'm hoping to use java as a very fast and powerful scripting language. I don't really know java, but my brother does so he's been helping me out (he doesn't know c++ though). I played around with the java native interface, but it drove me crazy in a matter of minutes. So now I'm looking at the gcc tools, gcj and gcjh so far, and hoping to use the cni. I've successfully compiled a java hello world program to native code, which was fun, so next was trying to embed. Now the problem. gcjh doesn't work. I compile to a class file, open a console, type: gcjh Test.class or, gcjh Test but it always says: Test.class: no such class Then my brother tried something which I think is pretty funny actually. input: gcjh *.class output: Test.class: no such class Now how did it find a class that doesn't exist?! I'd much appreciate any help.

Share this post


Link to post
Share on other sites
Advertisement
There are better scripting languages than Java, ones that integrate with C/C++ much easier. Don't be hatin' on Lua and Pythong.

Other than that, you might want to search around some more, I think someone has already written a number of libraries specifically for using Java from C++. GCC java support really, really sucks.

[Edited by - capn_midnight on August 10, 2005 4:46:03 PM]

Share this post


Link to post
Share on other sites
Better than java in what way? Java certainly has speed going for it. And about easy integration, I'm not so sure. The cygnus native interface theoretically lets you use java classes very similarly to c++ ones. Scripting languages are all well and good, I found one called GameMonkey that wasn't bad. My main problem with the various scripting languages is that 1. Object orientation seems unnatural with them 2. I like my errors at compile time and 3. Some, well python at least isn't really meant to be embedded.

About those libraries, could you point me to one? I've looked a jace, but got kind of put off when I found and fixed 2 or 3 silly mistakes in the source before getting stuck.

Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!