From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70921 invoked by alias); 2 Jun 2016 14:53:23 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 70903 invoked by uid 89); 2 Jun 2016 14:53:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.5 required=5.0 tests=AWL,BAYES_00,FOREIGN_BODY1,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*Ad:U*kawa, avez, D*eu, servlet X-HELO: smtps-n.oca.eu Received: from smtps-n.oca.eu (HELO smtps-n.oca.eu) (192.54.174.167) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Jun 2016 14:53:12 +0000 Received: from [192.168.109.88] (natoca100-13.unice.fr [134.59.100.13]) by smtps-n.oca.eu (Postfix) with ESMTPSA id DC961804C7; Thu, 2 Jun 2016 16:53:09 +0200 (CEST) From: Damien MATTEI To: Per Bothner Subject: Re: calling external classes method from kawa Date: Thu, 02 Jun 2016 14:53:00 -0000 User-Agent: KMail/1.9.6 Cc: Kawa mailing list References: <201606021612.24180.Damien.Mattei@unice.fr> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201606021653.09643.Damien.Mattei@unice.fr> X-IsSubscribed: yes X-SW-Source: 2016-q2/txt/msg00023.txt.bz2 Le Thursday 02 June 2016 16:34:21 Per Bothner, vous avez =E9crit=A0: >=20 > On 06/02/2016 07:12 AM, Damien MATTEI wrote: >=20 > > java -jar /usr/local/share/java/kawa-2.1.jar -C ResultatGeneralFKawa.scm > > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneral= FKawa) > > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' i= n java.lang.Object > > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oc= a.DataBase >=20 > Note that documentation for the java command says: >=20 > When you use the -jar option, the specified JAR file is the source of= all > user classes, and other class path settings are ignored. >=20 > So you may need to use a -cp flag instead, and explicitly name kawa.repl : >=20 > java -cp /usr/local/share/java/kawa-2.1.jar:other.jar kawa.repl -C Result= atGeneralFKawa.scm >=20 > The Kawa command allows you to use a CLASSPATH enviornment variable. >=20 > The -jar option overrides the classpath. Instead you >=20 > > the problem is that the documention say i can use -J option to pass jav= a 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. >=20 > Huh? A standalone -J makes no sense, since you didn' specify any options. i do use options but it does not works: kawa -J-cp -J~/NetBeansProjects/Sidonie/build/web/WEB-INF/classes -C Result= atGeneralFKawa.scm Unrecognized option: -J-cp Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. even the help in command line does not mention the -J option: kawa --help Usage: [java kawa.repl | kawa] [options ...] Generic options: --help Show help about options --author Show author information --version Show version information Options -e Evaluate expression -c Same as -e, but make sure ~/.kawarc.scm is r= un first -f File to interpret -s| -- Start reading commands interactively from co= nsole -w Launch the interpreter in a GUI window --server Start a server accepting telnet connections = on --debug-dump-zip Compiled interactive expressions to a zip ar= chive --debug-print-expr Print generated internal expressions --debug-print-final-expr Print expression after any optimizations --debug-error-prints-stack-trace Print stack trace with errors --debug-warning-prints-stack-trace Print stack trace with warnings --[no-]full-tailcalls (Don't) use full tail-calls -C ... Compile named files to Java class files --output-format Use when printing top-level output -- Select source language, one of: scheme .scm .sc .sld [default] r5rs .scm=20 r6rs .scm=20 r7rs .scm=20 krl .krl=20 brl .brl=20 emacs elisp emacs-lisp .el=20 xquery .xquery .xq .xql=20 q2 .q2=20 xslt xsl .xsl=20 commonlisp common-lisp clisp lisp .lisp .lsp .cl=20 Compilation options, must be specified before -C -d Directory to place .class files in -P Prefix to prepand to class names -T name to give to top-level class --applet Generate an applet --servlet Generate a servlet --module-static Top-level definitions are by default static --full-tailcalls support full tailcalls --main generate an application, with a main method --warn-as-error Make all warnings into errors --warn-invoke-unknown-method warn if invoke calls an unknown method (subs= umed by warn-unknown-member) --warn-undefined-variable warn if no compiler-visible binding for a va= riable --warn-unknown-member warn if referencing an unknown method or fie= ld --warn-unreachable warn if this code can never be executed --warn-unused warn if a variable is usused or code never e= xecuted --warn-void-used warn if void-valued expression is used For more information go to: http://www.gnu.org/software/kawa/ > Instead, you can do: >=20 > kawa -J-cp -Jmyclasses.jar >=20 > Note you have to use two -J's - one for each JVM option. >=20 > It might be easier to use a CLASSPATH environment variable. >=20 --=20 Damien.Mattei@unice.fr, Damien.Mattei@oca.eu, UNS / OCA / CNRS