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 ) id 1N1n9s-00057N-16 for garchives@archives.gentoo.org; Sat, 24 Oct 2009 20:24:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCB77E08ED; Sat, 24 Oct 2009 20:24:14 +0000 (UTC) Received: from mail-ew0-f211.google.com (mail-ew0-f211.google.com [209.85.219.211]) by pigeon.gentoo.org (Postfix) with ESMTP id 9B1AAE08ED for ; Sat, 24 Oct 2009 20:24:14 +0000 (UTC) Received: by ewy7 with SMTP id 7so9162429ewy.34 for ; Sat, 24 Oct 2009 13:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=rORW7i2bTQ4KREfaLhiXTMnHNcqA6vWXBxHHl1PjSCQ=; b=EKMY7kUk5r7D09bFX3z0bVZUJ4fvi9ZqoU5KiQkQFotioiymMJ0zEjjLqYIgG+SlY5 P/2TGSslN9y/C8vQuVkB2GRbSrw7s1yS5vR9cADT6TgQyn6HMIL4B65MiZXeea2YTSk6 Vj/0HA9AdtOMvx5YPUFkIpAxALC04HOTRBvEk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=N12vGqEcAUM2FG2gp7s9hR8IP8yeZsT5IBHBR+8KgJD3TG6F2zEFYaByMsFMfe/l06 jQZgF5pM1O711wndFiFVPCPfk5tzUBYXlZqrIhIi0j4h4Ch/cKI7EIJrnZliOfc0M/oy vhOZCdZDNEmStbNux0X1y1M3VWLkPSHClptbI= Received: by 10.211.147.8 with SMTP id z8mr704893ebn.87.1256415853963; Sat, 24 Oct 2009 13:24:13 -0700 (PDT) Received: from nazgul.localnet (196-210-153-40-rrdg-esr-2.dynamic.isadsl.co.za [196.210.153.40]) by mx.google.com with ESMTPS id 5sm8539086eyh.34.2009.10.24.13.24.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 24 Oct 2009 13:24:13 -0700 (PDT) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] ebuild help: java main class? Date: Sat, 24 Oct 2009 22:23:09 +0200 User-Agent: KMail/1.12.2 (Linux/2.6.31-zen4; KDE/4.3.2; x86_64; ; ) References: <49bf44f10910241312i703d447fj3ffa1156b1bcf074@mail.gmail.com> In-Reply-To: <49bf44f10910241312i703d447fj3ffa1156b1bcf074@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200910242223.09818.alan.mckinnon@gmail.com> X-Archives-Salt: 328a381a-3e19-4b8d-8766-2355063f4638 X-Archives-Hash: 3f2f1e92fbe5f09f4e949405687c6f38 On Saturday 24 October 2009 22:12:22 Grant wrote: > 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() -- alan dot mckinnon at gmail dot com