Frequently Asked Questions¶
Java Virtual Machine problems¶
One common failure is that the JCC package cannot reach the java virtual machine.
The location varies on different platforms and on different java versions.
Note that for the anaconda package of orekit, there is a setup and takedown script that is run when an environment is activated (
activate myenv) that sets JCC_JDK. If you access the python executable without activating the environment you may need to set these by hand, or by using "condawrapper" that creates a directory with executables that upon starts enables the environment.
for open-jdk it seems that the libjvm.so is not added to the library path by itself.
Add the path to libjvm.so to a file in /etc/ld.conf.d/ such as java.conf
check if it is there by:
ldconfig -p | grep jvm
you might need to set the enviroment variable JCC_JDK. Example:
Needs to set the variable JCC_JDK and include java items in the PATH. Example:
set JCC_JDK=C:\Program Files (x86)\Java\jdk1.6.0_35
These can be etiher set in a bat file or directly in the computer environment variable dialog in windows.
Python Specific Functions¶
There are a few python specific functions provided in the orekit.pyhelpers to support the use of the wrapped orekit in python.
setup_orekit_curdir() this function adds a data provider with the file orekit-data.zip from the current directory.
JCC specific stuff¶
Information about JCC is found at http://lucene.apache.org/pylucene/jcc/features.html
Casting is done through the .cast_ method of the class that is the desired class:
sun = CelestialBodyFactory.getSun() # Here we get it as an CelestialBody
sun = PVCoordinatesProvider.cast_(sun) # But we want the PVCoord interface
It is possible to do remote debugging of the java part of the wrapper by connecting to the JVM with a debugger, such as eclipse. To enable this, pass the debug arguments to the JVM by using the vmargs options:
Then connect your debugger to localhost at port 8000.