java/110364
Nick Johnson
freebsd at spatula.net
Fri Mar 16 01:30:10 UTC 2007
The following reply was made to PR java/110364; it has been noted by GNATS.
From: Nick Johnson <freebsd at spatula.net>
To: "victori at salesdepotinc.com" <victori at salesdepotinc.com>
Cc: freebsd-java at freebsd.org, FreeBSD-gnats-submit at 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 at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-java
> To unsubscribe, send any mail to "freebsd-java-unsubscribe at 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/
More information about the freebsd-java
mailing list