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

Re: Help with java package (beast-mcmc) needed




Le 1/11/12 10:54 AM, Andreas Tille a écrit :
> Hi Olivier,
>
> thanks for your patience.
>
> On Wed, Jan 11, 2012 at 09:31:40AM +0100, Olivier Sallou wrote:
>>> Apropos MANIFEST:  I formerly fiddled around with packaging using jh_manifest
>>> and there is also some alternative packaging method at
>>>
>>>    http://people.debian.org/~tille/packages/beast-mcmc-help-wanted/manifest/
>>>
>>> featuring a debian/beast-mcmc.manifest file.  Believe it or not it shows
>>> the very same behaviour.  The most strange fact for me is that the two
>>> executables loganalyser and logcombiner are very similar but only one of
>>> them runs and the other fails.
>>>
>>> Do you think I should simply add a CLASSPATH variable to those scripts that
>>> are failing without understanding why the others are working?
>> classpath in beast-mcm.manifest looks fine but did you check the content
>> of generated JARS with their manifest content?
>> (you can exec jar -xf myfile.jar to "unzip" it and look in sub dir
>> META-INF for MANIFEST file).
> I checked using mc and I can confirm that the resulting
> META-INF/MANIFEST.MF contains those JARs which were not found. 
>
>> If generated manifest is file in one, and not in the other, it might a
>> simple typo issue with generation.
> I came to the conclusion that the cause of the trouble is probably the
> fact that five of six executables in beast-mcmc are using the very same
> JAR file and are just calling different classes.  It does not explain
> why *two* out of these five are working (not only the one which is
> marked as MainClass in the MANIFEST.MF file) and *three* others don't
> but I admit that I do not like to spend even more time into this (the
> package was left unattended for 9 monthes because of this and I now
> really want to bring it to an end) and thus I now set CLASSPATH
> explicitely inside the according wrapper scripts.  This seems to work so
> far.  I'll now work on some lintian issues before upload and so there is
> some time left for further hints before I upload but if nobody might
> have any clue I'll upload with these explicite settings.

Manifest file in JAR files is used only when program is called like:
java -jar myfile.jar
It uses in this case the manifest file and the default class.

If a specific class is used:
java -cp myfile.jar org.debian.myclass

then classpath in manifest is not used, and all dependencies must be set
in the java classpath (with -cp or -classpath, or env CLASSPATH).
In this cas it must contains all jars needed by specific class call

Olivier

>
> Kind regards
>
>         Andreas.
>

-- 
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95

gpg key id: 4096R/326D8438  (pgp.mit.edu)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438



Reply to: