https://issues.apache.org/ooo/show_bug.cgi?id=124170
--- Comment #16 from [email protected] --- Looked a little bit closer at the BeanShell macro to test the scripting environment and it turns out that it can execute in "headless" mode as it is not instantiating anything related to awt. However, the following simple BeanShell macro exhibits exactly the reported behaviour: --------------------- cut here --------------------- JOptionPane.showMessageDialog(null, "Testing awt-support, BeanShellScript is done!"); return 0 --------------------- cut here --------------------- After saving the above BeanShell macro, one can run it successfully from the editor, as the editor is running on a separate Java thread and invocation uses SwingUtilities.invokeLater(), such that the invocation is carried out on the Java awt thread. Interestingly, if running scripts from the editor, then afterwards running scripts directly via "Tools -> Macros -> Run Macro ..." may run as well (however, sometimes they cause hangs). Hence it is important to quit AOO before running the above macro via "Tools -> Macros -> Run Macro ...", such that on the next start Java is at its "initial", well defined state. Then you will get the error popup informing the user about not being able to execute the program because of the AWT problem. Repeating "Run Macro ..." again may yield the popup window, however the user interface hangs such that one must do a "Force Quit" of AOO. As if the Java environment is out of order somehow (obviously linked to event handling on MacOSX). --- Some solutions (in other contexts) are hinted in <http://stackoverflow.com/questions/14661249/java-jni-creating-a-swing-window-using-jni-from-c>, which points to <http://stackoverflow.com/questions/8750690/osx-javavm-awt-swing-and-possibly-a-deadlock/14859179>. Maybe they hint at feasible resolutions that do not incur "too much work" for MacOSX? ;) -- You are receiving this mail because: You are on the CC list for the issue. You are the assignee for the issue. You are watching all issue changes.
