Hi,
I come back again with the classpath issue I've posted some time ago.
Now I've figured out what is the problem, but not how to solve it.
I'm OK with loading an external JAR in general. It works since I add the JAR file to the Build classpath and to the Runtime classpath.
The problem is that my current JAR file is an extension of Repast (the classes of my API extend Repast classes). Thus, there is a circular reference ...
At the moment, I get the following error when I run the model:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: repast/simphony/context/DefaultContext
What I understand is that the Repast classes are loaded in a different ClassLoader, and so my API does not have access to it.
Perhaps the solution would be to add my JAR file not to the standard Runtime ClassLoader, but to the one used by Repast.
The problem is I don't know how to do that ...
John
Le 18 mars 09 à 16:01, John Tranier a écrit :
Hi all,
I'm facing a problem using an external library within my Repast project.
I use the Repast Symphony 1.2.0.
I have added the JAR file I need within the lib subdirectory and I've also added this JAR files as an external JAR in the settings of eclipse.
It works properly when I run my model from eclipse, but it doesn't work when I run it from a standalone version obtained with the installer.
It leads to the following error: "java.lang.NoClassDefFoundError: masq/kernel/Mind"... Of course this class belong to the JAR file.
What should I do to make Repast aware of that external JAR file ?
Thanks for support,
John
------------------------------------------------------------------------------