Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Sun's java software installation programs

  • 01-08-2001 11:42AM
    #1
    Registered Users, Registered Users 2, Paid Member Posts: 11,210 ✭✭✭✭


    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,660 ✭✭✭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, Paid Member Posts: 11,210 ✭✭✭✭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, Paid Member Posts: 11,210 ✭✭✭✭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