hey, i have a question about this java compiler i installed on Gentoo recently, called JavaCC. i tried compiling a simple java program:
import java.awt.*;
public class JavaTest {
public JavaTest() {
System.out.println("\n\n\n\nTesting!\n\n\n");
}
public static void main(String argv[]) {
JavaTest testclass = new JavaTest();
}
}
- import java.awt.*;
- public class JavaTest {
- public JavaTest() {
- System.out.println("\n\n\n\nTesting!\n\n\n");
- }
- public static void main(String argv[]) {
- JavaTest testclass = new JavaTest();
- }
- }
But when i go to compile it, like so:
Java Compiler Compiler Version 3.2 (Parser Generator)
(type "javacc" with no arguments for help)
Reading from file JavaTest.java . . .
org.javacc.parser.ParseException: Encountered "import" at line 1, column 1.
Was expecting one of:
"options" ...
"PARSER_BEGIN" ...
Detected 1 errors and 0 warnings.
- Java Compiler Compiler Version 3.2 (Parser Generator)
- (type "javacc" with no arguments for help)
- Reading from file JavaTest.java . . .
- org.javacc.parser.ParseException: Encountered "import" at line 1, column 1.
- Was expecting one of:
- "options" ...
- "PARSER_BEGIN" ...
- Detected 1 errors and 0 warnings.
obviously, the problem is something to do with the options, so i played with the options. it didnt help, still the same problems. I wasnt sure if i should post this in the linux forum or the programming forum, but i figured the linux people would be able to handle it better. move it if you wish, it doesnt matter to me.