From owner-freebsd-questions@FreeBSD.ORG Sat Jul 1 16:32:01 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D1BB16A412 for ; Sat, 1 Jul 2006 16:32:01 +0000 (UTC) (envelope-from micahjon@ywave.com) Received: from relay2.av-mx.com (relay2.av-mx.com [137.118.16.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id 157AE44F7C for ; Sat, 1 Jul 2006 16:32:00 +0000 (GMT) (envelope-from micahjon@ywave.com) X-Virus-Scan-Time: 0 Received: from [137.118.16.55] (HELO mx3.av-mx.com) by relay2.av-mx.com (CommuniGate Pro SMTP 4.2.10) with SMTP id 318522951 for freebsd-questions@freebsd.org; Sat, 01 Jul 2006 12:32:00 -0400 Received: (qmail 27453 invoked from network); 1 Jul 2006 16:31:59 -0000 Received: from dsl20226.ywave.com (HELO ?192.168.1.65?) (micahjon@ywave.com@216.227.107.226) by mx3.av-mx.com with SMTP; 1 Jul 2006 16:31:59 -0000 X-CLIENT-IP: 216.227.107.226 X-CLIENT-HOST: dsl20226.ywave.com Message-ID: <44A6A37E.2020403@ywave.com> Date: Sat, 01 Jul 2006 09:31:58 -0700 From: Micah User-Agent: Thunderbird 1.5.0.4 (X11/20060611) MIME-Version: 1.0 To: Jim Stapleton References: <80f4f2b20606301943i42ab7839x71600dced83c122e@mail.gmail.com> <80f4f2b20606301954i5cd8cfat886f8ac01f4376ae@mail.gmail.com> <80f4f2b20607010902t67d0b4a8xa2698674ad633b2b@mail.gmail.com> In-Reply-To: <80f4f2b20607010902t67d0b4a8xa2698674ad633b2b@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: one more question, related to java/CLASSPATH X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 16:32:01 -0000 Jim Stapleton wrote: > OK, sorry for being a continuous bother on this, but google is > failling me, and I cannot find a reason for this issue. Java will not > run an app, and everything I've read says that "." should be in the > classpath to make it work, so I'm thinking this is a BSD-Java > implementation related issue. Any ideas? > > > sjss@elrond 11:54:17 (0) ~/dev/java/test > java -classpath . test.java > Exception in thread "main" java.lang.NoClassDefFoundError: test/java > sjss@elrond 11:54:27 (0) ~/dev/java/test > java -version > java version "1.5.0-p3" > Java(TM) 2 Runtime Environment, Standard Edition (build > 1.5.0-p3-root_01_jul_2006_07_53) > Java HotSpot(TM) Client VM (build 1.5.0-p3-root_01_jul_2006_07_53, mixed > mode) > sjss@elrond 11:54:43 (0) ~/dev/java/test > ls > test.class test.java > > > I don't know what other info to send. Running 6.1, the specific port > was ports/java/jdk15 > > > Thanks, > -Jim Java expects the name of a class, not the name of a file. You should invoke your test using "java test" The command "java test.java" is trying to execute a class named "java" in the "test" package. FWIW my classpath is: ./:/usr/local/share/java/classes/junit.jar:/usr/local/freetts/lib/ HTH, Micah