From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26583 invoked by alias); 1 Mar 2016 15:23:53 -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 26566 invoked by uid 89); 1 Mar 2016 15:23:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:D*my, HTo:D*com.my, jar 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; Tue, 01 Mar 2016 15:23:50 +0000 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1aam9K-000873-Rm; Tue, 01 Mar 2016 16:23:46 +0100 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 1aam9H-0002Ys-7T; Tue, 01 Mar 2016 16:23:43 +0100 Subject: Re: Can't Compile To A Standalone Application Using Java 8 To: burhanuddin baharuddin , "kawa@sourceware.org" References: <33660780.1240045.1456844883897.JavaMail.yahoo.ref@mail.yahoo.com> <33660780.1240045.1456844883897.JavaMail.yahoo@mail.yahoo.com> From: Per Bothner Message-ID: <56D5B3FC.4080104@bothner.com> Date: Tue, 01 Mar 2016 15:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <33660780.1240045.1456844883897.JavaMail.yahoo@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-q1/txt/msg00032.txt.bz2 On 03/01/2016 07:08 AM, burhanuddin baharuddin wrote: > Has anyone managed to compile kawa source code to a standalone application using Java 8? > > When I run 'java MyProgram', I always get 'Error: Could not find or load main class MyProgram'. > > I did add '--main' argument during compilation. > > I can run the program using 'kawa MyProgram' though. > > The source file only has '(format #t "Hello, World~%")'. Do I need to define a main function or something? I would guess a classpath problem. The classpath needs to include both the directory containing MyProgram,.class, and the kawa .jar. The 'kawa' command sets the classpath to include the kawa .jar - but running plain 'java' doesn't. -- --Per Bothner per@bothner.com http://per.bothner.com/