From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-102376-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1N1nHg-0005yN-6L
	for garchives@archives.gentoo.org; Sat, 24 Oct 2009 20:32:20 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 15A7CE0916;
	Sat, 24 Oct 2009 20:32:19 +0000 (UTC)
Received: from mail-pw0-f47.google.com (mail-pw0-f47.google.com [209.85.160.47])
	by pigeon.gentoo.org (Postfix) with ESMTP id D71CDE0916
	for <gentoo-user@lists.gentoo.org>; Sat, 24 Oct 2009 20:32:18 +0000 (UTC)
Received: by pwj10 with SMTP id 10so2693234pwj.26
        for <gentoo-user@lists.gentoo.org>; Sat, 24 Oct 2009 13:32:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:content-type
         :content-transfer-encoding;
        bh=b7FdU6GsIw/E7TWzhpZrubaUSIAbM0RDHZM77qeggdw=;
        b=cBWAdd96wrg6kwe2rzbtXWxq9XvL85cJVBlA3IShYn3Bu0mrK3Xl2dpmlIlapsaHAf
         yqMiUV0ooyLSnWoIGtlJVL4wH7pkIHnNrHq5fmTyGmTQiRVAi2sJ2rT97z3GL4oK9yWn
         pJl/l8nCa5canw65iC4HHWejJ7IkAOMm7yDkg=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:content-transfer-encoding;
        b=TQyqeyflm6gnsrqH+nyDSoXQkhbfSaCarY/esOkEhqQzl4ALCigetPHCW/hvX2L/6F
         27rj0I7Xg08beJSLIa+rubCFAJcZ5n70H2DC7xWhuu0wcyF/VhgJ2LC5bNHgGbBpZ7Rh
         cIaUXu8aROC0SfHiQX7K/yipABLHMwTJOKs5M=
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.115.133.39 with SMTP id k39mr18648921wan.94.1256416338451; 
	Sat, 24 Oct 2009 13:32:18 -0700 (PDT)
In-Reply-To: <200910242223.09818.alan.mckinnon@gmail.com>
References: <49bf44f10910241312i703d447fj3ffa1156b1bcf074@mail.gmail.com>
	 <200910242223.09818.alan.mckinnon@gmail.com>
Date: Sat, 24 Oct 2009 13:32:18 -0700
Message-ID: <49bf44f10910241332s3206494cp7220dd77c254d95c@mail.gmail.com>
Subject: Re: [gentoo-user] ebuild help: java main class?
From: Grant <emailgrant@gmail.com>
To: gentoo-user@lists.gentoo.org
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 2c6f90a7-c742-4da0-af97-b958155edf1b
X-Archives-Hash: 5b38ce2cc992a28fdb773476a606194f

>> I'm trying to fix up the JAlbum ebuild:
>>
>> http://bugs.gentoo.org/show_bug.cgi?id=3D128356
>>
>> and get it to use java-pkg-2. =A0Here's what I have so far:
>>
>> inherit java-pkg-2 eutils
>>
>> S=3D"${WORKDIR}/Jalbum"
>> DESCRIPTION=3D"Web photo album generator"
>> HOMEPAGE=3D"http://jalbum.net/"
>> SRC_URI=3D"http://jalbum.net/download/Jalbum${PV}.zip"
>>
>> LICENSE=3D"as-is"
>> SLOT=3D"0"
>> KEYWORDS=3D"x86"
>> IUSE=3D""
>>
>> DEPEND=3D">=3Dvirtual/jre-1.5"
>> RDEPEND=3D"${DEPEND}"
>>
>> src_install() {
>> =A0 =A0 java-pkg_dojar JAlbum.jar
>> =A0 =A0 java-pkg_dolauncher jalbum \
>> =A0 =A0 =A0 =A0 --jar JAlbum.jar \
>> =A0 =A0 =A0 =A0 --java_args -Xmx400M
>>
>> =A0 =A0 local dest=3D/usr/lib/${PN}
>> =A0 =A0 dodir ${dest}
>> =A0 =A0 cp -R ${S}/* ${D}/${dest} || die "Install failed"
>>
>> =A0 =A0 doicon ${FILESDIR}/Jalbum-icon.png
>> =A0 =A0 make_desktop_entry ${PN}
>> }
>>
>> It executes just fine, but I get:
>>
>> $ jalbum
>> Error: se.datadosen.jalbum.JAlbum
>> java.lang.ClassNotFoundException: se.datadosen.jalbum.JAlbum
>> =A0 =A0 =A0 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> =A0 =A0 =A0 at java.security.AccessController.doPrivileged(Native Method=
)
>> =A0 =A0 =A0 at java.net.URLClassLoader.findClass(URLClassLoader.java:188=
)
>> =A0 =A0 =A0 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> =A0 =A0 =A0 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>> =A0 =A0 =A0 at se.datadosen.jalbum.Main.main(Main.java:23)
>>
>> I was told I need to define the main class with --main. =A0Does anyone
>> know how to determine what the main class should be?
>
>
> What's the line normally used to launch the app at runtime? That, togethe=
r
> 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?

- Grant