Print

Print


Vimaladevi,

You generally can't compile a program one file at a time, which is why
compiling Evolve.java by itself doesn't work.  The different classes in ECJ
depend on each other.

The standard way to build ECJ from the command line is to use the Makefile
that the zip comes with.  Setting up GNU Make on Windows can be tricky, so
using Eclipse to build it as as good a route as any.

You need to learn where Eclipse places the files that it compiles.  Running
ECJ from the command line should be the same as running any other Eclipse
project from the command line—so this question is really outside the scope
of this list.

Siggy




On Sun, Jan 31, 2016 at 2:36 PM, Vimaladevi M <[log in to unmask]>
wrote:

> Please check this Mr. Siggy
>
> i tried in different directories.
>
> [image: Inline image 1]
>
> and also when i compile Evolve.java, i m getting errors. packages are not
> imported as expected. do you have any idea about this?
>
> [image: Inline image 2]
>
>
> [image: Inline image 3]
>
> On Mon, Feb 1, 2016 at 12:36 AM, Eric 'Siggy' Scott <[log in to unmask]>
> wrote:
>
>> Vimaladevi,
>>
>> To run a Java class from the command line, you need to either be in the
>> directory containing the compiled .class files,
>> or have those files in your classpath.
>>
>> I'm not an Eclipse user, so I don't know where Eclipse places the .class
>> files.  But if I were to take a guess—you might try
>> running the command from inside the 'test' directory instead of the
>> 'test/ec' directory?
>>
>> Siggy
>>
>> On Sun, Jan 31, 2016 at 1:22 PM, Vimaladevi M <[log in to unmask]>
>> wrote:
>>
>>> Hi Mr. Siggy
>>>
>>> Thanks for your reply.
>>>
>>> i imported ecj\ec files into a new project in eclipse.
>>> when i tried to run it, i got the below error in eclipse console and
>>> command prompt too.
>>> "Error: Could not find or load main class ec.Evolve"
>>>
>>> but i was able to clear this error now. for this what i did was deleted
>>> ".metadata" folder and created a new project again and imported the ecj\ec
>>> classes. i m able to run the tutorial1 using eclipse. but the problem still
>>> persists if i run through command prompt. please see the below screenshot.
>>> [image: Inline image 1]
>>>
>>>
>>> [image: Inline image 2]
>>>
>>>
>>>
>>> On Sun, Jan 31, 2016 at 8:52 PM, Eric 'Siggy' Scott <[log in to unmask]>
>>> wrote:
>>>
>>>> Vimaladevi,
>>>>
>>>> Can you give us some more information?  How exactly are you trying to
>>>> run it?
>>>>
>>>> Siggy
>>>>
>>>> On Sun, Jan 31, 2016 at 1:48 AM, Vimaladevi M <[log in to unmask]>
>>>> wrote:
>>>>
>>>>> Hi All
>>>>>
>>>>> I am trying to ECJ for my research work.
>>>>>
>>>>> I get the following error when I try to run the tutorial programs.
>>>>> "Error: Could not find or load main class ec.Evolve"
>>>>>
>>>>> I have tried  setting path variables and I am using Eclipse mars
>>>>> version
>>>>>
>>>>> Please help me out.
>>>>>
>>>>> --
>>>>>
>>>>> Thanks & Warm Regards
>>>>>
>>>>> VIMALADEVI M
>>>>>
>>>>> Mobile No. 94423 65903
>>>>>
>>>>> Mail to: [log in to unmask]
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Ph.D student in Computer Science, George Mason University
>>>> CFO and Web Director, Journal of Mason Graduate Research
>>>> http://mason.gmu.edu/~escott8/
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Thanks & Warm Regards
>>>
>>> VIMALADEVI M
>>>
>>> Mobile No. 94423 65903
>>>
>>> Mail to: [log in to unmask]
>>>
>>>
>>>
>>
>>
>> --
>>
>> Ph.D student in Computer Science, George Mason University
>> CFO and Web Director, Journal of Mason Graduate Research
>> http://mason.gmu.edu/~escott8/
>>
>
>
>
> --
>
> Thanks & Warm Regards
>
> VIMALADEVI M
>
> Mobile No. 94423 65903
>
> Mail to: [log in to unmask]
>
>
>


-- 

Ph.D student in Computer Science, George Mason University
CFO and Web Director, Journal of Mason Graduate Research
http://mason.gmu.edu/~escott8/