Re: Beanshell script from the Command Line

Robert Schwenn <[email protected]> Sat, 5 Oct 2024 14:42:41 +0200
Newsgroups gmane.editors.jedit.user
Message-ID <[email protected]>
--===============8067507278362223678==
Content-Language: en-US
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix"><font face="monospace">Hi,</font></div>
    <div class="moz-cite-prefix"><font face="monospace"><br>
      </font></div>
    <div class="moz-cite-prefix"><font face="monospace">please forget
        what I said about version 5.6: It works (if invoked </font><font
        face="monospace">with command line option "<i>--add-opens
          java.base/java.lang=ALL-UNNAMED</i>").</font></div>
    <div class="moz-cite-prefix"><font face="monospace"><br>
      </font></div>
    <div class="moz-cite-prefix"><font face="monospace">But of course I
        want to update to jEdit 5.7 and need a replacement for </font><font
        face="monospace"><i>FSManager.runInAWTThread()</i></font><font
        face="monospace"> behavior.</font></div>
    <div class="moz-cite-prefix"><font face="monospace"><br>
      </font></div>
    <div class="moz-cite-prefix"><font face="monospace">Cheers,<br>
        Robert</font></div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Am 03.10.2024 um 22:08 schrieb Robert
      Schwenn:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <p><font face="monospace">Hi folks,</font></p>
      <p><font face="monospace">I have a program which creates a
          Beanshell script and runs it via calling jedit with -run
          option. The script depends on a loaded plugin. Also, it uses
          jedit's status line for showing progress (it may take it a
          while). So, obviously jedit has to be finished startup before
        </font><font face="monospace">the script is run</font><font
          face="monospace">.</font></p>
      <p><font face="monospace">jEdit 5.7 User's Guide, chapter 15,
          "Running Scripts from the Command Line" states, that <i>VFSManager.runInAWTThread()</i>
          has to be used in this case. And it used to work for many
          years, at least up to jEdit 5.3. </font></p>
      <p><font face="monospace">But with jEdit 5.6 an error occurs: "<i>[AWT-EventQueue-0]
            [error] AwtRunnableQueue$RunRequestsInAWTThread:
            java.lang.reflect.InaccessibleObjectException: Unable to
            make public java.lang.AbstractStringBuilder
            java.lang.AbstractStringBuilder.append(java.lang.String)
            accessible: module java.base does not "opens java.lang" to
            unnamed module @6b2fad11</i>", though I invoke jedit 5.6
          with command line option "<i>--add-opens
            java.base/java.lang=ALL-UNNAMED</i>".</font></p>
      <p><font face="monospace">jEdit 5.7 doesn't provide </font><font
          face="monospace"><i>VFSManager.runInAWTThread()</i></font><font
          face="monospace"> anymore (see changes.txt).<br>
        </font></p>
      <p><font face="monospace">You guess my question: Is there a way to
          achieve the behavior of old </font><font face="monospace"><i>VFSManager.runInAWTThread()</i></font><font
          face="monospace">, hence run the script given at command line
          after jedit startup has been completed?<br>
        </font></p>
      <p><font face="monospace">Cheers,<br>
          Robert<br>
        </font></p>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
    </blockquote>
    <p><br>
    </p>
    <pre class="moz-signature" cols="80">-- 
Mit freundlichen Grüßen
Robert Schwenn
Augustusweg 10a
01445 Radebeul
0152 / 26 24 25 97</pre>
  </body>
</html>


--===============8067507278362223678==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8067507278362223678==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
-----------------------------------------------
jEdit Users' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-users

--===============8067507278362223678==--