Bugzilla – Attachment 154264 Details for
Bug 127625
Java application wait for MessageDispatcher thread when using remote bridge
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test class
Main.java (text/plain), 1.60 KB, created by
Oleg Shchelykalnov
on 2019-09-18 15:04:48 UTC
(
hide
)
Description:
Test class
Filename:
MIME Type:
Creator:
Oleg Shchelykalnov
Created:
2019-09-18 15:04:48 UTC
Size:
1.60 KB
patch
obsolete
>package org.test.testgradle1; > >import com.sun.star.bridge.UnoUrlResolver; >import com.sun.star.bridge.XUnoUrlResolver; >import com.sun.star.comp.helper.Bootstrap; >import com.sun.star.frame.XDesktop; >import com.sun.star.lang.XMultiComponentFactory; >import com.sun.star.uno.UnoRuntime; >import com.sun.star.uno.XComponentContext; >import com.sun.star.uno.XInterface; > >public class Main { > > /** > * @param args the command line arguments > */ > public static void main(String[] args) { > try { > XComponentContext xcomponentcontext = Bootstrap.createInitialComponentContext(null); > System.out.println("Context created: " + xcomponentcontext); > XUnoUrlResolver urlResolver = UnoUrlResolver.create(xcomponentcontext); > System.out.println("Resolver created: " + urlResolver); > XInterface initialObject = (XInterface)urlResolver.resolve("uno:socket,host=...,port=8989;urp;StarOffice.ServiceManager"); > System.out.println("Initial object created: " + initialObject); > XMultiComponentFactory xOfficeFactory = UnoRuntime.queryInterface(XMultiComponentFactory.class, initialObject); > System.out.println("Office factory created: " + xOfficeFactory); > Object oDesktop = xOfficeFactory.createInstanceWithContext("com.sun.star.frame.Desktop", xcomponentcontext); > System.out.println("Desktop object created: " + oDesktop); > XDesktop xDesktop = UnoRuntime.queryInterface(XDesktop.class, oDesktop); > System.out.println("Desktop created: " + xDesktop); > // !!! Don't call it. It exits real LibreOffice > // xDesktop.terminate(); > } catch (Throwable ex) { > ex.printStackTrace(System.err); > } > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 127625
: 154264