From: Per Bothner <per@bothner.com>
To: Damien MATTEI <Damien.Mattei@unice.fr>,
Kawa mailing list <kawa@sourceware.org>
Subject: Re: calling external classes method from kawa
Date: Thu, 02 Jun 2016 14:34:00 -0000 [thread overview]
Message-ID: <e1e43c67-5bba-6a1d-aaf4-29bd674068a4@bothner.com> (raw)
In-Reply-To: <201606021612.24180.Damien.Mattei@unice.fr>
On 06/02/2016 07:12 AM, Damien MATTEI wrote:
> java -jar /usr/local/share/java/kawa-2.1.jar -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
Note that documentation for the java command says:
When you use the -jar option, the specified JAR file is the source of all
user classes, and other class path settings are ignored.
So you may need to use a -cp flag instead, and explicitly name kawa.repl :
java -cp /usr/local/share/java/kawa-2.1.jar:other.jar kawa.repl -C ResultatGeneralFKawa.scm
The Kawa command allows you to use a CLASSPATH enviornment variable.
The -jar option overrides the classpath. Instead you
> the problem is that the documention say i can use -J option to pass java arguments such as defining classpath but it does not works:
>
> kawa -J
> Unrecognized option: -J
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
Huh? A standalone -J makes no sense, since you didn' specify any options.
Instead, you can do:
kawa -J-cp -Jmyclasses.jar
Note you have to use two -J's - one for each JVM option.
It might be easier to use a CLASSPATH environment variable.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
next prev parent reply other threads:[~2016-06-02 14:34 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 [this message]
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
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=e1e43c67-5bba-6a1d-aaf4-29bd674068a4@bothner.com \
--to=per@bothner.com \
--cc=Damien.Mattei@unice.fr \
--cc=kawa@sourceware.org \
/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).