This KB describes how to fix “Error: native VM not supported” with a simple method.
Error:
Error: native VM not supported
Fix:
- If you run a script and you get this error, first of all you need to check script if there is any strings like which I added below. You need to change OPTIONS and disable “-native”.
Original Version:
if [ "`java -version 2>&1 | grep \"version.*1.4\"`" != "" ]; then OPTIONS="" else OPTIONS="-native" fi
Change OPTIONS:
if [ "`java -version 2>&1 | grep \"version.*1.4\"`" != "" ]; then OPTIONS="" else OPTIONS="-native" fi
- If you have defined “-native” in your java configuration please check and disable it.
if [ "`java -version 2>&1 | grep \"version.*1.4\"`" != "" ]; then OPTIONS="" else OPTIONS="-native" fi
To remove ‘-native’ flag
if [ "`java -version 2>&1 | grep \"version.*1.4\"`" != "" ]; then OPTIONS="" else OPTIONS="-native" fi