Im trying to get this to work on a mac, it works just fine on linux.
public class URLTest {
public static void main(String[] args) {
try{
String webpage="Insert random webpage here";
InputStream in = new URL(webpage).openConnection().getInputStream();
InputStreamReader reader = new InputStreamReader(in);
while(reader.ready())
System.out.print((char)reader.read());
}catch (IOException e){
;
}
}
On mac I just get numbers as output and on windows I get nothing. Any idea to get this working on all systems?
Cheers