Results 1 to 1 of 1
- 10-05-2009, 11:25 PM #1
Member
- Join Date
- Oct 2009
- Posts
- 1
- Rep Power
- 0
Source works in NetBeans but not with java/javac (commandline)
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:
- "javac Main.java"
It gives no error and makes a class.
Now I run the program with:
Code:
- "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("øø")[1];
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");
scanner.useDelimiter("\n|\r\n|\r");
Similar Threads
-
Unable to Run PDF Box from commandline
By jazz2k8 in forum Advanced JavaReplies: 0Last Post: 03-24-2009, 06:37 AM -
Compile the java source from netbeans to binary
By fbnsantos in forum NetBeansReplies: 2Last Post: 01-06-2009, 04:44 AM -
[SOLVED] commandline arguements
By raghu9198 in forum New To JavaReplies: 3Last Post: 12-23-2008, 09:47 AM -
What are the hot java frames works on demand
By mallaravi in forum Web FrameworksReplies: 1Last Post: 10-28-2008, 01:34 PM -
source code of 'javac'?
By Pooja Deshpande in forum Advanced JavaReplies: 2Last Post: 06-04-2008, 11:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks