[Solved] Not able to link the library of UNO

The Application Programming Interface and the OASIS Open Document Format

[Solved] Not able to link the library of UNO

Postby techie_india » Sat Sep 20, 2008 10:12 am

Welcome beginner. What is your question or comment?
Please try to briefly and clearly tell us: What you want, What you tried, and What happened.
-----------------------------------------------------------------------------------------------------------
Hi,
I m new user of the Open Office. I making application in java for writing the data using UNO.

But I m unable to find the required library files.
I have install the sdk in the /usr/lib/openoffice/sdk.

Im trying to compile the program in the example ;
package org.openoffice.example.comp;

Code: Select all   Expand viewCollapse view
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.lib.uno.helper.Factory;
import com.sun.star.lang.XSingleComponentFactory;
import com.sun.star.registry.XRegistryKey;
import com.sun.star.lib.uno.helper.WeakBase;


public final class FirstApplicationImpl extends WeakBase
   implements com.sun.star.lang.XServiceInfo,
              org.openoffice.example.XFirstapplication
{
    private final XComponentContext m_xContext;
    private static final String m_implementationName = FirstApplicationImpl.class.getName();
    private static final String[] m_serviceNames = {
        "org.openoffice.example.Firstapplication" };


    public FirstApplicationImpl( XComponentContext context )
    {
        m_xContext = context;
    };

    public static XSingleComponentFactory __getComponentFactory( String sImplementationName ) {
        XSingleComponentFactory xFactory = null;

        if ( sImplementationName.equals( m_implementationName ) )
            xFactory = Factory.createComponentFactory(FirstApplicationImpl.class, m_serviceNames);
        return xFactory;
    }

    public static boolean __writeRegistryServiceInfo( XRegistryKey xRegistryKey ) {
        return Factory.writeRegistryServiceInfo(m_implementationName,
                                                m_serviceNames,
                                                xRegistryKey);
    }


It showing error as The import com.sun.star.uno.UnoRuntime cannot be resolved.

Please help me to compile and run the program.
Even in the open office directory these file were not there

Please help in this regard

Thanks and Regards

OS used Ubuntu 8.x
Version of Openoffice 2.4.1
Last edited by techie_india on Mon Sep 22, 2008 9:25 am, edited 1 time in total.
OOo 2.3.X on Ubuntu 8.x + Windows Xp
techie_india
 
Posts: 3
Joined: Sat Sep 20, 2008 9:58 am

Re: Not able to link the library of UNO

Postby Villeroy » Sat Sep 20, 2008 11:22 am

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26395
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Not able to link the library of UNO

Postby techie_india » Sat Sep 20, 2008 11:45 am

Im sorry but it was not very clear in the list.

I want to know what are the prerqusite and library needed for compiling and running the code.

I have install the SDK from the ubuntu Synaptec package manager.
OOo 2.3.X on Ubuntu 8.x + Windows Xp
techie_india
 
Posts: 3
Joined: Sat Sep 20, 2008 9:58 am

Re: Not able to link the library of UNO

Postby Villeroy » Sat Sep 20, 2008 11:59 am

This is not a customer service. We are all users here, trying to help each other.
You are the Java developer, Techie form India.
There are plenty of resouces about Java and OpenOffice.org. I posted on of the resources. Other resources are
viewforum.php?f=44
The "old forum" since 2003: http://www.oooforum.org/forum/viewforum.phtml?f=9
The "old forum" for working code (do not ask questions there) http://www.oooforum.org/forum/viewforum.phtml?f=11
The "old forum's" search facility: http://www.oooforum.org/forum/search.phtml. You may prefer a google search on that domain.
http://extensions.openoffice.org Get some source code of Java extensions and see how others are doing things.
Somewhere in the openoffice.org domain there is also a forum for code snippets.
Does you office listen to connections from outside? How does your application connect to the office?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26395
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Not able to link the library of UNO

Postby techie_india » Mon Sep 22, 2008 9:03 am

Thanks for the help.
I m not saying that you are supporting the program. I thought that if somebody has encountered any error of this sort.
I have installed the following thing :
Installed the following packages:
bsh (2.0b4-7ubuntu1)
openoffice.org (1:2.4.1-1ubuntu2)
openoffice.org-base (1:2.4.1-1ubuntu2)
openoffice.org-filter-mobiledev (1:2.4.1-1ubuntu2)
openoffice.org-java-common (1:2.4.1-1ubuntu2)
openoffice.org-officebean (1:2.4.1-1ubuntu2)
openoffice.org-writer2latex (0.5-6ubuntu0.1)

It put all the neccesary jar files in the following folder :
/usr/lib/openoffice/program/classes.

I have also taken help from the link below:
viewtopic.php?f=44&t=2520

I was able to run my first uno application :)

Thanks and Regards
Anshuman Srivastava
OOo 2.3.X on Ubuntu 8.x + Windows Xp
techie_india
 
Posts: 3
Joined: Sat Sep 20, 2008 9:58 am


Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 2 guests