Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Sun's java software installation programs

  • 01-08-2001 11:42am
    #1
    Registered Users, Registered Users 2 Posts: 11,196 ✭✭✭✭


    I've had a problem lately, in that i downloaded Java SDK 1.3 off the sun website recently. while it installed okay, i am unable to find the console.class file, which is necessary for pretty much all my programs.
    Does anyone know where it is hidden, or where i can download it?

    Thanks



Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    1.3.1

    I'm not aware of any Console package?

    Shouldn't it be something like this...

    Filename = inputtest.java
    import java.io.*;
    
    public class inputtest
    {
     
      public static void main(String args[])
      {
    	BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
    
    	System.out.print("What is your name? > ");
    
    	String name = null;
    
    	try {
    		name = console.readLine();
    	} catch (IOException e) { name = "error!"; }	// shouldn't happen.
    
    	System.out.println("Hello " + name);
    
      }
    
    }
    


  • Registered Users, Registered Users 2 Posts: 4,676 ✭✭✭Gavin


    ho ho ho,

    you would't happen to be in DCU perchance ? And doing CA ? Or maybe using.. bah cant remember the name of the book.

    Anyway, the console class you have used, probaly in college, is not part of the standard jdk. It is part of a book, java 2 something. Search google for it and you might get lucky

    Gav


  • Registered Users, Registered Users 2 Posts: 11,196 ✭✭✭✭Crash


    Ah that would be it. i'm not actually in college there but i did a course in java there.

    Thanks for your help, thats been driving me insane for a week or two.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    huh?

    Worked fine for me. Did you set your CLASSPATH? All the binarys are kept in the Bin directory.



  • Registered Users, Registered Users 2 Posts: 11,196 ✭✭✭✭Crash


    Yeh, its not that the javac or java commands wont work, its that when i try to compile any program that uses Console.readInt or Console.readString, it ****s up.

    Hobbes, Which version are you using?


  • Advertisement
Advertisement