From owner-freebsd-java@FreeBSD.ORG Fri Mar 16 01:01:05 2007 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B752016A403 for ; Fri, 16 Mar 2007 01:01:05 +0000 (UTC) (envelope-from freebsd@spatula.net) Received: from turing.morons.org (morons.org [64.147.161.226]) by mx1.freebsd.org (Postfix) with ESMTP id A45DF13C44B for ; Fri, 16 Mar 2007 01:01:05 +0000 (UTC) (envelope-from freebsd@spatula.net) Received: by turing.morons.org (Postfix, from userid 1001) id 8E46717058; Thu, 15 Mar 2007 18:01:05 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by turing.morons.org (Postfix) with ESMTP id 8AEC317051; Thu, 15 Mar 2007 18:01:05 -0700 (PDT) Date: Thu, 15 Mar 2007 18:01:05 -0700 (PDT) From: Nick Johnson X-X-Sender: spatula@turing To: "victori@salesdepotinc.com" In-Reply-To: <635C86FC-5150-4528-972E-A5E99418D0A9@salesdepotinc.com> Message-ID: <20070315173523.I97295@turing> References: <635C86FC-5150-4528-972E-A5E99418D0A9@salesdepotinc.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-java@freebsd.org Subject: Re: java/110364 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2007 01:01:05 -0000 I actually get a completely different reaction, not a ParseException: /usr/ports/java/jdk15/work/control/build/bsd-i586/bin/java Test Exception in thread "main" java.lang.NoClassDefFoundError: UnhappyClass at Test.main(Test.java:5) To make matters weirder, if I call my file on FreeBSD Test.java, the same thing happens. But if I call my file test.java (all lowercase), which produces a class called test.class it works. If I call my test file FooBar.java, or TesT.java that is fine as well. It looks like "Test" with no package name is a name you cannot use with diablo JDK. That's a different bug entirely. Incidentally, if I call the class "FooBar" and compile on Windows and run it on FreeBSD, that also works fine. It prints $1.99, just as it should. The same is true for code compiled on Linux. And Solaris. I cannot reproduce this problem using the Diablo JDK built out of ports as of January 28, 2007. Nick On Thu, 15 Mar 2007, victori@salesdepotinc.com wrote: > Anonuser has posted on my behalf, seems like this issue with NumberFormat is > at the bytecode level > > Here is an example testcase: > > import java.text.*; > > public class Test { > public static void main(String[] args) { > try { > System.out.println(NumberFormat.getCurrencyInstance().parse("$1.99").doubleValue()); > } catch (Exception e) { > e.printStackTrace(); > } > } > } > > Save as Test.java ; compile under the SUN JVM: javac Test.java > > > Run the class under the Diablo jvm and you will receive > > -bash-2.05b$ java Test > java.text.ParseException: Unparseable number: "$1.99" > at java.text.NumberFormat.parse(NumberFormat.java:309) > at Test.main(Test.java:6) > > And when I run it with the SUN JDK > > absolute# /usr/local/linux-sun-jdk1.5.0/bin/java Test > 1.99 > > > Works correctly. > > > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > -- "Humans are a dangerously insane and very sick species." -- Eckhart Tolle This message has been brought to you by Nick Johnson 2.2 and the number 6. http://healerNick.com/ http://morons.org/ http://spatula.net/