Hello,
I'm new to Jcae, and opencascade.
I tried to use occjava indipendently from netbeans and jcae,
but I had some difficulties to understand the way to do it.
I created a new java applications, under Windows Netebeans ide (not using netbeans platform),
I added libraries occjava.jar and jcae-viewer3d.jar to the project
I put occjava.dll, all occ TK****.dll in java.library.path and I have set
MMGT_OPT=0 among system enviroment vars.
Finally I added example source code to the project, from repository:
jcae\trunk\occjava\src-java\org\jcae\opencascade\test
compiling was successful, but not running (CircleExtrudeQuilt.java class )
I started to debug
but this is my log :
init:
deps-jar:
Compiling 15 source files to C:\giovanni\JavaProjects\proveJCAE\provaOCCJAVA\occjavaisolato\build\classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compile:
org.jcae.opencascade.jni.TopoDS_Wire@b05c9c9
org.jcae.opencascade.jni.TopoDS_Wire@b05ce71
org.jcae.opencascade.jni.TopoDS_Wire@b058f81
org.jcae.opencascade.jni.TopoDS_Wire@b054dc9
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/back/util.c:820]
debug:
BUILD SUCCESSFUL (total time: 9 seconds)
----
This error appears at breakpoint:
Listening on 1111
User program running
Breakpoint hit at line 107 in class org.jcae.opencascade.test.CircleExtrudeQuilt by thread main.
Thread main stopped at CircleExtrudeQuilt.java:107.
corresponding to code line (CircleExtrudeQuilt.java class ):
//Create a holed cylinder
TopoDS_Edge circleB=createCircle(0, 0, -1E-3, 0, 0, 1, 4E-3);
May anyone help me? How should be this error interpreted? Is it an error concerning jni wrapping?
My goal is using A simple Java3D canvas3D panel populated by opencascade native geometries without building
again the swig wrapper occjava.
I observed also this code behavior outside the debug enviroment:
I've not JVM crashes and no JVM error logs.
If I run all my project outside the debugging enviroment (setting CircleExtrudeQuit as Main class)
I receive this output:
init:
deps-jar:
Compiling 15 source files to C:\giovanni\JavaProjects\proveJCAE\provaOCCJAVA\occjavaisolato\build\classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compile:
run:
org.jcae.opencascade.jni.TopoDS_Wire@4e82cd9
org.jcae.opencascade.jni.TopoDS_Wire@4e83181
org.jcae.opencascade.jni.TopoDS_Wire@4e7edb1
org.jcae.opencascade.jni.TopoDS_Wire@4e7fe51
BUILD SUCCESSFUL (total time: 0 seconds)
-----
It seems correctly create 4 TopoDS_Wire objects . It's that true?
----
If I run single file CircleExtrudeQuit I receive this:
init:
deps-jar:
Compiling 1 source file to C:\giovanni\JavaProjects\proveJCAE\provaOCCJAVA\occjavaisolato\build\classes
Note: C:\giovanni\JavaProjects\proveJCAE\provaOCCJAVA\occjavaisolato\src\src-java\org\jcae\opencascade\test\CircleExtrudeQuilt.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compile-single:
run-single:
java.lang.NoClassDefFoundError: src-java/org/jcae/opencascade/test/CircleExtrudeQuilt
Exception in thread "main"
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
-------
Thanks in advance.
(cross posting from https://sourceforge.net/forum/forum.php?thread_id=1832683&forum_id=253752 jcae developer forum)