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 |
> |
52 |
> What's the line normally used to launch the app at runtime? That, together |
53 |
> with CLASSPATH will tell you what class should be executed as main() |
54 |
|
55 |
There is a file called startjalbum.sh which is supposed to be used to |
56 |
start the program. It contains: |
57 |
|
58 |
#!/bin/sh |
59 |
java -Xmx400M -jar JAlbum.jar |
60 |
|
61 |
Does that tell you anything? |
62 |
|
63 |
- Grant |