ZeroC ICE之Hello World java客户端

Writing an Ice Application with Java - Ice 3.6 - ZeroC

https://doc.zeroc.com/display/Ice36/Writing+an+Ice+Application+with+Java

 

代码:https://github.com/reymont/ice

 

ZeroC - Download

https://zeroc.com/download.html

Using the Linux Binary Distributions - Ice 3.6 - ZeroC

https://doc.zeroc.com/display/Ice36/Using+the+Linux+Binary+Distributions#UsingtheLinuxBinaryDistributions-InstallingIceonRedHatEnterpriseLinux7

 

#安装 ZeroC键,避免未签名的包报警

wget https://zeroc.com/download/GPG-KEY-zeroc-release

sudo rpm --import GPG-KEY-zeroc-release

#安装 Ice的库

cd /etc/yum.repos.d

sudo wget https://zeroc.com/download/rpm/el7/zeroc-ice-el7.repo

#centos 7安装是 ice 3.6.0版本

sudo yum install ice-all-runtime ice-all-devel

 

git clone https://github.com/reymont/ice.git

 

#添加ice的配置。ice.jar默认位置为/usr/share/java/ice.jar

vim /etc/profile

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:/usr/share/java/ice.jar

 

#编译Server和Client

javac -d classes -classpath classes:/usr/share/java/ice.jar Client.java PrinterI.java generated/Demo/*.java

javac -d classes -classpath classes:/usr/share/java/ice.jar Server.java PrinterI.java generated/Demo/*.java

 

#开启Server

cd classes

java Server

 

#另开一个客户端

java Client

 

[root@localhost classes]# java Server

Hello World!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值