Gentoo Archives: gentoo-user

From: Grant <emailgrant@×××××.com>
To: Gentoo mailing list <gentoo-user@l.g.o>
Subject: [gentoo-user] ebuild help: java main class?
Date: Sat, 24 Oct 2009 20:12:25
Message-Id: 49bf44f10910241312i703d447fj3ffa1156b1bcf074@mail.gmail.com
1 I'm trying to fix up the JAlbum ebuild:
2
3 http://bugs.gentoo.org/show_bug.cgi?id=128356
4
5 and get it to use java-pkg-2. Here's what I have so far:
6
7 inherit java-pkg-2 eutils
8
9 S="${WORKDIR}/Jalbum"
10 DESCRIPTION="Web photo album generator"
11 HOMEPAGE="http://jalbum.net/"
12 SRC_URI="http://jalbum.net/download/Jalbum${PV}.zip"
13
14 LICENSE="as-is"
15 SLOT="0"
16 KEYWORDS="x86"
17 IUSE=""
18
19 DEPEND=">=virtual/jre-1.5"
20 RDEPEND="${DEPEND}"
21
22 src_install() {
23 java-pkg_dojar JAlbum.jar
24 java-pkg_dolauncher jalbum \
25 --jar JAlbum.jar \
26 --java_args -Xmx400M
27
28 local dest=/usr/lib/${PN}
29 dodir ${dest}
30 cp -R ${S}/* ${D}/${dest} || die "Install failed"
31
32 doicon ${FILESDIR}/Jalbum-icon.png
33 make_desktop_entry ${PN}
34 }
35
36 It executes just fine, but I get:
37
38 $ jalbum
39 Error: se.datadosen.jalbum.JAlbum
40 java.lang.ClassNotFoundException: se.datadosen.jalbum.JAlbum
41 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
42 at java.security.AccessController.doPrivileged(Native Method)
43 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
44 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
45 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
46 at se.datadosen.jalbum.Main.main(Main.java:23)
47
48 I was told I need to define the main class with --main. Does anyone
49 know how to determine what the main class should be?
50
51 - Grant

Replies

Subject Author
Re: [gentoo-user] ebuild help: java main class? Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] ebuild help: java main class? "Arttu V." <arttuv69@×××××.com>
Re: [gentoo-user] ebuild help: java main class? Justin <justin@×××××××××.net>