From bc3df342f06c6f61e0daf9ae29d435f9299b8733 Mon Sep 17 00:00:00 2001 From: cassiopc Date: Thu, 29 Aug 2013 16:54:32 +0200 Subject: changed jar command-line to include the name of main class; users by default now cant change password --- doc/problemexamples/multas/compile/java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc/problemexamples/multas') diff --git a/doc/problemexamples/multas/compile/java b/doc/problemexamples/multas/compile/java index f62215b..bab8a88 100644 --- a/doc/problemexamples/multas/compile/java +++ b/doc/problemexamples/multas/compile/java @@ -108,6 +108,10 @@ fi cdir=`pwd` echo "Current directory is $cdir" >&2 +mainname=`echo $name | cut -d'.' -f1` +if [ "$mainname" == "" ]; then + mainname=Main +fi cat < compileit.sh #!/bin/bash @@ -134,7 +138,7 @@ find . -name "*.java" | while read lin; do echo \$? > ../compileit.retcode done rm -f ../$jarfile -\$jar cvf ../$jarfile * +\$jar cvfe ../$jarfile $mainname * exit 0 EOF chmod 755 compileit.sh -- cgit v1.2.3