On Wed, Feb 16, 2011 at 4:59 PM, Andreas Tille <andr...@an3as.eu> wrote: > with debian/figtree.manifest which was determining the CLASSPATH for the > executable jar. I considered this way as quite useful and would like to > try it for beast-mcmc as well (even if it is no real request - any other > way would be welcome for sure). The problem is that the beast-mcmc > package contains more than one package and I'm afraid I did not > correctly interpreted the debian/manifest syntax for this case. For > those who would be kind enough to have a look I uploaded the source to > > http://people.debian.org/~tille/packages/beast-mcmc-help-wanted/
I don't use java except to package science software written in java (like Andreas), so I went through similar pains. I haven't built the package, but the debian/__beast-mcmc.manifest__ doesn't appear to be in javahelper manifest form. See: /usr/share/doc/javahelper/tutorial.html or http://pkg-java.alioth.debian.org/docs/tutorial.html "Many upstream build systems do not set the Class-Path attribute in the jars they create. This leads to several unwanted problems, such as expanding the classpath which applications have to use and introducing unneccessary transitions. They also may not set the Main-Class attribute. Both of these are required for running jars with the -jar parameter. jh_manifest can fix the manifest files of jars. It can either read from a manifest file in the Debian directory or run in a mode which updates all the jars with the CLASSPATH environment variable. The manifest files can either be debian/package.manifest or debian/manifest. The format of this file is a list of jars and indented below each one a list of manifest elements to set: usr/share/weirdx/weirdx.jar: Main-Class: com.jcraft.weirdx.WeirdX Debian-Java-Home: /usr/lib/jvm/default-java " Additionally, looking through the debian/rules file, I don't see you declaring jam in the classpath. 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 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). Cheers, Scott -- To UNSUBSCRIBE, email to debian-java-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktimd9orwuqsqbnk6ng4-8-hqexwbcvk5gu7pk...@mail.gmail.com