From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) by sourceware.org (Postfix) with ESMTPS id 278253858C20 for ; Sat, 30 Sep 2023 15:09:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 278253858C20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=alum.mit.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vs1-f48.google.com with SMTP id ada2fe7eead31-45456121514so3140744137.0 for ; Sat, 30 Sep 2023 08:09:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696086567; x=1696691367; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P4BwoG+pcVmroA+43qdNxNZ0Q7T9I0CgRgUtnuy0Quk=; b=F7rKh4XgnUzc/mSOekiUCgJBdq/P3UZ8PRMU8TnUrxEab9d5SeppRknbwUVAI5YERx 2lg5DHM4E1E35Fugz6H4x0cd64rznbK0KIta4GPrMuRsOVhQ5ySmZiAnMOzgswv8LIcJ nUUn1BxDOyjKst2rAaqo03oqBqxyDTTW6ElZqjryxpI+n6s8Od8Pc22Uugm+0o1LFOdu +38jxatw6eHMAYHdEzMqXWCLpyVGDx6eMZSF4O2PDewe+3vSorgAAnNKlKu5YQ5AM5wS KGUG+0Z4QTw/HlpDZsylPwqdN/uKnQcmY0s0YFchivf33OaXT+Mra5Kg1mdKQXFQanh9 OLMw== X-Gm-Message-State: AOJu0YwAeWSsBB+FeXfNBSAId7H4E/kWWU+YaO4hYaT3x95m77CKyKI7 Oq7l1mIXdkgHq3MBEIOE+yY0JsNmKHuhvSE7/nnH7RZW X-Google-Smtp-Source: AGHT+IHmi9T0agSGwN9eEySkWu56V2zpM175flTWkA+QH+XJJQ1gVZxca/zXZee7tzCh9Gj8HGZ2I3H3pRfcjmpr8nI= X-Received: by 2002:a05:6102:3164:b0:452:6178:642c with SMTP id l4-20020a056102316400b004526178642cmr6068610vsm.1.1696086567204; Sat, 30 Sep 2023 08:09:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jamison Hope Date: Sat, 30 Sep 2023 11:09:16 -0400 Message-ID: Subject: Re: simple main example hello world To: kawa mailing list Content-Type: multipart/alternative; boundary="00000000000058bef8060694ed51" X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000058bef8060694ed51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That test.main method is not static, does not have return type void, and does not take an argument of type String[]. Try something like ((main args::String[])::void allocation: =E2=80=98static (display =E2=80=9C= hello=E2=80=9D) (newline)) Or just put statements at the top level and not inside a define-simple-class, and let the module itself be the main. The simplest hello world is a file with nothing but (display =E2=80=9Chello=E2=80=9D), r= un with kawa -f test.scm (or maybe just kawa test.scm without the -f, I don=E2=80=99t have = my computer handy right now). On Sat, Sep 30, 2023 at 10:06 AM Damien Mattei via Kawa wrote: > what is th problem with this: > ;; test.scm > (module-name demo) > (module-compile-options main: #t) > > (define-simple-class test () > > ;; Need a default constructor as well. > ((*init*) #!void) > > ((main (args :: java.lang.Object)) > (display "hello") (newline) > "hello")) > > bash-3.2$ kawa --main -C test.scm > (compiling test.scm to demo) > bash-3.2$ java -cp . test > Error: Main method not found in class test, please define the main method > as: > public static void main(String[] args) > or a JavaFX application class must extend javafx.application.Application > > On Sat, Sep 30, 2023 at 3:25=E2=80=AFPM Damien Mattei > wrote: > > > > hello, > > many years i used kawa for web application (.war) > > now i want to do a simple standalone program but i can not find that > > in my archive, i knew how to do it but just forget and i can not find > > a tutorial (needed?) on kawa site. > > > > how is it done? from scratch. > > regards, > > Damien > --00000000000058bef8060694ed51--