This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Can't Compile To A Standalone Application Using Java 8
- From: Per Bothner <per at bothner dot com>
- To: burhanuddin baharuddin <burhan_loey at yahoo dot com dot my>, "kawa at sourceware dot org" <kawa at sourceware dot org>
- Date: Tue, 1 Mar 2016 07:23:40 -0800
- Subject: Re: Can't Compile To A Standalone Application Using Java 8
- Authentication-results: sourceware.org; auth=none
- References: <33660780 dot 1240045 dot 1456844883897 dot JavaMail dot yahoo dot ref at mail dot yahoo dot com> <33660780 dot 1240045 dot 1456844883897 dot JavaMail dot yahoo at mail dot yahoo dot com>
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/