• Post Reply Bookmark Topic Watch Topic
  • New Topic

A JNI Question

 
Zeev Blac
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to load a java class from a native c++ application using JNI.
I created the JVM, and got a pointer to JNIEnv.

I set the CLASSPATH environment variable to c:\test
I put my Simple.class under "c:\test\Simple"

When I call to FindClass("Simple\SimpleDemo"), it returns NULL.

What's wrong??!

Thanks in advance
 
Zeev Blac
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>> I put my Simple.class under "c:\test\Simple"

Oops..

I actually put my SimpleDemo.class under "c:\test\Simple"

And it still doesn't work.!!!

Help
 
Zeev Blac
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, it works.

I wrote "package simple" instead of "package Simple"
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!