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 the environment variable 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 such as:
sudo ldconfig and check if it is there by:
ldconfig -p | grep jvm
You might need to set the enviroment variable JCC_JDK. Example:
If need to set by hand, it is needed 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 set PATH=%JCC_JDK%\jre\bin\client;%JCC_JDK%\bin;%JCC_JDK%\lib;%PATH%
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] (https://gitlab.orekit.org/orekit-labs/python-wrapper/blob/master/orekit-conda-recipe/pyhelpers.py) module to support the use of the orekit in python, for example conversion between python datetime and Orekit AbsoluteDate.
One of the functions that is useful for getting started quickly is
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.