public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Damien MATTEI <Damien.Mattei@unice.fr>
To: Per Bothner <per@bothner.com>
Cc: Kawa mailing list <kawa@sourceware.org>
Subject: Re: calling external classes method from kawa
Date: Fri, 03 Jun 2016 08:18:00 -0000	[thread overview]
Message-ID: <201606031018.34393.Damien.Mattei@unice.fr> (raw)
In-Reply-To: <02f35a54-28ec-632a-496e-4ea1161ff0c8@bothner.com>

thanks you,

finally we got it:
[mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:/home/mattei/NetBeansProjects/Sidonie/build/web/WEB-INF/classes kawa.repl -C ResultatGeneralFKawa.scm
(compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)

no more warnings at compilation (will check the runtime later)

for info -J option seems unrecognized on my kawa version (compiled from sources) but that's not a problem as it compiles the other way:

[mattei@moita Jkawa]$ kawa -J-cp -J/home/mattei/NetBeansProjects/Sidonie/build/web/WEB-INF/classes -C ResultatGeneralFKawa.scm
Unrecognized option: -J-cp
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Damien

Le Thursday 02 June 2016 18:20:26 Per Bothner, vous avez écrit :
> 
> On 06/02/2016 08:06 AM, Damien MATTEI wrote:
> 
> > [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:~/NetBeansProjects/Sidonie/build/web/WEB-INF/classes kawa.repl -C ResultatGeneralFKawa.scm
> > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
> > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' in java.lang.Object
> > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oca.DataBase
> > [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:~/NetBeansProjects/Sidonie/build/web/WEB-INF/classes/eu/oca kawa.repl -C ResultatGeneralFKawa.scm
> > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
> > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' in java.lang.Object
> > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oca.DataBase
> > [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:~/NetBeansProjects/Sidonie/build/web/WEB-INF/classes/eu/oca/DataBase.class kawa.repl -C ResultatGeneralFKawa.scm
> > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
> > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' in java.lang.Object
> > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oca.DataBase
> 
> I don't believe '~' would work for the home directory.
> It is normally expanded by the shell - but only when it's the first character in a "word".
> 
> > [mattei@moita Jkawa]$ locate Sidonie.war
> > /home/mattei/Sidonie.war
> > /home/mattei/NetBeansProjects/Sidonie/dist/Sidonie.war
> > /usr/local/apache-tomcat-8.0.27/webapps/Sidonie.war
> > [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:/home/mattei/NetBeansProjects/Sidonie/dist/Sidonie.war kawa.repl -C ResultatGeneralFKawa.scm
> > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
> > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' in java.lang.Object
> > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oca.DataBase
> 
> I don't believe a 'war' file can be used as if it were a 'jar' file.
> It has a special layout, where classes are in WEB-INF/classes, which the JVM doesn't know about.
> For that to work, you have to get a non-empty result from
> 
> jar tvf /home/mattei/NetBeansProjects/Sidonie/dist/Sidonie.war eu/oca/DataBase/helloStatic.class
> 
> > any idea?
> 
> Don't use '~' in paths.
> 
> > if i can not do it in kawa, i will make it with bigloo as i have not this problem with it ,but i will keep trying again later...
> 
> It's almost certainly not a Kawa bug.
> 



-- 
Damien.Mattei@unice.fr, Damien.Mattei@oca.eu, UNS / OCA / CNRS

  reply	other threads:[~2016-06-03  8:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 14:12 Damien MATTEI
2016-06-02 14:34 ` Per Bothner
2016-06-02 14:53   ` Damien MATTEI
2016-06-02 15:07   ` Damien MATTEI
2016-06-02 16:20     ` Per Bothner
2016-06-03  8:18       ` Damien MATTEI [this message]
2016-06-03  8:34         ` Damien MATTEI
2016-06-03 12:55         ` Per Bothner
2016-06-03 13:21           ` Damien MATTEI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201606031018.34393.Damien.Mattei@unice.fr \
    --to=damien.mattei@unice.fr \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).