Wouldn't it be easier just to require that a JDK be installed and $JAVA_HOME be set? It seems rather dangerous to package tools.jar with your app. It would then be the user's responsibility to get $JAVA_HOME on the $PATH however they choose to do it.