Singleton in java

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
DavidBo
Posts: 27
Joined: Thu Mar 12, 2009 3:57 pm

Singleton in java

Post by DavidBo »

I intend to make a singleton in java that instantiates an object which supports the XContextMenuInterceptor interface.
I have seen an example in C++ but the object was created in the component_getFactory function
but I do not implement a getFactory in java. I think all that is taken care of the tools used (LibreOffice Plugin for eclipse)
Has anybody tried to make an extension in java with a singleton?
Apache Open Office 4.1.9 Windows 10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Singleton in java

Post by Villeroy »

Did you solve your other problem? Then you should read how to do anything with Java and UNO.

http://fivedots.coe.psu.ac.th/~ad/jlop/
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
DavidBo
Posts: 27
Joined: Thu Mar 12, 2009 3:57 pm

Re: Singleton in java

Post by DavidBo »

The tool has a bug, it can't get LO's or OO's types and interfaces. It is a Git-hup project and I could see that the bug was reported some years ago.
But the tools do many other things which makes it very easy to make extensions in java easier than in C++
Apache Open Office 4.1.9 Windows 10
Post Reply