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

Re: Next question for help in Java packaging: beast-mcmc



On Wed, Feb 16, 2011 at 06:12:53PM -0500, Scott Howard wrote:
> I haven't built the package, but the debian/__beast-mcmc.manifest__
> doesn't appear to be in javahelper manifest form.

No it is definitely not - it was just a reminder for myself what
classes need to be called.  The __*__ made sure that the file would
be ignored by all tools - obviosely you are not a tool. :-)

The problem I had is that beast-mcmc contains more than one executables
with more than one JAR files.  Some executables are using a common JAR
file with different main classes.  As far as I have seen this case
is not covered by the tutorial you are quoting here:
 
> See:
> /usr/share/doc/javahelper/tutorial.html
> or
> http://pkg-java.alioth.debian.org/docs/tutorial.html
> ...

I have it another shot with an updated Debian directory at

  http://people.debian.org/~tille/packages/beast-mcmc-help-wanted/

but this ends in

   jh_manifest
Syntax error in debian/beast-mcmc.manifest (/usr/share/beast-mcmc/beast.jar) - perhaps you are missing a ":"?
jh_manifest: Unknown line in debian/beast-mcmc.manifest (/usr/share/beast-mcmc/beast.jar),

So I just got it wrong even if I did not yet handled the case of having
different executables with one single jar but different main classes.
Looking again at the docs I wonder whether providing a
debian/beast-mcmc.classpath file using jh_classpath could be useful
here.

> Additionally, looking through the debian/rules file, I don't see you
> declaring jam in the classpath.

Ahhhh, didn't you noticed the string 'jar.jar'? :-) I hoped that it
would be just this typo (it is still in the rules file of the version I
linked to above where I tried the jh_manifest approach but is fixed i

   svn://svn.debian.org/svn/debian-med/trunk/packages/beast-mcmc/trunk/

However, the effect

$ beauti
Exception in thread "main" java.lang.NoClassDefFoundError: jam/framework/MultiDocApplication
 ...

remains the same.
 
> You need to export the "CLASSPATH" variable because that is what
> jh_manifest uses to set the classpath in your jars. By only defining
> it during the ant build, you are intentionally hiding that information
> from jh_manifest. You should either define CLASSPATH in debian/rules

This is what you told me in the FigTree example but I obviosely failed
in doing so / understanding you correctly.  Would you please confirm
that the rules file in SVN

  http://svn.debian.org/wsvn/debian-med/trunk/packages/beast-mcmc/trunk/debian/rules

implements what you suggest to set the CLASSPATH in the rules file?  Do
I need to override_jh_manifest and export CLASSPATH explicitely there?

> or you should make a debian/package.manifest file. Doing both ends up
> being confusing. With java packaging, you need to declare the
> classpath both at build time and at runtime; and you define it at
> runtime through the manifest via jh_manifest (or similar).

I think I got that bit of information to do only one method but I failed
for both. :-(

Thanks for your patience

      Andreas. 

-- 
http://fam-tille.de


Reply to: