May 6, 2002
onlsun1, Solaris8 システムでのHORB13b4a実行
--- HORB13b4aでのhello world実行#1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(http://www-online.kek.jp/~inoue/para-CAMAC/
Test/HORB13b4a-exec.html)
高エネルギー加速器研究機構
素粒子原子核研究所
物理、オンライングループ
井上 栄二
(1). 現状確認
(A). HORB13b4aを産総研からゲットした。
(B). HORB13b4aをインストールした。
(2). ここでやるべきこと
SPARC S-4/20, onlsun1のマシン上でHORB13b4aでのhello world を実行する。
(3). コンパイル
(3-1). ソースファイルのチェック
onlsun1[231]% pwd
/usr/horb13b4a
onlsun1[232]% ls -l
合計 2
drwxr-xr-x 20 root other 512 5月 1日 14:18 horb/
onlsun1[233]% cd horb
/usr/horb13b4a/horb
onlsun1[234]% ls -l
合計 126
-rw-r--r-- 1 root other 5264 3月 2日 1999年 CopyrightAndLicense.tx
t
-rw-r--r-- 1 root other 130 3月 23日 1996年 Makefile
drwxr-xr-x 3 root other 512 2月 22日 1999年 _borders/
drwxr-xr-x 3 root other 1024 2月 22日 1999年 _derived/
drwxr-xr-x 3 root other 512 2月 22日 1999年 _fpclass/
drwxr-xr-x 3 root other 1024 2月 22日 1999年 _overlay/
drwxr-xr-x 2 root other 512 2月 22日 1999年 _private/
drwxr-xr-x 4 root other 512 2月 22日 1999年 _themes/
drwxr-xr-x 2 root other 512 2月 22日 1999年 bin/
drwxr-xr-x 4 root other 512 2月 22日 1999年 classsrc/
-rw-r--r-- 1 root other 11515 3月 2日 1999年 copyright.htm
drwxr-xr-x 8 root other 1024 3月 2日 1999年 doc/
-rw-r--r-- 1 root other 114 3月 23日 1996年 doit
-rw-r--r-- 1 root other 188 3月 23日 1996年 doit.bat
drwxr-xr-x 5 root other 512 3月 2日 1999年 download/
drwxrwxrwx 30 root other 1024 2月 22日 1999年 examples/
drwxr-xr-x 3 root other 512 2月 22日 1999年 horbc/
drwxr-xr-x 3 root other 512 3月 2日 1999年 images/
-rw-r--r-- 1 root other 22449 3月 2日 1999年 index.html
drwxrwxrwx 3 root other 512 5月 1日 14:20 inouetst/
lrwxrwxrwx 1 root other 45 5月 1日 14:14 inouetst-old -> /expor
t/home/onlsun1/inoue/HORB13b4a/inouetst/
drwxr-xr-x 2 root other 512 2月 22日 1999年 lib/
drwxr-xr-x 2 root other 2048 2月 22日 1999年 orb/
drwxr-xr-x 2 root other 512 2月 22日 1999年 serpatch/
drwxr-xr-x 5 root other 512 2月 22日 1999年 tools/
onlsun1[235]% cd examples
/usr/horb13b4a/horb/examples
onlsun1[236]% ls -l
合計 78
-rw-r--r-- 1 root other 123 3月 23日 1996年 Makefile
-rw-r--r-- 1 root other 6400 9月 14日 1996年 README.htm
drwxr-xr-x 2 root other 512 2月 22日 1999年 accessControl/
drwxr-xr-x 2 root other 1024 2月 22日 1999年 async/
drwxrwxrwx 2 root other 512 5月 1日 14:30 clientServer/
drwxr-xr-x 2 root other 512 2月 22日 1999年 complex/
drwxr-xr-x 2 root other 512 2月 22日 1999年 config/
drwxr-xr-x 2 root other 512 2月 22日 1999年 constructor/
drwxr-xr-x 2 root other 512 2月 22日 1999年 daemon/
-rw-r--r-- 1 root other 411 9月 11日 1996年 doit
-rw-r--r-- 1 root other 1007 9月 11日 1996年 doit.bat
-rw-r--r-- 1 root other 345 3月 23日 1996年 examples.conf
drwxr-xr-x 2 root other 512 2月 22日 1999年 foffile/
drwxr-xr-x 2 root other 512 2月 22日 1999年 inheritance/
drwxr-xr-x 2 root other 512 2月 22日 1999年 inheritance2/
drwxr-xr-x 2 root other 1024 2月 22日 1999年 inheritance3/
drwxr-xr-x 2 root other 1024 2月 22日 1999年 inheritance4/
drwxr-xr-x 2 root other 512 2月 22日 1999年 interfaceCall/
drwxr-xr-x 2 root other 512 2月 22日 1999年 interfaceCall2/
drwxr-xr-x 2 root other 1024 2月 22日 1999年 interfaceSend/
drwxr-xr-x 2 root other 512 2月 22日 1999年 invitation/
drwxr-xr-x 2 root other 512 2月 22日 1999年 invitation2/
drwxr-xr-x 2 root other 512 2月 22日 1999年 multiServer/
drwxr-xr-x 2 root other 512 2月 22日 1999年 objRefSend/
drwxr-xr-x 2 root other 512 2月 22日 1999年 objectStorage/
drwxr-xr-x 2 root other 512 2月 22日 1999年 passObj/
drwxr-xr-x 2 root other 512 2月 22日 1999年 passVector/
drwxr-xr-x 2 root other 512 2月 22日 1999年 persistent/
drwxr-xr-x 2 root other 512 2月 22日 1999年 reviveHook/
drwxr-xr-x 9 root other 512 2月 22日 1999年 serialization/
drwxr-xr-x 2 root other 512 2月 22日 1999年 serverServer/
drwxr-xr-x 2 root other 512 2月 22日 1999年 wclock/
drwxr-xr-x 2 root other 1024 2月 22日 1999年 worldClock/
onlsun1[237]% cd clientServer
/usr/horb13b4a/horb/examples/clientServer
onlsun1[238]% ls -l
合計 62
-rw-r--r-- 1 inoue kek 786 5月 1日 14:30 Client.class
-rw-r--r-- 1 root other 832 9月 11日 1996年 Client.class-bak
-rw-r--r-- 1 root other 315 9月 11日 1996年 Client.java
-rw-r--r-- 1 root other 896 9月 13日 1996年 Client2.class
-rw-r--r-- 1 root other 400 9月 13日 1996年 Client2.java
-rw-r--r-- 1 root other 966 9月 13日 1996年 Client3.class
-rw-r--r-- 1 root other 509 9月 13日 1996年 Client3.java
-rw-r--r-- 1 root other 609 9月 11日 1996年 Local.class
-rw-r--r-- 1 root other 222 9月 14日 1996年 Local.java
-rw-r--r-- 1 root other 261 3月 18日 1996年 Local.java~
-rw-r--r-- 1 root other 620 9月 11日 1996年 Makefile
-rw-r--r-- 1 root other 1337 9月 13日 1996年 README.txt
-rw-r--r-- 1 inoue kek 491 5月 1日 14:29 Server.class
-rw-r--r-- 1 root other 491 5月 1日 10:59 Server.class-bak
-rw-r--r-- 1 root other 147 2月 25日 1996年 Server.java
-rw-r--r-- 1 root other 3662 9月 11日 1996年 Server_Proxy.class
-rw-r--r-- 1 root other 3208 9月 11日 1996年 Server_Proxy.java
-rw-r--r-- 1 root other 2752 9月 11日 1996年 Server_Skeleton.class
-rw-r--r-- 1 root other 3444 9月 11日 1996年 Server_Skeleton.java
onlsun1[239]%
onlsun1[239]% cat Server.java
package horb.examples.clientServer;
public class Server {
public String greeting(String name) {
return "Hello, " + name + "!";
}
}
onlsun1[240]%
onlsun1[240]% cat Client.java
package horb.examples.clientServer;
class Client {
public static void main(String argv[]) {
String host = (argv.length == 1) ? argv[0] : "localhost";
Server_Proxy server = new Server_Proxy("horb://"+host);
String result = server.greeting("World");
System.out.println(result);
}
}
onlsun1[241]%
(3-2). コンパイル
onlsun1[251]% horb -version
HORB ORB Version 1.3.
HORB BasicIOCI Version 1.1
Copyright 1995, 1996 HIRANO Satoshi
onlsun1[252]%
onlsun1[252]% horbc -version
HORB Compiler Version 1.3.b4
Copyright 1995, 1996 HIRANO Satoshi
onlsun1[253]%
onlsun1[253]% printenv CLASSPATH
.:/usr/horb13b4a
onlsun1[254]%
onlsun1[254]% horbc Server.java
compiling Server.java
Can't find Server horb.horbc.ClassFile.ClassFileException: Old classfile version
46
onlsun1[255]% javac Client.java
onlsun1[256]%
NG. horbc を実行するとエラーになって、正常にコンパイルできない。
---
(6). セクション
(6-1). サブセクション
(6-1-1). サブサブセクション