When I used Jikes rvm to run my program "GenRegex.class",
jikesrvm-3.1.2/dist/production_x86_64-linux/rvm GenRegex grammars/cfg_nse.g
I got the runtime err:
Exception in thread "MainThread" java.lang.NoClassDefFoundError: Could not find the class java.util.Scanner: java.util.Scanner at java.lang.Error.(Error.java:81) at java.lang.LinkageError.(LinkageError.java:72) at java.lang.NoClassDefFoundError.(NoClassDefFoundError.java:74) at org.jikesrvm.classloader.TypeReference.resolveInternal(TypeReference.java:813) at org.jikesrvm.classloader.TypeReference.resolve(TypeReference.java:799) at org.jikesrvm.runtime.RuntimeEntrypoints.unresolvedNewScalar(RuntimeEntrypoints.java:264) at GenRegex.genRule(GenRegex.java:12) at GenRegex.main(GenRegex.java:1133)
Below is my code
1 import java.util.*; 2 import java.io.*; 3 4 public class GenRegex{ 5 6 Rule[] genRule(String fileName) throws IOException 7 { 8 String line = ""; 9 String str = ""; 10 ArrayList ruleList = new ArrayList(); 11 Rule[] ruleArray; 12 Scanner scanner = new Scanner(new FileInputStream(fileName));
Even after I add a line "import java.util.Scanner;" I still got this err. Any clue? Thanks!