FreeBSD OpenOffice.org porting status page : How to use SDK (OOo 1.1.x)
$Id:
by OpenOffice.org porting team, NAKATA, Maho, and Jackson LowHow to use SDK (OOo 1.1.x series)
This page explains how to use SDK. I 故意に 始める,決める the 見解/翻訳/版 of OOo as 1.1.4, but you can change 1.1.4 to 1.1.3, 1.1.5, or whatever you have so that it matches your 環境.- 任命する/導入する OpenOffice.org 1.1.4 for FreeBSD
You know what I mean :)
- 任命する/導入する gmake
If you 港/避難所't 任命する/導入するd gmake, please 任命する/導入する it.
# cd /usr/ports/devel/gmake ; make 任命する/導入する clean
- 任命する/導入する Java (optional, but recommended for first try)
Ah, you don't like Java :)
# cd /usr/ports/java/jdk14 ; make 任命する/導入する clean
- 得る SDK
You can 得る SDK here. We have 用意が出来ている SDK for the 4.x-series and 5.x-series. Please make sure you 得る the SDK for the operating system you are using or make it by yourself. 指示/教授/教育s for builing SDK are 述べるd in the How to build section on the main page.
- Setting up SDK
% mkdir /work/tmp % cd /work/tmp % tar zxf <somewhere>/OOo_1.1.4_FreeBSD53Intel_sdk.tar.gz % cd OpenOffice.org1.1.4_SDK/ % ./configure ./configure *** Configure your SDK 環境 *** Enter the Office ソフトウェア 開発 道具 directory [/work/tmp/OpenOffice.org1.1.4_SDK]: Enter the Office 取り付け・設備 directory [/home/maho/OpenOffice.org1.1.4]: /usr/地元の/OpenOffice.org1.1.4 Enter GNU make (3.79.1 or higher) 道具s directory [/usr/地元の/貯蔵所]: C++ Compiler where a language binding 存在する: Solaris, Sun WorkShop 6 update 1 C++ 5.2 2000/09/11 or higher Linux, GNU C++ compiler, gcc 見解/翻訳/版 3.0.1 or higher Enter C++ 道具s directory (optional) [/usr/貯蔵所]: Enter Java SDK (1.4.1_01 or higher) 取り付け・設備 directory [/usr/地元の]: /usr/地元の/jdk1.4.2 NOTE!!!: If you choose Java 5.0 or higher, you have to 確実にする that your 任命する/導入するd office 取り付け・設備 is configured to use Java 5.0 同様に. (a)自動的な/(n)自動拳銃 (軍隊などの)展開,配備 of UNO 構成要素s (YES/NO) [YES]: For using your 用意が出来ている 環境, please run the "setsdkenv_unix" script とじ込み/提出する!
Just 攻撃する,衝突する enter except two points:
First,Enter the Office 取り付け・設備 directory [/home/maho/OpenOffice.org1.1.4]: /usr/地元の/OpenOffice.org1.1.4
You must enter (基本的に from 一括s or ports, 取り付け・設備 directory is /usr/地元の/OpenOffice.org1.1.4)
Second,Enter Java SDK (1.4.1_01 or higher) 取り付け・設備 directory [/usr/地元の]: /usr/地元の/jdk1.4.2
Same as above.
- Use of SDK
After you have 完全にするd your SDK 体制/機構, you need to 始める,決める 環境の variables before it can used. Please type:
% ./setsdkenv_unix Starting 爆撃する with SDK 環境.
Now you can use your OpenOffice.org SDK. Congratulations! - Make OpenOffice.org listen
OpenOffice.org itself can communicate 経由で the TCP/IP port. Java uses a TCP/IP socket to talk to Openoffice.org. First, the 見本s are written in Java, so we need to have Java 任命する/導入するd. Default settings of OOo do not listen 経由で TCP/IP, so you must invoke OpenOffice.org with "-受託する=socket,port=2083;urp;":
% openoffice.org-1.1.4 "-受託する=socket,port=2083;urp;"
Is OOo really listening? Please check by typing:% netstat -a | grep 2083 tcp4 0 0 localhost.2083 *.* LISTEN
Okay, OOo is really listening to your 発言する/表明する :)
You can change the port number from 2083 to 8100 or any port number you'd like to use. - 見本 programs
You might also be 利益/興味d in the 見本 programs. Type ./setsdkenv_unix as 述べるd above to use them.
% ./setsdkenv_unix Starting 爆撃する with SDK 環境.
Next, invoke OpenOffice.org with listening support 経由で TCP/IP% openoffice.org-1.1.4 "-受託する=socket,port=2083;urp;"
and cd to examples/DevelopersGuide/FirstSteps/% cd examples/DevelopersGuide/FirstSteps/
This directory 含む/封じ込めるs some very basic 見本 programs.% gmake -------------------------------------------------------------------------------- Please use one of the に引き続いて 命令(する)s to 遂行する/発効させる the examples! - make FirstConnection.run make FirstLoadComponent.run make HelloTextTableShape.run --------------------------------------------------------------------------------
Type gmake FirstConnection.run, instead of typing make FirstConnection.run, since the 指名する of GNU make is gmake for (usual) FreeBSD.% gmake FirstConnection.run "/usr/地元の/jdk1.4.2/貯蔵所/java" -classpath "/usr/地元の/OpenOffice.org1.1.4/prog 押し通す/classes/jurt.jar:/usr/地元の/OpenOffice.org1.1.4/program/classes/unoil.jar: /usr/地元の/OpenOffice.org1.1.4/program/classes/ridl.jar:/usr/地元の/OpenOffice. org1.1.4/program/classes/sandbox.jar:/usr/地元の/OpenOffice.org1.1.4/program/cl asses/juh.jar::../../../FREEBSDexample.out/class/FirstStepsExamples" FirstConnection remote ServiceManager is 利用できる
関係 is 設立するd and 見本 program worked! Congratulations!
Next, FirstLoadComponent. This program opens a calc sheet and 挿入する 21 to the A1 and A2 独房s. A sum of A1 and A2 are 成し遂げるd and the result is written to the A3 独房.% gmake FirstLoadComponent.run "/usr/地元の/jdk1.4.2/貯蔵所/java" -classpath "/usr/地元の/OpenOffice.org1.1.4/prog 押し通す/classes/jurt.jar:/usr/地元の/OpenOffice.org1.1.4/program/classes/unoil.jar:/ usr/地元の/OpenOffice.org1.1.4/program/classes/ridl.jar:/usr/地元の/OpenOffice. org1.1.4/program/classes/sandbox.jar:/usr/地元の/OpenOffice.org1.1.4/program/cl asses/juh.jar::../../../FREEBSDexample.out/class/FirstStepsExamples" FirstLoadComponent com.sun.星/主役にする.sheet.XSpreadsheet 決まり文句/製法 独房 in column 0, 列/漕ぐ/騒動 2 含む/封じ込めるs =SUM(A1:A2)
HelloTextTableShape is 利益/興味ing. This automatically creates Writer, Calc, and Draw!% gmake HelloTextTableShape.run
- Listening port by default
For some (maybe 安全) 推論する/理由, OOo itself doesn't listen by default. You must invoke it with 命令(する) line arguments. But if you always talk to OOo with TCP/IP sockets, it becomes tedious. To make OOo listen by default, 適用する the に引き続いて patch by *HAND* (sorry) for /usr/地元の/OpenOffice.org1.1.4/株/registry/data/org/openoffice/体制/機構.xcu as root,
--- 株/registry/data/org/openoffice/体制/機構.xcu.orig +++ 株/registry/data/org/openoffice/体制/機構.xcu @@ -1,6 +1,9 @@ <?xml 見解/翻訳/版="1.0" encoding="UTF-8"?> <oor:構成要素-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:指名する="体制/機構" oor:一括= "org.openoffice"> <node oor:指名する="Office"> + <支え(る) oor:指名する="ooSetupConnectionURL" oor:type="xs:string"> + <value>socket,port=2083;urp;</value> + </支え(る)> <支え(る) oor:指名する="ooSetupInstCompleted"> <value>誤った</value> </支え(る)>Again, please check netstat% openoffice.org-1.1.4 % netstat -a | grep 2083 tcp4 0 0 localhost.2083 *.* LISTEN
- Troubleshooting
If you get messages when trying to run FirstConnection,
% gmake FirstConnection.run mkdir -p ../../../FREEBSDexample.out/class/FirstStepsExamples "/usr/地元の/jdk1.4.2/貯蔵所/javac" -classpath "/usr/地元の/OpenOffice.org1.1.4/ program/classes/jurt.jar:/usr/地元の/OpenOffice.org1.1.4/program/classes/unoil. jar:/usr/地元の/OpenOffice.org1.1.4/program/classes/ridl.jar:/usr/地元の/OpenOff ice.org1.1.4/program/classes/sandbox.jar:/usr/地元の/OpenOffice.org1.1.4/program /classes/juh.jar::../../../FREEBSDexample.out/class/FirstStepsExamples" -d ../ ../../FREEBSDexample.out/class/FirstStepsExamples FirstConnection.java First LoadComponent.java HelloTextTableShape.java "/usr/地元の/jdk1.4.2/貯蔵所/java" -classpath "/usr/地元の/OpenOffice.org1.1.4/prog 押し通す/classes/jurt.jar:/usr/地元の/OpenOffice.org1.1.4/program/classes/unoil.jar: /usr/地元の/OpenOffice.org1.1.4/program/classes/ridl.jar:/usr/地元の/OpenOffice. org1.1.4/program/classes/sandbox.jar:/usr/地元の/OpenOffice.org1.1.4/program/cl asses/juh.jar::../../../FREEBSDexample.out/class/FirstStepsExamples" FirstConnection com.sun.星/主役にする.関係.NoConnectException: java.逮捕する.ConnectException: 関係 辞退するd at com.sun.星/主役にする.lib.関係s.socket.socketConnector.connect(socketConnector.java:194) at com.sun.星/主役にする.comp.関係s.Connector.connect(Connector.java:172) at com.sun.星/主役にする.comp.urlresolver.UrlResolver$_UrlResolver.解決する(UrlResolver.java:159) at FirstConnection.getRemoteServiceManager(FirstConnection.java:97) at FirstConnection.useConnection(FirstConnection.java:68) at FirstConnection.main(FirstConnection.java:56)there are two 可能性s.- Is OpenOffice.org is 現実に running?
- Is the port number 訂正する? Many 文書s 利用できる 経由で the Internet 令状 using the port number 8100. Somehow, FirstConnection.java communicate 経由で #2083. Please check your port number.

