jCAE
 

What jCAE developers should know

What jCAE developers should know

Introduction

jCAE is an assembly of several components. To know where to start see the architecture diagram.

Compiling occjava-swig

This is an JNI Opencascade wrapper generated with Swig. On Linux the native part is built with autotools and g++. For Windows a Visual Studio 2005 project is provided. In both cases the swig process (to generate .cxx from .i) is handled so you do not have to call swig manually. The swig process also generates .java files. They must be compiled using the provided Ant script (build.xml) to create the occjava.jar file.

On Windows you must tell Visual Studio where you installed dependencies. To do so go to Tools, Options, Project and Solutions, VC++ directories. You must add swig binary path, Opencascade include and library path, and Java include path.

On Linux, configure script should find all dependencies (otherwise set CPPFLAGS and LDFLAGS) but Opencascade. For Opencascade you have to set the CASROOT environment variable.

Adding new classes to occjava-swig is easy but if you want to add new typemaps you may have a look to gp.i for examples. Reading swig and JNI references may also be required.

Compiling jCAE-mesher and jcae-viewer3d

  • Edit the build.properties file to set properties. You may also create the lib directory and make link to theses dependencies.
  • Run Ant
  • Check that jar file(s) have been created in the lib directory. At the end of the jCAE-mesher compilation you should get jcae.jar and jcae-mesherocc.jar in the lib directory. At the end of jcae-viewer3d compilation you shoud get a jcae-viewer3d.jar file in the lib directory.

Compiling Netbeans modules

TODO I want to kown what's going on with that: http://sourceforge.net/forum/message.php?msg_id=3806445

The 2 Netbeans modules are grouped in a module suite named jcae-netbeans-suite, which must be loaded in netbeans.

  • jcae-netbeans have dependencies on jCAE-mesher and jcae-viewer. To provide these dependencies you should read jcae-netbeans-suite/jcae-netbeans/INSTALL.
  • occjava (the netbeans module) needs occjava-swig files (OccJava.dll, libOccJava.so, occjava.jar) in jcae-netbeans-suite/occjava/release/modules/ext/. Make links or copy them.

Reference: http://platform.netbeans.org/

Concerning Ant

Ant is command line tool. If you do not like command line tool, you should know that Ant is a standard in Java world and that all IDE (including Netbeans and Eclipse) allow to import project from an Ant script. In Netbeans this feature is called "Java Project with Existing Ant Script".