recently I've started to explore the Officebean Library, in other words I've tried to get an simple OOoBean example running. Unfortunately I didn't get anything going.
First of all I've tried to build a Swing JFrame with a JPanel and the bean inside, but nothing was shown inside 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 an SWT application, shown at eclipsezone.com (http://www.eclipsezone.com/eclipse/forums/t48966.html). I get this thing running, but at the startup an "com.sun.star.comp.beans.NoConnectionException" occurs.
My third and last try was the OOoBeanViewer form the OpenOffice Wiki. Therefor I've found a blog post which seems to adress the above ConnectionException, but it doesn't run either and the same Exception appears.
I also tried to manually start OpenOffice in the "listening" mode, by executing the command: soffice.exe -bean -accept=pipe,name=login.name_Office;urp;StarOffice.NamingService
In the end I didn't get anything going and noticed that there are nearly no up to date information about the OpenOffice Bean. Also many of the methods in the Officebean.jar are deprecated.
So my questions are:
Thank you
After doing some further research I can give some answers to my own questions:
Bye,
Richard
I've been using NOA recently which does the same thing as OOOBean but seems up to date. It has allowed me to embed writer in a JPanel fairly easily. It also manages the discovery and creation of the native openoffice app behind the scenes. NOA - nice open office access
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With