Fwd: DLL C connect -Java Connect

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: DLL C connect -Java Connect

Annick


Hi Joachim,

I have tried both JavaConnect and JNIPort, maybe the mix is not quite good ?

Here is a summary of my problems.

With your new method, I managed to launch a JVM.

I had previously modified the following methods :

javaHomeForVersion: aVersionString
"answer the JavaHome (installation root) of the given version of the
JDK"

"^((self registryEntryForVersion: aVersionString)
valueNamed: self registryJavaHomeName) value"

^'/usr/java/jdk1.5.0_03'

jvmDLLName
"private -- answer the relative name of the JVM.DLL'"

"^ 'jvm.dll'."
^'libjvm.so'

Then I have tried to run the tests :

Summary of tests

JNI Tests : OK
Java base tests : OK
in JNIport prerequisites test : JNIPortStandardLibInterface test does
not work


I get the following messages :

JNIPort.Tests.JNIPortBasicHiddenFieldsTest>>testAmbiguousIntFieldViaJVM
not run (classfile generation is not installed?)
JNIPort.Tests.JNIPortGeneratedHiddenFieldsTest>>testOverloadedByTypeField not run (classfile generation is not installed?)
JNIPort.Tests.JNIPortGeneratedHiddenMethodsTest>>testOverloadedByTypeMethod not run (classfile generation is not installed?)

When I start the image again, I always get an error on :
resetJavaNamespace

When I start using "generate ghosts classes" I get the error :
Weaklings.WeakSetElementHolder has no binding

Which version of Weaklings is needed ? Should I load it from Cincom
repo ? I have tried it.


Once I have launched and stopped a VM, no way to launch a new one, I get
a JNI -1 error. I need to restart the image to launch the VM again.

So far.

Best regards,

Annick

Le 4 déc. 07 à 20:28, Joachim Geidel a écrit :

Hi Annick,

yes, I have used JNIPort on Linux (Ubuntu). In its current state, it's not obvious what you have to do, as there is no documentation for JNIPort except what Chris Uppal has written for the original Dolphin Smalltalk version - which doesn't cover Linux, of course. If you use the latest branch version in the public repository published by Johan Brichau, you can even use it on MacOS-X now.

Basically, you have to configure JNIPort manually. In the JNIPort settings tool, add a new configuration, then fill in the field for the JVM library. Use absolute path names. If you want to run the tests, you will have to add the jar file mentioned in the comment of the "JNIPort Tests" to the class path, which you can configure in the JNIPort settings tool, too. The same applies to the JNIPort jar file which is needed for using callbacks from Java to Smalltalk. Absolute path names may be better in this case, too. A strange thing is that on Linux, the entries in the class path option of the Java VM have to be separated by colons instead of semicolons (or was it the other way round?).

If the configuration is such that the JVM library and the JAR files are found, JNIPort should work for all Java versions from 1.4 to 1.6. The current implementation is based on VisualWorks 7.5. I have not yet tried to run it on a current development build.

Did you encounter any specific problems (exceptions? error messages?), or is the problem that JNIPort needs more documentation to be usable (a problem which I am aware of)?

Best regards,
Joachim Geidel

Annick Fron schrieb:
Hi, 

I am trying to use DLL C under Linux, but the parser is stuck when I
regenerate the DLL with the following feature.h file.
What is wrong with the syntax ?

Also has anyone managed to use JNIPort or JavaConnect on Linux ?

Annick Fron
http://www.afceurope.com