I'm trying to compile a shell script with javac and it keeps returning me this error:
$ bash run_RGE.sh
javac: invalid flag: Element.java
Usage: javac <options> <source files>
use -help for a list of possible options
javac: invalid flag: RGE.java
Usage: javac <options> <source files>
use -help for a list of possible options
javac: invalid flag: -Xms1024m
Usage: javac <options> <source files>
use -help for a list of possible options
sleep: missing operand
Try "sleep --help" for more information.
My shell script looks like this :
#!/bin/bash
# -*- coding: utf-8 -*-
export LIB=C:/home/b04280/Transfert/Libs/
CLASSPATH=$(echo "$LIB"/*.jar | tr ' ' ':')
export ficIn=C:/home/b04280/Transfert/rgeII.xlsx/
export repIn=C:/home/b04280/Transfert/rgeII/
export repOut=C:/home/b04280/Transfert/rgeIIcible/
javac -cp $CLASSPATH Element.java
javac -cp $CLASSPATH RGE.java
javac -Xms1024m -Xmx1024m -cp $CLASSPATH RGE $ficIn $repIn $repOut > docx.txt
sleep
I am wondering where this error comes from, I looked at other questions on here regarding the same topic but their solutions didn't seem fit to my particular case.
Any help please? Thanks in advance.
PS. I also have the sleep error (I "translated" this script from batch --> shell and "sleep" was the replacement I found for "pause")
bash -x run_RGE.sh, it will show the expanded commands it's running. - Aarongit bashorcygwinthat might work, but on a real Unix OS theecho "$LIB"/*.jarpart won't work with a windows path - Aaron