首先下载类库
https://launchpad.net/gearman-java
1) 以默认端口号启动GEARMAND的守护进程[jobserver]
% ${PATH_TO_GEARMAND_BIN_DIR}/gearmand &
2) 启动 Worker
java -cp <PATH_TO_GEARMAN_JAVA_JAR> org.gearman.example.WorkerRunner -h127.0.0.1 -p4730 org.gearman.example.ReverseFunction &
3) 启动 Client
% java -cp <PATH_TO_GEARMAN_JAVA_JAR> org.gearman.example.ReverseClient \
"hello world"
https://launchpad.net/gearman-java
1) 以默认端口号启动GEARMAND的守护进程[jobserver]
% ${PATH_TO_GEARMAND_BIN_DIR}/gearmand &
2) 启动 Worker
java -cp <PATH_TO_GEARMAN_JAVA_JAR> org.gearman.example.WorkerRunner -h127.0.0.1 -p4730 org.gearman.example.ReverseFunction &
3) 启动 Client
% java -cp <PATH_TO_GEARMAN_JAVA_JAR> org.gearman.example.ReverseClient \
"hello world"