Apache OpenOffice (AOO) Bugzilla – Issue 93964
Remove code which was used for old system integration + enhance netbeans debugging + java debugging
Last modified: 2013-08-07 15:31:14 UTC
That is unopkg gui extension can be removed.
.
Retargeting.
@sg: Please explain why the netbeans API - plugin still needs this and why it cannot start OOo + extension to install the extension. Then we can decide what to fix or if we leave it the way it is.
This is needed for debugging an extension in NetBeans. As an example: you have developed your extension that uses a license and you need to debug something inside of it. As it is now: - unopkg is executed like this: unopkg gui -f yourextension.oxt -> click ok to register the extension, accpet the license, close extension manager to proceed - office is started with debug information -> do whatever is needed to trigger your extension, wait for any breakpoint to hit Other scenarios we evaluated: 1. simply use unopkg add -f yourextension.oxt -> does not work because of the license: you need to type yes to acknowkledge the licensewhich you cannot do in NetBeans since the window where the license appears is ouput only. There are possible workarounds, but unopkg gui is used by us only because of the license problem in the first place. 2. use soffice yourextension.oxt -> first, extensions are not registered, when the Office is started with debug parameters. To get around this, we would have to start the office first with "soffice yourextension.oxt", wait for the user to register the extension and close the office, then start the office again with debug parameters. From the user's point of view: why must he close the office to get it started again afterwards? second, unfortunately with "soffice yourextension.oxt" the extension manager appears behind the Office, not in front. You have to accept the license and then change windows to the extension manager to proceed.
What should happen now to this bug? Close it as "won't fix", or does anyone have a further suggestion?
The problem is that "soffice extension.oxt" fails with the message "Java implementation loader couldn't be created". Which is possible caused be the Java VM in the office process and the one in the uno process which use the same debug parameters. The problem is described here http://wiki.services.openoffice.org/wiki/Extensions_trouble_shooting A possible solution would be to use the debug setting of the java framework. One can use bootstrap parameters, such as -env:UNO_JAVA_JFW_PARAMETER_1=-Xdebug -env:UNO_JAVA_JFW_PARAMETER_2=-Xrunjdwp:transport=dt_socket,server=y,address=8100 which are currently only usable in "Direct mode". See jvmfwk/inc/jvmfwk/framework.h The java framework could be adapted that the bootstrap parameter overrides the user settings. Then one needs a bootstrap variable for the extension manager, which is used to pass particular bootstrap variables on to the uno child process. For example, soffice is started like this: soffice -env:EXTENSION_MGR_UNO_PARAMS=UNO_JAVA_JFW_PARAMETER_1=-Xdebug The extension manager would then pass UNO_JAVA_JFW_PARAMETER_1=-Xdebug to the uno process.
*** Issue 106332 has been marked as a duplicate of this issue. ***
The special bootstrap variable would solve the problem for the API plugin, but it is still no solution for the case when the user installs in OO several java extensions while having provided debug parameters. For this case, one should prevent that the debug parameter from the options dialog are passed to the uno processes. Of course, the java code in the uno process could then not be debugged unless one specified "EXTENSION_MGR_UNO_PARAMS".