From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65990 invoked by alias); 3 Mar 2016 17:47:20 -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 65892 invoked by uid 89); 3 Mar 2016 17:47:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:tm16.bu, H*RU:sk:tm16.bu, Hx-spam-relays-external:98.138.101.128, H*RU:98.138.101.128 X-HELO: nm35-vm1.bullet.mail.ne1.yahoo.com Received: from nm35-vm1.bullet.mail.ne1.yahoo.com (HELO nm35-vm1.bullet.mail.ne1.yahoo.com) (98.138.229.97) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 03 Mar 2016 17:47:17 +0000 Received: from [127.0.0.1] by nm35.bullet.mail.ne1.yahoo.com with NNFMP; 03 Mar 2016 17:47:15 -0000 Received: from [98.138.101.128] by nm35.bullet.mail.ne1.yahoo.com with NNFMP; 03 Mar 2016 17:44:18 -0000 Received: from [106.10.166.120] by tm16.bullet.mail.ne1.yahoo.com with NNFMP; 03 Mar 2016 17:44:18 -0000 Received: from [106.10.151.234] by tm9.bullet.mail.sg3.yahoo.com with NNFMP; 03 Mar 2016 17:44:18 -0000 Received: from [127.0.0.1] by omp1018.mail.sg3.yahoo.com with NNFMP; 03 Mar 2016 17:44:18 -0000 Received: by 106.10.197.99; Thu, 03 Mar 2016 17:44:17 +0000 Date: Thu, 03 Mar 2016 17:47:00 -0000 From: burhanuddin baharuddin Reply-To: burhanuddin baharuddin To: Per Bothner , "kawa@sourceware.org" Message-ID: <2076051574.2163946.1457027057286.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <56D5B3FC.4080104@bothner.com> References: <56D5B3FC.4080104@bothner.com> Subject: Re: Can't Compile To A Standalone Application Using Java 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-q1/txt/msg00037.txt.bz2 Ahh, thank you. I missed the CLASSPATH part in the documentation. On Tuesday, 1 March 2016, 23:23, Per Bothner wrote: 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/