Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update uberjar.adoc #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions doc/resources/doc/sources/uberjar.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,25 @@ $ java -Xmx1G -jar project.jar
We recommend that you specify the memory usage of your JVM, as the default on Java 6+ is usually insufficient for hosts run only this JVM process.
A rule of thumb is to use 2/3rds of the memory of your host.

== UberScript

Edge provides a script for creating an "UberScript" that has an embedded "uberjar" created by "onejar". To use it, you can simply run the below from your project sub-directory (the same folder as your deps.edn).

[source,shell]
----
$ ../bin/uberscript desired-script-name project-jar-created-with-onejar.jar
----

An executable script named `desired-script-name` will be created in your project sub-directory with `project-jar-created-with-onejar.jar` embedded within. When executed, the script will execute the equivalent of:

[source,shell]
----
$ java $JAVA_ARGS -jar project-jar-created-with-onejar.jar -m edge.main $@
----

This means that the script can be executed with Java arguments, and arguments to your Edge application, thusly:

[source,shell]
----
$ JAVA_ARGS='-Xmx1G' desired-script-name edge-app-arg1 edge-app-arg2
----