>> >> I'm trying to fix up the JAlbum ebuild: >> >> >> >> http://bugs.gentoo.org/show_bug.cgi?id=128356 >> >> >> >> and get it to use java-pkg-2. Here's what I have so far: >> >> >> >> inherit java-pkg-2 eutils >> >> >> >> S="${WORKDIR}/Jalbum" >> >> DESCRIPTION="Web photo album generator" >> >> HOMEPAGE="http://jalbum.net/" >> >> SRC_URI="http://jalbum.net/download/Jalbum${PV}.zip" >> >> >> >> LICENSE="as-is" >> >> SLOT="0" >> >> KEYWORDS="x86" >> >> IUSE="" >> >> >> >> DEPEND=">=virtual/jre-1.5" >> >> RDEPEND="${DEPEND}" >> >> >> >> src_install() { >> >> java-pkg_dojar JAlbum.jar >> >> java-pkg_dolauncher jalbum \ >> >> --jar JAlbum.jar \ >> >> --java_args -Xmx400M >> >> >> >> local dest=/usr/lib/${PN} >> >> dodir ${dest} >> >> cp -R ${S}/* ${D}/${dest} || die "Install failed" >> >> >> >> doicon ${FILESDIR}/Jalbum-icon.png >> >> make_desktop_entry ${PN} >> >> } >> >> >> >> It executes just fine, but I get: >> >> >> >> $ jalbum >> >> Error: se.datadosen.jalbum.JAlbum >> >> java.lang.ClassNotFoundException: se.datadosen.jalbum.JAlbum >> >> at java.net.URLClassLoader$1.run(URLClassLoader.java:200) >> >> at java.security.AccessController.doPrivileged(Native Method) >> >> at java.net.URLClassLoader.findClass(URLClassLoader.java:188) >> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:307) >> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:252) >> >> at se.datadosen.jalbum.Main.main(Main.java:23) >> >> >> >> I was told I need to define the main class with --main. Does anyone >> >> know how to determine what the main class should be? >> > >> > What's the line normally used to launch the app at runtime? That, >> > together with CLASSPATH will tell you what class should be executed as >> > main() >> >> There is a file called startjalbum.sh which is supposed to be used to >> start the program. It contains: >> >> #!/bin/sh >> java -Xmx400M -jar JAlbum.jar >> >> Does that tell you anything? > > Yes, it does. There's a file called JAlbum.jar which contains the app, and > it's location is visible to the script. There's no path so I'm assuming the > file is in the current directory. > > A .jar is just a special kind of zip file (much like OOo files are). What's > inside it?
# unzip JAlbum.jar Archive: JAlbum.jar creating: META-INF/ inflating: META-INF/MANIFEST.MF creating: se/ creating: se/datadosen/ creating: se/datadosen/jalbum/ inflating: se/datadosen/jalbum/AlbumBeanEvent.class inflating: se/datadosen/jalbum/AlbumBeanListener.class inflating: se/datadosen/jalbum/AlbumEngine.class inflating: se/datadosen/jalbum/Main$1.class inflating: se/datadosen/jalbum/Main.class inflating: se/datadosen/jalbum/MiniConfig.class inflating: se/datadosen/jalbum/OperationAbortedException.class creating: se/datadosen/tags/ inflating: se/datadosen/tags/ElementException.class > p.s. I don't know how familiar you are with Java's start-up process and how it > finds things and how you specify things to find. It's somewhat unusual and > many traps exist for the unwary :-) I'm completely clueless with java. Thanks a lot for your help thus far. - Grant