Java – ooobeans dead What choice do I have?

Recently, I started exploring the office bean library. In other words, I tried to run a simple OOo bean example

First, I tried to build swing JFrame using JPanel and bean internals, but nothing was displayed in the window

public class OpenOfficeGUI extends JFrame
{
    private OOoBean ooBeanObj = null;
    private OfficeConnection ooConnection = null;

    public OpenOfficeGUI()
    {
        init();
    }

    private void init()
    {
        JPanel panel = new JPanel();
        JButton myButton = new JButton("Arsch");
        ooBeanObj = new OOoBean();

        myButton.setSize(100,32);

        panel.setSize(800,500);
        panel.setLocation(5,5);
        panel.setBackground(new Color(125,125,125));
        panel.add(ooBeanObj);
        panel.add(myButton);
        panel.setLayout(null);
        this.add(panel);

        this.setSize(800,600);
        this.setLocation(0,0);
        this.setDefaultCloSEOperation(EXIT_ON_CLOSE);
    }
}

My second attempt was the SWT application, at eclipse zone com( http://www.eclipsezone.com/eclipse/forums/t48966.html )Display on I let this thing run, but "com. Sun. Star. Comp. Beans. Noconnectionexception" appears at startup

My third and last attempt was the ooobeanviewer of OpenOffice wiki Therefore, I found a blog post, which seems to solve the above connectionexception, but it does not run, and the same exception appears

I also tried to manually start OpenOffice: software. Com in "listening" mode by executing the command exe -bean -accept = pipe,name = login. name_ Office; urp; STaroffice. NamingService

Finally, I didn't get any results and noticed that there was little latest information about OpenOffice bean In addition, office bean Many methods in jar are deprecated

So my question is:

>Is openofficebean dead? > Do you have any suggestions on how to run a simple OpenOffice Java integration? > Can the OpenOffice SDK embed OpenOffice in Java Swing applications? > Do you know some kind of persistent source of information about beans or SDKs? > Does libreoffice have the same possibility?

thank you

Solution

After doing some further research, I can answer my own questions:

>OpenOffice bean seems to be dead The last version I found was in 2006. In my opinion, the latest development of OO SDK has not been solved In addition, the bean is not very large (1500 LOC), so it makes sense to rewrite it from scratch. > I run my application in two steps At first, I changed the code and manually connected to the running OO instance (oobeanobj. Startoooconnection ("uno: socket, host = localhost, port = 2002; URP; StarOffice. Servicemanager");) The second change is to use sockets (Software - bean - accept = socket, host = 0, port = 2002; URP;) Not pipes But I don't know why this change is needed. > The SDK is not a substitute because it is the foundation of OO beans Beans can be enhanced or rewritten using the SDK method. > The OpenOffice. Org API project seems to be the best place to search for information, although not all information and suggestions are up-to-date. > At present, OpenOffice beans can still connect to libreoffice instances (tested with lo v.3.3.0 RC1)

Bye, Richard

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>