From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71729 invoked by alias); 7 Jun 2017 20:51:15 -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 71710 invoked by uid 89); 7 Jun 2017 20:51:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.9 required=5.0 tests=BAYES_00,FOREIGN_BODY1,FORGED_HOTMAIL_RCVD2,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=world, avez, World, vous X-HELO: APC01-HK2-obe.outbound.protection.outlook.com Received: from mail-oln040092255012.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) (40.92.255.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Jun 2017 20:51:13 +0000 Received: from SG2APC01FT005.eop-APC01.prod.protection.outlook.com (10.152.250.58) by SG2APC01HT196.eop-APC01.prod.protection.outlook.com (10.152.251.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1101.12; Wed, 7 Jun 2017 20:51:14 +0000 Received: from SG2PR0401MB1982.apcprd04.prod.outlook.com (10.152.250.53) by SG2APC01FT005.mail.protection.outlook.com (10.152.250.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.5 via Frontend Transport; Wed, 7 Jun 2017 20:51:14 +0000 Received: from SG2PR0401MB1982.apcprd04.prod.outlook.com ([fe80::9dd9:961e:d478:258]) by SG2PR0401MB1982.apcprd04.prod.outlook.com ([fe80::9dd9:961e:d478:258%17]) with mapi id 15.01.1157.012; Wed, 7 Jun 2017 20:51:14 +0000 From: Tony West To: Damien MATTEI , "kawa@sourceware.org" Subject: Re: Problem running Javafx hello world application Date: Wed, 07 Jun 2017 20:51:00 -0000 Message-ID: References: ,<201706071113.32872.Damien.Mattei@unice.fr> In-Reply-To: <201706071113.32872.Damien.Mattei@unice.fr> authentication-results: unice.fr; dkim=none (message not signed) header.d=none;unice.fr; dmarc=none action=none header.from=hotmail.com; x-incomingtopheadermarker: OriginalChecksum:17F2E0A6B601105CDB8EA6231B0E4B832BD4D02D7D576509EE3F027F970DE127;UpperCasedChecksum:92EE4BEEA492B94195F16D713C6DAC032F57C6CE1A8259F6982F0067BCA42F87;SizeAsReceived:8380;Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [QOiJhmNDpN29twLdScRX0HG60vN78CPa1HZc1y4FnE8=] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SG2APC01HT196;24:7P+tJwzpGL1gsMHREe67To7aKDSGFUXVu6w75H9lt99oZNTBjMgZBB8GhivxGTIKv9KTUz2jT9j9RlP7m+DVM/lNqbhzc1rvbCfjVcsdxH0=;7:RgTcSgV73fchHMrQjOBs9hGrN3ONZMB8YzqAP6LVNalJrSkX1yujYEcu5bnLBqNZy9EQyRpWT9iQlNakkTtEPDBR+raZ8l/EfyQisqqXK7AgLsLhX6IUh0Q69UGvb2SUA40HO63ZE7ioqE8T+GTjrVE+akglHT5KcegvupS5Rf8gBQuiLAJUkFhd+Yo264CmTZquQJ13Ev4YFkePfAq+Y8t7X2LUvQXqbkCTk2cdw63FCcSkejXoBwhT7RXojzGixOMMVX4WnISUo/+I6taS5jklt3f13k60o4q+zBVU7hXRL6LBaeJ/DnY1y0IiEErP x-incomingheadercount: 45 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(7070007)(98901004);DIR:OUT;SFP:1901;SCL:1;SRVR:SG2APC01HT196;H:SG2PR0401MB1982.apcprd04.prod.outlook.com;FPR:;SPF:None;LANG:en; x-ms-traffictypediagnostic: SG2APC01HT196: x-ms-office365-filtering-correlation-id: 320ac170-9c4b-41c2-fbb2-08d4ade6efcd x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322274)(1601125374)(1603101448)(1701031045);SRVR:SG2APC01HT196; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031);SRVR:SG2APC01HT196;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:SG2APC01HT196; x-forefront-prvs: 03319F6FEF spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2017 20:51:14.2559 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2APC01HT196 X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00097.txt.bz2 Hi Damien, I tried the change. During compilation I received the following messages: E:\Work\kawa>kawa --main -C hello-world.scm Jun 08, 2017 6:46:08 AM org.jline.utils.Log logr WARNING: Unable to create a system terminal, creating a dumb terminal (enab= le debug logging for more information) (compiling hello-world.scm to org.kawa.javafx) hello-world.scm:41:12: warning - void-valued expression where value is need= ed When I attempted to run it, the same error messages as before appeared. Tony ________________________________________ From: kawa-owner@sourceware.org on behalf of Da= mien MATTEI Sent: Wednesday, 7 June 2017 7:13 PM To: kawa@sourceware.org Subject: Re: Problem running Javafx hello world application just for test, if you try this: (define (main) (let ((tst (invoke-static 'launch))) '()) ) does it change something? i think the probleme comes that you try to return a static object at the l= evel (toplevel or REPL) of a java function, if the main function is dynamically generated it can not return a static fi= eld, for incomatibility reason, i had such incompatibility problem in a pur= e java program. Damien Le Wednesday 07 June 2017 08:27:17 Tony West, vous avez =E9crit : > Hi, > > Based on what I've seen in the mailing list, I've got the following simpl= e Javafx application: > > (module-name ) > (module-extends ) > (module-export start create-button) > (module-compile-options main: #t) > > ;; > ;;; Application > ;; > > (define (start (primary-stage :: )) :: > (invoke primary-stage 'setTitle "Hello World!") > (let ((root-pane ()) > (button (create-button > text: "Say 'Hello World'" > event-handler: (lambda (event) (format #t "Hello World!"= ))))) > (invoke (invoke root-pane 'getChildren) 'add button) > (invoke primary-stage 'setScene ( root-pane 300 2= 50)) > (invoke primary-stage 'show))) > > ;; > ;;; Utilities > ;; > > (define (create-button #!key (text #f) (event-handler #f)) :: > (let ((button :: ())) > (when text > (invoke button 'setText text)) > > (when event-handler > (invoke button 'setOnAction (object () > ((handle (event :: )) > (event-handler event))))) > > button)) > > > ;; > ;;; Main > ;; > > (define (main) > (invoke-static 'launch)) > > (main) > > When compiling I get the following: > > E:\Work\kawa>kawa --main -C hello-world.scm > Jun 07, 2017 4:16:42 PM org.jline.utils.Log logr > WARNING: Unable to create a system terminal, creating a dumb terminal (en= able debug logging for more information) > (compiling hello-world.scm to org.kawa.javafx) > > And when I run it I get the following: > > E:\Work\kawa>java org.kawa.javafx > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at com.sun.javafx.application.LauncherImpl.launchApplicationWithA= rgs(LauncherImpl.java:389) > at com.sun.javafx.application.LauncherImpl.launchApplication(Laun= cherImpl.java:328) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source) > Caused by: java.lang.IncompatibleClassChangeError: Expected static field = org.kawa.javafx$frame.$main > at org.kawa.javafx.main(hello-world.scm) > ... 11 more > Exception running application org.kawa.javafx > > I would be really grateful if someone could point out what I am doing wro= ng. > > Thanks. > > Tony > >