Print

Print


From windows command line (cmd) :

   c:\>   set ECJ_CLASSPATH=C:/ecj

   c:\>  echo %ECJ_CLASSPATH%
   C:/ecj

  then you can run the tutorial 1 code from any directory using:

   C:\>  java -cp %ECJ_CLASSPATH% ec.Evolve -file
c:\ecj\ec\app\tutorial1\tutorial1.params

note that you have to give the absolute path to the parameter file.

If you want to permanently add ECJ_CLASSPATH as environment variable,
go to control panel and under system settings (advanced system
settings popup window)  hit the environment variables button and add
ECJ_CLASSPATH variable.




On Tue, Nov 16, 2010 at 7:13 PM, Ian Barfield <[log in to unmask]> wrote:
> Yeah, I believe it should. I would work under the assumption that your
> classpath is still not correct.
>
> On Tue, Nov 16, 2010 at 11:26 AM, Carlo Rossi <[log in to unmask]> wrote:
>> Thanks I did it and from C\ecj works.
>>  But as said before, having set the classpath to c:\ecj\, shouldn't it work even in any directory??? instead it doens't work. sorry this big lack with path.
>>
>> --- Mar 16/11/10, [log in to unmask] <[log in to unmask]> ha scritto:
>>
>>> Da: [log in to unmask] <[log in to unmask]>
>>> Oggetto: Re: problem launching tutorial1
>>> A: [log in to unmask]
>>> Data: Martedė 16 novembre 2010, 14:51
>>> Hi Carlo,
>>>
>>> Try to run your commamd from C:\ecj and then complete the
>>> path to the param file.
>>>
>>>
>>> ---- Mensaje original ---
>>>
>>> De: Carlo Rossi <[log in to unmask]>
>>> Enviado: 16 de noviembre de 2010 11/16/10
>>> Para: [log in to unmask]
>>> Asunto: problem launching tutorial1
>>>
>>> Hello,
>>>  sorry to bother you with this apparently not-ECJ problem
>>> but at this point Java installation seems fine to me and I
>>> still can't launch the tutorial1 (and it worked months ago!)
>>> with this command:
>>>  java ec.Evolve -file tutorial1.params
>>>
>>> The error is this:
>>> C:\ecj\ec\app\tutorial1>java ec.Evolve -file
>>> tutorial1.params
>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>> ec/Evolve
>>> Caused by: java.lang.ClassNotFoundException: ec.Evolve
>>>         at
>>> java.net.URLClassLoader$1.run(Unknown Source)
>>>         at
>>> java.security.AccessController.doPrivileged(Native Method)
>>>         at
>>> java.net.URLClassLoader.findClass(Unknown Source)
>>>         at
>>> java.lang.ClassLoader.loadClass(Unknown Source)
>>>         at
>>> sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>>         at
>>> java.lang.ClassLoader.loadClass(Unknown Source)
>>> Could not find the main class: ec.Evolve.  Program
>>> will exit.
>>>
>>>
>>>  I tried even to launch it in the directory where
>>> Evolve.class is located. same error. Maybe somebody has very
>>> clear in mind where's the problem.
>>>
>>>  thanks.
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>