Subject: Re: Any source for Java 1.4 SDK?
To: None <netbsd-help@netbsd.org>
From: Eric Jacoboni <jaco@teaser.fr>
List: netbsd-help
Date: 02/22/2002 19:12:00
>>>>> "Christos" == Christos Zoulas <christos@zoulas.com> writes:

Christos> The most stable java to use is 1.3.1_01 or something. 

Ouch, if that's true, Java and NetBSD are really not good friends! ;-)

Look at this (rather trivial) program :

/-----------------
| import java.io.*;
| public class Chaine2 {
|     public static void main(String args[]) throws IOException {
|         BufferedReader in = 
| 	    new BufferedReader(new InputStreamReader(System.in));
| 
|             System.out.print("> ");
| 	    
| 	    String uneChaine = in.readLine(); // Boom with NetBSD
| 
| 	System.exit(0);
|     } // main
| } // class Chaine
\-----------------

javac compiles it fine...

Any attempt to run "java Chaine2" gives:

/-----------------
| Exception in thread "main" java.io.IOException: Paramètre invalide
|         at java.io.FileInputStream.available(Native Method)
|         at java.io.BufferedInputStream.read(BufferedInputStream.java:282)
|         at java.io.FilterInputStream.read(FilterInputStream.java:93)
|         at java.io.InputStreamReader.fill(InputStreamReader.java:173)
|         at java.io.InputStreamReader.read(InputStreamReader.java:249)
|         at java.io.BufferedReader.fill(BufferedReader.java:139)
|         at java.io.BufferedReader.readLine(BufferedReader.java:299)
|         at java.io.BufferedReader.readLine(BufferedReader.java:362)
|         at Chaine2.main(Chaine2.java:10)
\-----------------

To run it successfully, i have to use "java -client Chaine2". I've not
tested it on others *BSD, nor with Linux (i'll try that on Monday) but
the same program runs ok on Windows 98 with a Sun jdk 1.3.0 (i've
tested as i was not sure my program is correct).

I don't know if it's related to the Linux Emulation (i'm using the
last update, from pkgsrc). But if a simple program like that causes
problems, i wonder with big ones like forte 4 java...
-- 
Éric Jacoboni, né il y a 1317840992 secondes