From: Luis Parravicini Date: 2007-06-21T20:59:48+09:00 Subject: Re: Problems executing example code from xruby On 6/20/07, Axel Etzold wrote: > ... > From the little Java I know so far, I suspect > that this error is due to java not finding the class > file that xruby generates. Is this true? Where are they > stored -- inside a *jar file ? How do I tell java where they are? > > .... > > > > axel@dhcppc1:~> java -jar test.jar > Exception in thread "main" java.lang.NoClassDefFoundError: com/xruby/runtime/lang/RubyProgram > at java.lang.ClassLoader.defineClass1(Native Method) > ... Haven't used xruby myself but com.xruby.runtime.lang.RubyProgram seems from xruby and not from the generated code. Maybe you need xruby in your classpath? Putting the needed jars on the environment variable CLASSPATH or using java -classpath argument might help. Try something like 'java -classpath /path/to/xruby.jar -jar test.jar' You can read http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html or http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html for more information on how to set up the classpath. -- Luis Parravicini http://ktulu.com.ar/blog/