From users-return-3784-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Sun Oct 14 07:04:59 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6DEF5180670 for ; Sun, 14 Oct 2018 07:04:59 +0200 (CEST) Received: (qmail 58154 invoked by uid 500); 14 Oct 2018 05:04:58 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 58144 invoked by uid 99); 14 Oct 2018 05:04:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Oct 2018 05:04:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C70411A176E for ; Sun, 14 Oct 2018 05:04:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.119 X-Spam-Level: ** X-Spam-Status: No, score=2.119 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Rr703Z2Kywze for ; Sun, 14 Oct 2018 05:04:56 +0000 (UTC) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 546B25F35A for ; Sun, 14 Oct 2018 05:04:56 +0000 (UTC) Received: by mail-pl1-f173.google.com with SMTP id 30-v6so7701812plb.10 for ; Sat, 13 Oct 2018 22:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=WdZWt4dxkWyLF24sWQpFOw3j4pyTSSIaigmUO5esPqE=; b=V+Gn7bC9AURRk6gw8U2ZY5gtJQFgZQnBnfI9qcWqGyi7HCUYXWYHWJb6S95JO1r4l8 dAKkAI7fh1PnY2Rcq2w1YP1nIPJnWIhbIyfcHvG1U3Qs85fdrxovpS+87rIrCsbCEhi8 wGA9DNfuMlZc4j43BJLFfl/eIvCWgFmUjmdOMbvqm3lx5sysr3z74YoaTO07+6tylhSu 6rPifwqBSamJTDDlF3OAh1IV8rQGklJMeH6/px7qwq7kwYETAOAdjjOEk1WaCV9iai5a TNyr42XdvICC13j5eCG/i7zJDUZ3LUy0HrhYM2gvR2jRdje6FQjxRfOCVjpTLx0nSmcl kG8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=WdZWt4dxkWyLF24sWQpFOw3j4pyTSSIaigmUO5esPqE=; b=KjuYN0C06DvSB5qOJLKRO1ZmmL6BBhQs0qvU7v2RKV1zaXcR4EIYfXzP73AuduX9RZ NN+86DSRRtl92irwR82uZj59ndj7ytVlKIMkxdp4NQlVu52zllAbyrVsv1wm8dI5A7Hi pB5Uvtnmthri3UAwNFIG5akrUyIYOrz7TXrO4uGQwHUlYI5hxpgQJ676iClPjrokXRnM oQJc33m5d8IGs05J/DMDH2eGgOQ0MD36yTfMVuMGpnUDOtQh/PLiZvuU5dO2Hqx8Ln/X 7qn/uQzZYW7HLHJwwfa03i9qkH7agBiUk3JErrPP9mBO37u+pTQYjUX30VR75xeFvgVd zg0Q== X-Gm-Message-State: ABuFfojmnBhB3swIdVy+DhgfFZKgGZP3t2NbjeZA+FHbJvyzj0jI3pQa srgmWUIhKm7EurVjl7712TF9Nf5Tw6POmMScUTDrHlVo X-Google-Smtp-Source: ACcGV62SdM+lwbE1h8veDndiOyzXtvYzeZvajV+xrofFmIWwxeyHJAzZtNj7xPR9mu52WevfVmR/vAKMdIee5Gp+C4c= X-Received: by 2002:a17:902:b40d:: with SMTP id x13-v6mr12243744plr.13.1539493495268; Sat, 13 Oct 2018 22:04:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tzu-Li Chen Date: Sun, 14 Oct 2018 13:04:18 +0800 Message-ID: Subject: Re: Start shell/REPL without launching java monitor? To: users@groovy.apache.org Content-Type: multipart/alternative; boundary="000000000000eb67bc0578294274" --000000000000eb67bc0578294274 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Any thoughts? Tzu-Li Chen =E4=BA=8E2018=E5=B9=B410=E6=9C=8812=E6= =97=A5=E5=91=A8=E4=BA=94 =E4=B8=8A=E5=8D=8810:54=E5=86=99=E9=81=93=EF=BC=9A > Hi Groovy community, > > I am new to Groovy and when running `groovysh` with "3.0.0-alpha-3, JVM: > 1.8.0_171" on macOS, I see a, hmm, Java monitor(?), named "GroovyShell" > launched. > > If I kill it, process `groovysh` quit with exception below. I'd like to > know if we can suppress the launch of "GroovyShell" process. It switch th= e > focus of cursor and quite annoying for me. > > Best, > tison. > > [printStackTrace]: > > =E2=9E=9C ~ groovysh > Groovy Shell (3.0.0-alpha-3, JVM: 1.8.0_171) > Type ':help' or ':h' for help. > > -------------------------------------------------------------------------= ------ > groovy:000> 2018-10-12 10:51:09.084 java[34387:1479007] > java.lang.SecurityException: Use of System.exit() is forbidden! > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc= cessorImpl.java:62) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConst= ructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:423) > at > org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor= .java:83) > at > org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnw= rapNoCoerce.callConstructor(ConstructorSite.java:105) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor= (CallSiteArray.java:59) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(Abs= tractCallSite.java:238) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(Abs= tractCallSite.java:250) > at > org.codehaus.groovy.tools.shell.util.NoExitSecurityManager.checkExit(NoEx= itSecurityManager.groovy:51) > at java.lang.Runtime.exit(Runtime.java:107) > at java.lang.System.exit(System.java:971) > at com.apple.eawt._AppEventHandler.performQuit(_AppEventHandler.java:145) > at com.apple.eawt.QuitResponse.performQuit(QuitResponse.java:51) > at > com.apple.eawt._AppEventHandler$_QuitDispatcher.performDefaultAction(_App= EventHandler.java:390) > at > com.apple.eawt._AppEventHandler$_AppEventDispatcher.dispatch(_AppEventHan= dler.java:512) > at > com.apple.eawt._AppEventHandler.handleNativeNotification(_AppEventHandler= .java:202) > > --000000000000eb67bc0578294274 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Any thoughts?

<= div dir=3D"ltr">Tzu-Li Chen <wan= der4096@gmail.com> =E4=BA=8E2018=E5=B9=B410=E6=9C=8812=E6=97=A5=E5= =91=A8=E4=BA=94 =E4=B8=8A=E5=8D=8810:54=E5=86=99=E9=81=93=EF=BC=9A
Hi Groovy community,

I am new to Groovy and when running `groovysh` with "3.0.0-al= pha-3, JVM: 1.8.0_171" on macOS, I see a, hmm, Java monitor(?), named = "GroovyShell" launched.

If I kill it, process `groovysh` quit with exception below. I'd like= to know if we can suppress the launch of "GroovyShell" process. = It switch the focus of cursor and quite annoying for me.
=
Best,
tison.

[printStackTrace]:

=E2=9E=9C=C2=A0 ~ groovysh
Groovy Shell (3.0.0-alpha-3, JVM: 1.8.0_171)
Type ':help' or ':h' for help.
--------------------------------------------------------= -----------------------
groovy:000> 20= 18-10-12 10:51:09.084 java[34387:1479007] java.lang.SecurityException: Use = of System.exit() is forbidden!
at sun.reflect.NativeConstructorAccessor= Impl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccess= orImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.refl= ect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAcce= ssorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Construc= tor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invok= e(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.C= onstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorS= ite.java:105)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.def= aultCallConstructor(CallSiteArray.java:59)
at org.codehaus.groovy.runti= me.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:238)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(A= bstractCallSite.java:250)
at org.codehaus.groovy.tools.shell.util.NoExi= tSecurityManager.checkExit(NoExitSecurityManager.groovy:51)
at java.lan= g.Runtime.exit(Runtime.java:107)
at java.lang.System.exit(System.java:9= 71)
= at com.apple.eawt._AppEventHandler.performQuit(_AppEventHandler.jav= a:145)
at com.apple.eawt.QuitResponse.performQuit(QuitResponse.java:51)=
at com.apple.eawt._AppEventHandler$_QuitDispatcher.performDefaultActio= n(_AppEventHandler.java:390)
at com.apple.eawt._AppEventHandler$_AppEv= entDispatcher.dispatch(_AppEventHandler.java:512)
at com.apple.eawt._Ap= pEventHandler.handleNativeNotification(_AppEventHandler.java:202)

--000000000000eb67bc0578294274--