#!/bin/sh
-exec nikiroo-utils be.nikiroo.utils.main.img2aa "$@"
+NAME=nikiroo-utils.jar
+
+jar="$NAME"
+if [ ! -e "$jar" ]; then
+ jar="`dirname "$0"`/$NAME"
+fi
+
+if [ ! -e "$jar" ]; then
+ jar="`whereis "$NAME" | sed 's: :\n:g' | grep "$NAME" | head -n1`"
+fi
+
+if [ ! -e "$jar" ]; then
+ echo "$NAME not found." >&2
+ exit 1
+fi
+
+exec java -cp "$jar" be.nikiroo.utils.main.img2aa "$@"
--- /dev/null
+#!/bin/sh
+NAME=nikiroo-utils.jar
+
+jar="$NAME"
+if [ ! -e "$jar" ]; then
+ jar="`dirname "$0"`/$NAME"
+fi
+
+if [ ! -e "$jar" ]; then
+ jar="`whereis "$NAME" | sed 's: :\n:g' | grep "$NAME" | head -n1`"
+fi
+
+if [ ! -e "$jar" ]; then
+ echo "$NAME not found." >&2
+ exit 1
+fi
+
+exec java -cp "$jar" be.nikiroo.utils.main.justify "$@"
+