* Can't Compile To A Standalone Application Using Java 8
[not found] <33660780.1240045.1456844883897.JavaMail.yahoo.ref@mail.yahoo.com>
@ 2016-03-01 15:11 ` burhanuddin baharuddin
2016-03-01 15:23 ` Per Bothner
0 siblings, 1 reply; 3+ messages in thread
From: burhanuddin baharuddin @ 2016-03-01 15:11 UTC (permalink / raw)
To: kawa
Hi,
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can't Compile To A Standalone Application Using Java 8
2016-03-01 15:11 ` Can't Compile To A Standalone Application Using Java 8 burhanuddin baharuddin
@ 2016-03-01 15:23 ` Per Bothner
2016-03-03 17:47 ` burhanuddin baharuddin
0 siblings, 1 reply; 3+ messages in thread
From: Per Bothner @ 2016-03-01 15:23 UTC (permalink / raw)
To: burhanuddin baharuddin, kawa
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can't Compile To A Standalone Application Using Java 8
2016-03-01 15:23 ` Per Bothner
@ 2016-03-03 17:47 ` burhanuddin baharuddin
0 siblings, 0 replies; 3+ messages in thread
From: burhanuddin baharuddin @ 2016-03-03 17:47 UTC (permalink / raw)
To: Per Bothner, kawa
Ahh, thank you.
I missed the CLASSPATH part in the documentation.
On Tuesday, 1 March 2016, 23:23, Per Bothner <per@bothner.com> 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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-03 17:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <33660780.1240045.1456844883897.JavaMail.yahoo.ref@mail.yahoo.com>
2016-03-01 15:11 ` Can't Compile To A Standalone Application Using Java 8 burhanuddin baharuddin
2016-03-01 15:23 ` Per Bothner
2016-03-03 17:47 ` burhanuddin baharuddin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).