Results 1 to 1 of 1
Thread: Shell scripting/sed issue...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jul 2008
Shell scripting/sed issue...
I have a little embedded system (armv5) with Linux on it, along with JamVM. It has this little limitation where I cannot run Jars, so I wrote a little workaround...
rm /mnt/user/tmp/* -rf
if [ $1 = "-jar" ]; then
unzip $2 -d /mnt/user/tmp
main_class="$(cat META-INF/MANIFEST.MF | grep 'Main-Class' | sed 's/.*Main-Class:\(.*\)*/\1/' | sed 's/ //g')"
LD_LIBRARY_PATH=/mnt/user/lib /mnt/user/jvm/jamvm -mx8M -cp /mnt/user/jvm/cbc:./ -Xbootclasspath:/mnt/user/lib/classes.zip:/mnt/user/lib/glibj.zip -DCBC $1
The problem is, this gives me a java.lang.NoClassDefFoundError: Main error, when if i replace $main_class with Main, it works without an issue. $main_class does seem to be "Main" but for some reason, this is not working.
(also, i apologize for the ugly grep and sed things... i dont' have much experience with either....)