Problem with the import of packets in antlrworks
Have to create a package defined by me, containing some of the classes, and I recall that package in a file .java created of the program AntlrWorks in which i did the import. Package named "com.project开发者_运维技巧.redfox" . I compiled the code with the command: "javac Test.java provaParser.java provaLexer.java" but I get the error that not exist the package.
In the grammar have added :
grammar prova;
@hader{
import com.project.redfox;
}
....something......
I created the package "com.project.redfox" within of the project redfox developed in NetBeans, therefore the directory com/project/redfox is in the directory redfox.
how can I solve this problem?
To formally answer your question: javac
can't find the package com.wikirates
which you are probably using in com.project.redfox
.
Note that I assumed redfox
is a class. If it's a package, you need to import all classes from it like this: import com.project.redfox.*;
instead of import com.project.redfox;
(assuming that there are classes in com.project.redfox
...).
精彩评论