Skip to content

Commit

Permalink
renamed incanter-*-jar-with-dependencies.jar to incanter-exec.jar, an…
Browse files Browse the repository at this point in the history
…d added instructions on running Incanter directly with 'java -jar incanter-exec.jar'
  • Loading branch information
liebke committed Dec 22, 2009
1 parent bb6e05e commit 6b3576f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 36 deletions.
6 changes: 6 additions & 0 deletions README.textile
Expand Up @@ -44,6 +44,12 @@ A pre-built version of Incanter that includes all the necessary dependencies can


Start the Clojure shell (aka the REPL) from the Incanter directory: @bin/clj@ or @bin\clj.bat@ on Windows (note: if you want to start the Clojure REPL from a directory other than the top level Incanter directory, change the INCANTER_HOME variable in the clj script so that it uses an absolute path instead the ./ directory). Start the Clojure shell (aka the REPL) from the Incanter directory: @bin/clj@ or @bin\clj.bat@ on Windows (note: if you want to start the Clojure REPL from a directory other than the top level Incanter directory, change the INCANTER_HOME variable in the clj script so that it uses an absolute path instead the ./ directory).


You can also start Incanter directly with the following command:
@java -jar target/incanter-exec.jar@
This will start a Clojure REPL, but will not have command history like the clj scripts. If you want to use the built-in data sets, you'll also need to set the incanter.home property as follows:
@java -Dincanter.home=/path/to/incanter/dir -jar target/incanter-exec.jar@


From the Clojure shell, load the Incanter libraries: <pre><code>(use '(incanter core stats charts))</code></pre> From the Clojure shell, load the Incanter libraries: <pre><code>(use '(incanter core stats charts))</code></pre>


Try an example: sample 1,000 values from a standard-normal distribution and view a histogram: <pre><code>(view (histogram (sample-normal 1000)))</code></pre> Try an example: sample 1,000 values from a standard-normal distribution and view a histogram: <pre><code>(view (histogram (sample-normal 1000)))</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion bin/clj
Expand Up @@ -8,7 +8,7 @@


INCANTER_HOME=. INCANTER_HOME=.
CLASSES_DIR=$INCANTER_HOME/target/ CLASSES_DIR=$INCANTER_HOME/target/
INCANTER_JAR=$INCANTER_HOME/target/incanter-1.0-master-SNAPSHOT-jar-with-dependencies.jar INCANTER_JAR=$INCANTER_HOME/target/incanter-exec.jar


if [ -z "$1" ]; then if [ -z "$1" ]; then
#java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -jar $INCANTER_JAR clojure.main #java -server -Dclojure.compile.path=$CLASSES_DIR -Dincanter.home=$INCANTER_HOME -jar $INCANTER_JAR clojure.main
Expand Down
2 changes: 1 addition & 1 deletion bin/clj.bat
@@ -1,7 +1,7 @@
@echo off @echo off
set INCANTER_HOME=. set INCANTER_HOME=.
set CLASSES_DIR=%INCANTER_HOME%\classes set CLASSES_DIR=%INCANTER_HOME%\classes
set INCANTER_JAR=%INCANTER_HOME%\target\incanter-1.0-SNAPSHOT-jar-with-dependencies.jar set INCANTER_JAR=%INCANTER_HOME%\target\incanter-exec.jar


IF (%1)==() ( IF (%1)==() (
java -cp %INCANTER_JAR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.main java -cp %INCANTER_JAR% -Dclojure.compile.path=%CLASSES_DIR% -Dincanter.home=%INCANTER_HOME% clojure.main
Expand Down
21 changes: 0 additions & 21 deletions bin/incanter

This file was deleted.

12 changes: 0 additions & 12 deletions bin/incanter.bat

This file was deleted.

5 changes: 4 additions & 1 deletion pom.xml
Expand Up @@ -48,9 +48,12 @@
<descriptorRefs> <descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef> <descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs> </descriptorRefs>
<finalName>incanter-exec</finalName>
<appendAssemblyId>false</appendAssemblyId>
<archive> <archive>
<manifest> <manifest>
<mainClass>jline.ConsoleRunner</mainClass> <!-- <mainClass>jline.ConsoleRunner</mainClass> -->
<mainClass>clojure.main</mainClass>
</manifest> </manifest>
</archive> </archive>
</configuration> </configuration>
Expand Down

0 comments on commit 6b3576f

Please sign in to comment.