More info: If I cd into the examples/hello directory, and try to run Hello I get the same errors, so it would seem to perhaps be a problem of finding the appropriate classes.
I have cat cprun below. Is there perhaps a problem with the argument to "classpath"?
antony@laptop:~/gpcp/examples/hello$ cprun Hello Exception in thread "main" java.lang.NoClassDefFoundError: CP/CPmain/CPmain at CP.Hello.Hello.main(Hello.cp) Caused by: java.lang.ClassNotFoundException: CP.CPmain.CPmain
at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) ... 1 more
antony@laptop:~/gpcp/examples/hello$ cat ../../bin/cprun #!/bin/sh # run a Component Pascal Program # java -DCPSYM=.:$CPROOT/libs:$CPROOT/libs/JvmSystem -classpath .:$CPROOT CP.$1.$1 $2 $3 $4 $5 $6 $7 $8 $9
#
On Tue, Sep 29, 2009 at 3:45 PM, Antony Tersol <tony@...> wrote:
Thanks.
If it's helpful, here's more log. If I am not in the work directory, but in CPROOT, then the error messages are different - it then can't find the symbol files.
Additional log:
antony@laptop:~/gpcp$ cprun gpcp work/hello.cp
2 IMPORT CPmain, Console; **** ---------^ Cannot open symbol file **** -----------------^ Cannot open symbol file **** Filename <Console.cps> **** Filename <CPmain.cps> 4 Console.WriteString("Hello CP World");
**** ----------^ Identifier not known in qualified scope 5 Console.WriteLn; **** ----------^ Identifier not known in qualified scope #gpcp: <Hello> There were 4 errors antony@laptop:~/gpcp$ echo $CPSYM
/home/antony/gpcp/libs antony@laptop:~/gpcp$ CPSYM=$CPSYM:$CPROOT/CP antony@laptop:~/gpcp$ cprun gpcp work/hello.cp 2 IMPORT CPmain, Console; **** ---------^ Cannot open symbol file **** -----------------^ Cannot open symbol file
**** Filename <Console.cps> **** Filename <CPmain.cps> 4 Console.WriteString("Hello CP World"); **** ----------^ Identifier not known in qualified scope 5 Console.WriteLn; **** ----------^ Identifier not known in qualified scope
#gpcp: <Hello> There were 4 errors antony@laptop:~/gpcp$ cd work antony@laptop:~/gpcp/work$ cprun gpcp hello.cp
Exception in thread "main" java.lang.NoClassDefFoundError: CP/gpcp/gpcp
Caused by: java.lang.ClassNotFoundException: CP.gpcp.gpcp
at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) Could not find the main class: CP.gpcp.gpcp. Program will exit.
On Tue, Sep 29, 2009 at 1:17 PM, K John Gough <john@...> wrote:
Hi Anthony
I'll have a look at your log, then get back to you.
Cheers
John
What can't be said can't be said, and it can't be whistled either. (Frank Ramsay's retort to Wittgenstein)
I'm new to GPCP, but have been programming in BlackBox for quite a while. I'm trying to get started, and have followed the directions in the readme files. When I try to compile hello.cp, the following happens. Any ideas of what I need to do?
Thanks,
Antony
antony@laptop:~/gpcp/work$ cprun gpcp -verbose hello.cp Exception in thread "main" java.lang.NoClassDefFoundError: CP/gpcp/gpcp Caused by: java.lang.ClassNotFoundException: CP.gpcp.gpcp at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) Could not find the main class: CP.gpcp.gpcp. Program will exit.