Richard Gomes <[email protected]> wrote on 11/05/2010 10:40:21 AM:
> Hi Igor,
>
> I'm also trying the Java compiler but it fails like this:
>
> $ x10 \
> com.jquantlib.math.statistics.StatisticsTests
> `find ~/workspace-x10/xql-statistics/src/main/x10 \
> -type f -name '*.x10' ` \
> `find ~/workspace-x10/xql-statistics/src/test/x10 \
> -type f -name '*.x10' `
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/jquantlib/math/statistics/StatisticsTests$Main
> Caused by: java.lang.ClassNotFoundException:
> com.jquantlib.math.statistics.StatisticsTests$Main
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> Could not find the main class:
> com.jquantlib.math.statistics.StatisticsTests$Main. Program will exit.
>
>
> Yeah... I'm sure I have a main method there:
>
>
>
> public class StatisticsTests {
>
> public static def main(r: Array[String]{self.rank==1}):void {
> val o = new StatisticsTests();
> o.testAll();
> }
>
>
>
> I've also tried a variation of that command, specifying "-classpath" and
> passing relative file names, more or less like exemplified below:
>
>
> $ x10 \
> -classpath /home/rgomes/proj/main/x10:/home/rgomes/proj/test/x10 \
> testpkg.MyTestClass \
> srcpkg/A.x10 srcpkg/B.x10 \
> testpkg/MyTestClass.x10 testpkg/SomeOtherClass.x10
>
>
> What am I doing wrong?
Hi, Richard,
I suspect the classpath is not set up correctly, but to give you
the right incantation, I need to know what your compilation command
(x10c) looked like.
Here's something that I use all the time:
x10c -d out a/b/Foo.x10
x10 -cp out a.b.Foo
Hope this helps,
Igor
--
Igor Peshansky (note the spelling change!)
IBM T.J. Watson Research Center
X10: Parallel Productivity and Performance (http://x10-lang.org/)
XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/)
"I hear and I forget. I see and I remember. I do and I understand" --
Xun Zi
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users