From: Robert S. <Rob...@ka...> - 2024-10-03 20:09:03
|
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <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> </body> </html> |