Hello,
I have created a program and it seems to work in NetBeans. Now I am trying to compile it with the commandline compiler. I can get it to compile with:
It gives no error and makes a class.Code:javac Main.java
Now I run the program with:
It then seems to be running. It asks for input. If I give the same input in the running NetBeans as in the commandline version then it always works in the NetBeans version and in the commandline version I get strange errors.Code:java -classpath . Main
It is often an ArrayIndexOutOfBounds on the following line:
But the same thing does work in NetBeans. Anyone any clue what it could be?Code:s = subResultaat2.split("øø")[1];
/update:
Does it maybe have something to do with my scanner?
[CODE] scanner = new Scanner(System.in, "ISO-8859-1");
scanner.useDelimiter("\n|\r\n|\r");


Reply With Quote