From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116616 invoked by alias); 1 Apr 2017 13:17:01 -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 116595 invoked by uid 89); 1 Apr 2017 13:17:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Sat, 01 Apr 2017 13:16:59 +0000 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1cuItl-00069o-Sy; Sat, 01 Apr 2017 15:16:58 +0200 Received: from 70-36-239-167.dsl.dynamic.fusionbroadband.com ([70.36.239.167] helo=localhost.localdomain) by mailfront11.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1cuIta-0006Rf-Pc; Sat, 01 Apr 2017 15:16:47 +0200 Subject: Re: Help, Setting classpath, using external java libraries with Kawa To: Vasantha Ganesh References: <9c98eab6-bc5b-1254-c6e7-6aad21612576@bothner.com> Cc: kawa@sourceware.org From: Per Bothner Message-ID: <2954a7d0-ce47-8db0-0c7b-a045f6e54041@bothner.com> Date: Sat, 01 Apr 2017 13:17:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00005.txt.bz2 On 04/01/2017 06:11 AM, Vasantha Ganesh wrote: > Hello, > I'm trying to convert this(http://lpaste.net/354170) Java code into > Scheme(Kawa) (http://lpaste.net/354171). > > I ran this for java and it ran without hickups, > > java -cp /usr/share/java/jnr-ffi.jar:.:/usr/lib/java/jffi.jar:/usr/lib/java/jffi-native.jar:/usr/share/java/objectweb-asm/asm.jar > Getpid.java > > and for kawa, I ran this: > > kawa -J -cp /usr/share/java/jnr-ffi.jar:.:/usr/lib/java/jffi.jar:/usr/lib/java/jffi-native.jar:/usr/share/java/objectweb-asm/asm.jar > getpid.scm > > The exact error that I get is: > > Error: Could not find or load main class There can't be any space after -J - it has to be the same option. And as I wrote: you have to repeat the -J for each Java option: kawa -J-cp -J/usr/share/java/jnr-ffi,jar:etc:etc getpid.scm The -J option works the same way as in javac when it uses -J to pass options to the JVM it is running on. -- --Per Bothner per@bothner.com http://per.bothner.com/