added optional java environment