[Solved] FirstUnoContact, Eclipse and libraries

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
gregoryOO
Posts: 6
Joined: Sun Sep 04, 2022 7:59 pm

[Solved] FirstUnoContact, Eclipse and libraries

Post by gregoryOO »

Hello,

I try to run the program FirstUnoContact, available on page
https://wiki.openoffice.org/wiki/Docume ... st_Contact

I use the script Ant and the IDE Eclipse, whose say that the package com.sun.star.uno is not accessible.

But I don't know why !?
Last edited by gregoryOO on Tue Sep 06, 2022 5:28 pm, edited 3 times in total.
LibreOffice 7.0.4.2 on Debian 11
User avatar
RoryOF
Moderator
Posts: 34782
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: FirstUnoContact, Eclipe and libraries

Post by RoryOF »

At a guess, you need to download and install the LibreOffice SDK. It won't do any harm to install that, but note, my solution is only a guess.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
gregoryOO
Posts: 6
Joined: Sun Sep 04, 2022 7:59 pm

Re: FirstUnoContact, Eclipse and libraries

Post by gregoryOO »

Hello,

I have LibreOffice SDK on my computer, and I can compile and run the class without problems but only with commands java and javac.

On Eclipse, I can compile the source code because Eclipse doesn't find the libraries.

The comment on the line import com.sun.star.uno.XComponentContext; with the red point is : "The package com.sun is not accessible".
Attachments
imgFirstUnoContact02.png
imgFirstUnoContact02.png (112.77 KiB) Viewed 7259 times
LibreOffice 7.0.4.2 on Debian 11
gregoryOO
Posts: 6
Joined: Sun Sep 04, 2022 7:59 pm

Re: FirstUnoContact, Eclipse and libraries

Post by gregoryOO »

And an image of my project.
Attachments
imgFirstUnoContact.png
imgFirstUnoContact.png (114.04 KiB) Viewed 7258 times
LibreOffice 7.0.4.2 on Debian 11
User avatar
RoryOF
Moderator
Posts: 34782
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: FirstUnoContact, Eclipse and libraries

Post by RoryOF »

Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
gregoryOO
Posts: 6
Joined: Sun Sep 04, 2022 7:59 pm

Re: FirstUnoContact, Eclipse and libraries

Post by gregoryOO »

I'm not sure to understand your previous post.
I'm working with Linux/Debian 11, Apache LibreOffice, the language Java and Eclipse 2022-03. :)
LibreOffice 7.0.4.2 on Debian 11
User avatar
RoryOF
Moderator
Posts: 34782
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: FirstUnoContact, Eclipse and libraries

Post by RoryOF »

gregoryOO wrote: Mon Sep 05, 2022 4:04 pm I'm not sure to understand your previous post.
I'm working with Linux/Debian 11, Apache LibreOffice, the language Java and Eclipse 2022-03. :)
You are writing this code - you have to do your research; I'm not going to do it for you.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34782
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: FirstUnoContact, Eclipse and libraries

Post by RoryOF »

gregoryOO wrote: Mon Sep 05, 2022 4:04 pm I'm not sure to understand your previous post.
I'm working with Linux/Debian 11, Apache LibreOffice, the language Java and Eclipse 2022-03. :)
You are writing this code - you have to do your research; I'm not going to do it for you.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
gregoryOO
Posts: 6
Joined: Sun Sep 04, 2022 7:59 pm

Re: FirstUnoContact, Eclipse and libraries

Post by gregoryOO »

OK, and where I can find a forum for developers? I want to write a small macro in language Java with Apache LibreOffice. It's for a final user, not for the heart of LibreOffice itself. Thanks for your response.
LibreOffice 7.0.4.2 on Debian 11
User avatar
Villeroy
Volunteer
Posts: 31323
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: FirstUnoContact, Eclipse and libraries

Post by Villeroy »

gregoryOO wrote: Mon Sep 05, 2022 11:08 pm I want to write a small macro in language Java with Apache LibreOffice
You don't know the name of the product. You never did any work with it. On which ground are you trying to write code?
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
gregoryOO
Posts: 6
Joined: Sun Sep 04, 2022 7:59 pm

Re: FirstUnoContact, Eclipse and libraries

Post by gregoryOO »

Very friendly this support forum, great atmosphere.
LibreOffice 7.0.4.2 on Debian 11
Post Reply