Prepare the Eclipse IDE for UNO

1. Prepare the Eclipse IDE

For Eclipse the necessary jar files may be made available by defining a User
Library.

Install and start Eclipse.
From the Window menu, select Preferences. On the dialog window, select Java >
Build Path > User Libraries. Press New to create a new User Library. The
library’s name might be OpenOffice.org Libraries [SDK 3.0.1]. Press OK.
Select the library and press Add JARs. On the JAR-Selection dialog you should
add the necessary libraries. For a standard installation of OpenOffice.org
3.0.1 on unix, these are
/opt/openoffice.org/ure/share/java/juh.jar
/opt/openoffice.org/ure/share/java/jurt.jar
/opt/openoffice.org/ure/share/java/ridl.jar
/opt/openoffice.org/basis3.0/program/classes/unoil.jar
Press OK to save the User Library.
Add a classpath variable. On the previous dialog window, select Java > Build
Path > Classpath Variables. Press New to create a new Variable Entry. A name
of the variable might be OO_PROGRAM. A path for a standard installation of
3.2.1 on unix is /opt/openoffice.org/program.
From the File menu, select New > Java Project. On the wizard’s page for Java
Settings select the Libraries tab. Press Add Library, select User Library and
press Next. Select the User Library you defined before and press Finish.
Continue the dialog of the New Project wizard.

A standard installation of OpenOffice.org on unix is rooted as /opt. For other
installations the libraries should be found at corresponding locations.

in my workstation:
OO_PROGRAM:
/opt/openoffice4/program
oo_classes:
/opt/openoffice4/program/classes/.jar
oo_share_classes:
/opt/oo/ure/share/java/
.jar
add classpath variable OO_PROGRAM, and user libraries oo_classes,
oo_share_classes
2. create java project
add OO_PROGRAM, oo_classes, oo_share_classes to build path
3. uno sample location:
/opt/oo/sdk/examples/DevelopersGuide/FirstSteps
4. soffice in listening mode
soffice -accept=
socket,host=localhost,port=2083;urp;StarOffice.ServiceManager