JBuilder and JNI

Hi,

If I create a simple Java class in Eclipse, I can call this class from my Delphi 7 code using JNI. I have no problem with this. However, when I create a class in JBuilder 2005, using the same code, my delphi code then returns a message "Class not found...". The class I create is just a simple "Hello World" class and I compile my Delphi code to the directory where the .class resides. Any ideas why I cannot get the JBuilder version to work?

[459 byte] By [Rene-Ka] at [2007-11-26 15:48:53]
# 1
your problem is probably that you haven't compiled the class so go into comand prompt and compile it.
nickmagusa at 2007-7-8 22:08:29 > top of Java-index,Java Essentials,New To Java...
# 2
I'm sorry, but is the .class file not the compiled version of the .java? JBuilder compiles the .java into a .class. Surely I don't re-compile the .class?
Rene-Ka at 2007-7-8 22:08:29 > top of Java-index,Java Essentials,New To Java...
# 3
Classpath. Whatever your "Delphi code" is, it doesn't use the correct classpath. You do know that the classpath root is not the JBuilder project's directory, don't you?
CeciNEstPasUnProgrammeura at 2007-7-8 22:08:29 > top of Java-index,Java Essentials,New To Java...
# 4

Classpath is correct for use for the simple class which outputs "Hello World". I wrote a class in NetBeans as well and hit the same problem as with JBuilder. While investigating, I discovered that a library is added even though I was not using it. Perhaps the same is happening with JBuilder? Perhaps I need to just write my code from Eclipse - that way I will be in more control of what I use.

Thanks

Rene

Rene-Ka at 2007-7-8 22:08:29 > top of Java-index,Java Essentials,New To Java...
# 5
I don't think it has anything to do with JBuilder (if you think it does, go to JBuilder support please), but with how you are loading that class.
CeciNEstPasUnProgrammeura at 2007-7-8 22:08:29 > top of Java-index,Java Essentials,New To Java...
# 6

The problem is knowing what class is required. My class is a simple "Hello World" class. If I copy the code from JBuilder and create a class in Eclipse and copy the code into the new class, I can call it via JNI without a problem. I will go back to Borland, but to date have had no response from them - I was hoping that there was a simple "common knowledge" answer.

Thanks

Rene-Ka at 2007-7-8 22:08:29 > top of Java-index,Java Essentials,New To Java...