From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32251 invoked by alias); 2 Jun 2016 14:34:46 -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 27862 invoked by uid 89); 2 Jun 2016 14:34:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=js, kawa, didn, Per X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 02 Jun 2016 14:34:35 +0000 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1b8Thf-0005fN-66; Thu, 02 Jun 2016 16:34:31 +0200 Received: from 70-36-239-75.dsl.dynamic.fusionbroadband.com ([70.36.239.75] helo=toshie.bothner.com) by mailfront11.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1b8ThY-0005tF-9u; Thu, 02 Jun 2016 16:34:24 +0200 Subject: Re: calling external classes method from kawa To: Damien MATTEI , Kawa mailing list References: <201606021612.24180.Damien.Mattei@unice.fr> From: Per Bothner Message-ID: Date: Thu, 02 Jun 2016 14:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <201606021612.24180.Damien.Mattei@unice.fr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-q2/txt/msg00022.txt.bz2 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/