A
Alex Polite
I'm just starting out with java.
Here's a playaround thing that uses regex.
import java.util.*;
import java.util.regex.*;
import java.lang.String;
import java.io.*;
//regex.Pattern p = new regex.Pattern(".*");
public class MarkovModel {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new FileReader("test/test1"));
String str;
while ((str = br.readLine()) != null){
String[] sa = str.split(" ");
for (int i=0; i< sa.length; i++) {
System.out.print(sa);
System.out.print(" ");
}
}
}
}
javac will compile this without a hitch.
jikes however has quite a lot to say:
jikes repos/src/java/jdodo/MarkovModel.java
Issued 3 system warnings:
*** Semantic Warning: The file "/usr/share/java/xalan.jar" does not exist or else is not a valid zip file.
*** Semantic Warning: The file "/usr/share/java/xerces.jar" does not exist or else is not a valid zip file.
*** Semantic Warning: The file "/usr/share/java/fop.jar" does not exist or else is not a valid zip file.
Found 2 semantic errors compiling "repos/src/java/jdodo/MarkovModel.java":
3. import java.util.regex.*;
^-------------^
*** Semantic Error: You need to modify your classpath, sourcepath, bootclasspath, and/or extdirs setup. Package "java/util/regex" could not be found in:
Here's a playaround thing that uses regex.
import java.util.*;
import java.util.regex.*;
import java.lang.String;
import java.io.*;
//regex.Pattern p = new regex.Pattern(".*");
public class MarkovModel {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new FileReader("test/test1"));
String str;
while ((str = br.readLine()) != null){
String[] sa = str.split(" ");
for (int i=0; i< sa.length; i++) {
System.out.print(sa);
System.out.print(" ");
}
}
}
}
javac will compile this without a hitch.
jikes however has quite a lot to say:
jikes repos/src/java/jdodo/MarkovModel.java
Issued 3 system warnings:
*** Semantic Warning: The file "/usr/share/java/xalan.jar" does not exist or else is not a valid zip file.
*** Semantic Warning: The file "/usr/share/java/xerces.jar" does not exist or else is not a valid zip file.
*** Semantic Warning: The file "/usr/share/java/fop.jar" does not exist or else is not a valid zip file.
Found 2 semantic errors compiling "repos/src/java/jdodo/MarkovModel.java":
3. import java.util.regex.*;
^-------------^
*** Semantic Error: You need to modify your classpath, sourcepath, bootclasspath, and/or extdirs setup. Package "java/util/regex" could not be found in: