Page 1 of 1

restricted function??

Posted: Wed Aug 15, 2007 2:43 pm
by taz
Hi there,

I am having serious frustrations getting the input in.
its a simple input ==> 2 integers.

It compiles and runs fine locally but not here...

Using bufferedreader and tokenizer is sending restricted function messages (i guess). I've tried shifting things inside and outside, making things static or not etc.
Can someone please tell me whats wrong with the following basic input code?
And how to fix it???

import java.util.*;
class Main
static BufferedReader in = new BufferedReader(new InputStreamReader(;

public static void main (String[] args)
StringTokenizer st = new StringTokenizer(in.readLine());
int nu1 = Integer.parseInt(st.nextToken());
int nu2 = Integer.parseInt(st.nextToken());
catch(IOException x){}


Posted: Wed Aug 15, 2007 8:24 pm
by Darko
There is a topic with exactly the same title (including the number of question marks) on this very page. I know that using Java here is really frustrating, but you should at least try to look for the answers before posting a question.

Oh, well...
- UVa "Java" is Java 1.1 with a lot of things removed (gcj makers claim it is 1.2, but I haven't seen a single thing from 1.2)
- Most of* is restricted, including BufferedReader
- You can write your own read/write routines (and some of them are posted around here), but I would suggest waiting for their new system, it seems to be almost done and will fully support newest Java. The link is available at the main page( ).