Search the web
Sign In
New User? Sign Up
GPCP · Gardens Point Component Pascal
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 437 - 437 of 437   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#437 From: Antony Tersol <tony@...>
Date: Wed Sep 30, 2009 7:55 pm
Subject: Re: JVM on Linux
tonythermo
Offline Offline
Send Email Send Email
 
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)
-----Original Message-----
From: GPCP@yahoogroups.com [mailto:GPCP@yahoogroups.com] On Behalf Of tonythermo
Sent: Tuesday, 29 September 2009 1:55 PM
To: GPCP@yahoogroups.com
Subject: [GPCP] JVM on Linux

 

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.

Here are my PATH and CPSYM variables

antony@laptop:~/gpcp/work$ echo $PATH
/home/antony/gpcp/CP:/home/antony/gpcp/gpcp/bin:/home/antony/gpcp/bin:/home/antony/gpcp/bin:/usr/lib/jvm/java-6-openjdk/jre/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/sbin:/home/antony/gpcp/libs
antony@laptop:~/gpcp/work$ echo $CPSYM
.:/home/antony/gpcp/libs




Messages 437 - 437 of 437   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help