Browse files

handle java deps

  • Loading branch information...
1 parent e5e89dc commit c4476c3c04dd84cebb5e7c2f59db6cce306ac95c @daaku daaku committed Oct 20, 2010
Showing with 13 additions and 2 deletions.
  1. +2 −0 .gitignore
  2. +11 −2 sample.java.sh
View
2 .gitignore
@@ -0,0 +1,2 @@
+/.jars/
+/sample.class
View
13 sample.java.sh
@@ -1,4 +1,13 @@
#!/bin/sh
-javac sample.java
-java sample
+if [ ! -d .jars ]; then
+ mkdir .jars
+ cd .jars
+ curl http://www.reverse.net/pub/apache//commons/codec/binaries/commons-codec-1.4-bin.tar.gz | tar xz --strip-components=1 commons-codec-1.4/commons-codec-1.4.jar
+ curl -O http://json-simple.googlecode.com/files/json_simple-1.1.jar
+ cd ..
+fi
+
+CP=$PWD/.jars/commons-codec-1.4.jar:$PWD/.jars/json_simple-1.1.jar:$PWD
+javac -cp $CP sample.java
+java -cp $CP sample

0 comments on commit c4476c3

Please sign in to comment.