File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,23 @@ unzipped directory are placed in your working directory:
1414 $ unzip rabbitmq-java-client-bin-*.zip
1515 $ cp rabbitmq-java-client-bin-*/*.jar ./
1616
17- To compile you only need the Rabbitmq java client on the classpath.
17+ To compile you only need the Rabbitmq java client jar on the classpath.
1818
1919To run them you'll need all the dependencies, see examples below.
2020
2121Note: If you're on Windows,
2222use a semicolon instead of a colon to separate items in the classpath.
2323
24+ > You can set an environment variable for the jar files on the classpath e.g.
25+ >
26+ > $ export CP=.:commons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar
27+ > $ java -cp $CP Send
28+ >
29+ > or on Windows:
30+ >
31+ > > set CP=.;commons-io-1.2.jar;commons-cli-1.1.jar;rabbitmq-client.jar
32+ > > java -cp %CP% Send
33+
2434## Code
2535
2636[ Tutorial one: "Hello World!"] ( http://www.rabbitmq.com/tutorial-one-java.html ) :
@@ -34,14 +44,14 @@ use a semicolon instead of a colon to separate items in the classpath.
3444
3545 $ javac -cp rabbitmq-client.jar NewTask.java Worker.java
3646
37- $ java -cp .:commons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar NewTask
38- $ java -cp .:commons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar Worker
47+ $ java -cp $CP NewTask
48+ $ java -cp $CP Worker
3949
4050[ Tutorial three: Publish/Subscribe] ( http://www.rabbitmq.com/tutorial-three-java.html )
4151
4252 $ javac -cp rabbitmq-client.jar EmitLog.java ReceiveLogs.java
4353
44- $ java -cp .:commons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar EmitLog
45- $ java -cp .:commons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar ReceiveLogs
54+ $ java -cp $CP EmitLog
55+ $ java -cp $CP ReceiveLogs
4656
4757
You can’t perform that action at this time.
0 commit comments