From owner-freebsd-java@FreeBSD.ORG Mon Sep 21 11:18:37 2009 Return-Path: <owner-freebsd-java@FreeBSD.ORG> Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 899751065676 for <freebsd-java@freebsd.org>; Mon, 21 Sep 2009 11:18:37 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from s2m-is-001.service2media.com (rev-130-102.virtu.nl [217.114.102.130]) by mx1.freebsd.org (Postfix) with ESMTP id 219578FC15 for <freebsd-java@freebsd.org>; Mon, 21 Sep 2009 11:18:36 +0000 (UTC) Received: from nox-laptop.localnet ([10.0.1.45] RDNS failed) by s2m-is-001.service2media.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 21 Sep 2009 13:06:31 +0200 From: Pieter de Goeje <pieter@degoeje.nl> To: freebsd-java@freebsd.org Date: Mon, 21 Sep 2009 13:06:30 +0200 User-Agent: KMail/1.11.2 (Linux/2.6.28-12-generic; KDE/4.2.2; x86_64; ; ) References: <d2e731a10909202352g2b13f2e7q73e5a249022fd129@mail.gmail.com> In-Reply-To: <d2e731a10909202352g2b13f2e7q73e5a249022fd129@mail.gmail.com> MIME-Version: 1.0 Message-Id: <200909211306.31039.pieter@degoeje.nl> X-OriginalArrivalTime: 21 Sep 2009 11:06:31.0489 (UTC) FILETIME=[93147310:01CA3AAB] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: grarpamp <grarpamp@gmail.com> Subject: Re: java jar invocation X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD <freebsd-java.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-java>, <mailto:freebsd-java-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-java> List-Post: <mailto:freebsd-java@freebsd.org> List-Help: <mailto:freebsd-java-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-java>, <mailto:freebsd-java-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 21 Sep 2009 11:18:37 -0000 On Monday 21 September 2009 08:52:37 grarpamp wrote: > Hi. Figured it was time to try out java on unix. > Am I completely missing something about java or should these jars be > firing off like applications with this invocation? > Maybe I need a simpler app to test with? > > > RELENG_8 i386 built 20090901 [installworld from RELENG_7] > > # pkg_add > diablo-jre-1.6.0.07.02 > javavmwrapper-2.3.3 > xextproto-7.0.5 > xproto-7.0.15 > xtrans-1.2.3 > > java -jar ./Azureus4.2.0.8.jar > Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/commons/cli/ParseException > Caused by: java.lang.ClassNotFoundException: > org.apache.commons.cli.ParseException > 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:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > > java -jar ./freenet7-freenet-build01232.jar > Exception in thread "main" java.lang.NoClassDefFoundError: > com/sleepycat/je/DatabaseException > Caused by: java.lang.ClassNotFoundException: com.sleepycat.je.DatabaseException > 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:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) The errors are pretty self explanatory: it can't find the class org.apache.commons.cli.ParseException and com.sleepycat.he.DatabaseException. These classes are included in 3rd party libraries which you will have to add to the classpath for this to work. Once you have downloaded these libraries you can add them to the classpath like this: java -cp /path/to/lib1.jar:/path/to/lib2.jar -jar program.jar BTW, Azureus (Vuze) is also in ports. Also you might want to install java/jdk16 instead of diablo-jre16, because in my experience it works better, especially considering you are now running a jre compiled for FreeBSD-7.0. - Pieter