[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users]



Yes, I had to add the working directory (the one including "orekit-data.zip") to the Java classpath with "javaaddpath(pwd)". Now it works.
Thanks!
Michele


2013/7/22 Luc Maisonobe <Luc.Maisonobe@c-s.fr>
Le 21/07/2013 23:45, Michele Mastropietro a écrit :
> Hi,

Hi Michele,

> I'm trying to use orekit integrated with Matlab using the script
> "Integration_in_Matlab" present here
> <https://www.orekit.org/forge/projects/orekit/wiki/Integration_in_Matlab> (which
> just for practicality I'll call "matlab_orekit.m").
>
> I substituted the javapath commands with the updated version of the
> packages:
>
>     javaaddpath 'orekit-6.0.jar'
>
>     javaaddpath 'commons-math3-3.2.jar'
>
> the files "orekit-6.0.jar", "commons-math3-3.2.jar" and
> "orekit-data.zip" are in working directory. Everything seems fine except
> that when it comes to execute the line:
>
> crawler=org.orekit.data.ZipJarCrawler('orekit-data.zip')
>
> this exception is raised:
>
> Java exception occurred:
>
> java.lang.NullPointerException
>
> at
>
>         org.orekit.data.ZipJarCrawler.<init>(ZipJarCrawler.java:114)
>
> at
>
>         org.orekit.data.ZipJarCrawler.<init>(ZipJarCrawler.java:99)

It seems to me Orekit does not find the resource 'orekit-data.zip' you
provided to it.

In fact, the constructor you have used is designed for resources that
are in the Java classpath itself. If you want to provide the zip
resource archive directly from the current working directory, you can
use the constructor with a File instance rather than a String instance.

So I suggest you to try the Matlab equivalent to the following Java call:

crawler=org.orekit.data.ZipJarCrawler(new File("orekit-data.zip"));

Hope this helps,
Luc

>
> I'm not so expert with orekit so I don't know if it is my fault or a
> problem of orekit.
>
>
>
>