[antlr-interest] Import a class or a jar file in ANTLRWorks

Jose María Chumo Mata jmchuma at gmail.com
Wed Apr 28 05:39:09 PDT 2010


As I said you can specify the classpath which indicates java and javac
where to find your java classes.

On Wed, Apr 28, 2010 at 14:12, Razvan Radu <razvansr at yahoo.com> wrote:
> Not the path for javac or java.
> I need the path where i can put jar files that i created.
> Concrete:
> in my .g example when it maches a rule i need to create an instance of an object from one of my classe:
>
> rule    :       case1 { Object1 o = new Object1();}
>
> Object1, and others, are in other project made in eclipse. It is posible to see them here? i try to puth the .java file, the .class file, the .jar generated fiele in the same directory but it dosen't work. What's the solution?
>
> Thank You
>
>
>
>
>
> ________________________________
> From: Jose María Chumo Mata <jmchuma at gmail.com>
> To: Razvan Radu <razvansr at yahoo.com>
> Cc: antlr-interest at antlr.org
> Sent: Wed, April 28, 2010 3:01:30 PM
> Subject: Re: [antlr-interest] Import a class or a jar file in ANTLRWorks
>
> You can specify the path and the classpath for java and javac in the
> ANTLRWorks preferences. I've never done it but I think this is what
> you are looking for.
>
> On Wed, Apr 28, 2010 at 13:50, Razvan Radu <razvansr at yahoo.com> wrote:
>> Hello,
>> In the last days i search everywhere for an answer to this:
>> How can i import a class or a jar file in my .g file in ANTLRWorks.
>> I se that you can import thinks like:
>>
>> @header {
>> import java.util.HashMap;
>> }
>>
>> but i can't import classes that i created in other project, or jar files of that project.
>> I tried everythink, for example:
>>
>> @header {
>> import mypackage.ClassName;
>> }
>> and i put this jar in the same location whit the .g file and the generated files, but it dosen't work.
>>
>> Please help me!
>>
>> Thank you.
>>
>>
>>
>>
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>>
>
>
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list