MaDKit forum

Welcome All !
Please, use explicit topic names when creating new threads. Thanks.

You are not logged in.

#1 2012-08-06 15:16:36

MrSummers
Member
From: Montpellier
Registered: 2012-07-06
Posts: 7
Website

Add a New Library

Hi there,

Madkit went through a slimming program wink

Simple question : How to add a new library into a madkit5 project... without eclipse ?

Offline

#2 2012-08-13 11:42:43

fmichel
Administrator
From: Montpellier
Registered: 2009-03-24
Posts: 172
Website

Re: Add a New Library

Hello,

Do you mean for compilation purpose on the command line or for inclusion in the executable jar (assuming you are using the ant build file provided in 5.0.0.17) ?
For the second case, some work have to be done on our side, but let me know how you would see this feature from your point of view.

Offline

#3 2012-08-15 17:04:48

MrSummers
Member
From: Montpellier
Registered: 2012-07-06
Posts: 7
Website

Re: Add a New Library

Yes, so far, it is only for compilation purpose : command line + ant

To expand the topic, a dynamic classloader that could look onto its own jar to load a new set of classes is an interesting feature, if such packaging, obfuscation and distribution are needed.
Most of the trail found for this second topic are on http://stackoverflow.com/ about jar in jar, dynamic jar loading , etc.
or here : http://tutorials.jenkov.com/java-reflec … ading.html.
Since this is about reflection and dynamic classes loading, there are a few security concerns to examine. IMHO, the classes should be signed.

Offline

#4 2012-08-16 10:09:11

fmichel
Administrator
From: Montpellier
Registered: 2009-03-24
Posts: 172
Website

Re: Add a New Library

Hi,

Could you try with this test version : http://www.lirmm.fr/~fmichel/pub/MaDKit-5.0.0.18.zip ?
There is a new part in the build file for this purpose. But as it is only for compilation I guess that you do need a compile target so that the jar is not always produced, am I right ?

a dynamic classloader that could look onto its own jar to load a new set of classes is an interesting feature.

About this, there is already a dynamic loader so that so far it allows (1) to use "reload" on an agent to launch the last version available on the classpath and  (2) to load new classes by loading a jar file.

But I am not sure that it is what your point was about...

Offline

#5 2012-09-03 16:56:22

MrSummers
Member
From: Montpellier
Registered: 2012-07-06
Posts: 7
Website

Re: Add a New Library

Hello there,

How do make use of the third.party.libraries property provided in this v.5.0.0.18 test version ?

I tried the obvious :

<property name="third.party.libraries" location="lib/my.jar" /> 

But the compilator is still looking after the package... also how to correctly set the property for multiple entries ?

Offline

#6 2012-09-05 09:52:58

fmichel
Administrator
From: Montpellier
Registered: 2009-03-24
Posts: 172
Website

Re: Add a New Library

Hello,

You now have to define an ant fileset, "third.party.libraries" being its ID. So, one can include several libraries at once and freely define its own fileset using ant features (includes, exludes, etc.).
I updated the test archive (same url) because the fileset example was wrong in docs/build.xml.

Hoping this will work in your context.

Offline

Board footer