Results 1 to 1 of 1
- 10-05-2009, 11:25 PM #1Member
- Join Date
- Oct 2009
- Rep Power
Source works in NetBeans but not with java/javac (commandline)
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:
- "javac Main.java"
It gives no error and makes a class.
Now I run the program with:
- "java -classpath . Main"
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.
It is often an ArrayIndexOutOfBounds on the following line:
s = subResultaat2.split("°°");
But the same thing does work in NetBeans. Anyone any clue what it could be?
Does it maybe have something to do with my scanner?
[code] scanner = new Scanner(System.in, "ISO-8859-1");
- By jazz2k8 in forum Advanced JavaReplies: 0Last Post: 03-24-2009, 07:37 AM
- By fbnsantos in forum NetBeansReplies: 2Last Post: 01-06-2009, 05:44 AM
- By raghu9198 in forum New To JavaReplies: 3Last Post: 12-23-2008, 10:47 AM
- By mallaravi in forum Web FrameworksReplies: 1Last Post: 10-28-2008, 02:34 PM
- By Pooja Deshpande in forum Advanced JavaReplies: 2Last Post: 06-04-2008, 11:24 AM