From owner-freebsd-java@FreeBSD.ORG Fri Mar 16 01:30:10 2007 Return-Path: <owner-freebsd-java@FreeBSD.ORG> X-Original-To: freebsd-java@hub.freebsd.org Delivered-To: freebsd-java@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FC9916A400 for <freebsd-java@hub.freebsd.org>; Fri, 16 Mar 2007 01:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 2628513C457 for <freebsd-java@hub.freebsd.org>; Fri, 16 Mar 2007 01:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2G1UAcd042507 for <freebsd-java@freefall.freebsd.org>; Fri, 16 Mar 2007 01:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2G1U9IX042506; Fri, 16 Mar 2007 01:30:09 GMT (envelope-from gnats) Date: Fri, 16 Mar 2007 01:30:09 GMT Message-Id: <200703160130.l2G1U9IX042506@freefall.freebsd.org> To: freebsd-java@FreeBSD.org From: Nick Johnson <freebsd@spatula.net> Cc: Subject: Re: java/110364 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nick Johnson <freebsd@spatula.net> 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: Fri, 16 Mar 2007 01:30:10 -0000 The following reply was made to PR java/110364; it has been noted by GNATS. From: Nick Johnson <freebsd@spatula.net> To: "victori@salesdepotinc.com" <victori@salesdepotinc.com> Cc: freebsd-java@freebsd.org, FreeBSD-gnats-submit@FreeBSD.org Subject: Re: java/110364 Date: Thu, 15 Mar 2007 18:01:05 -0700 (PDT) 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/