AppiumDriverLocalService on java-client 8.0.0 not working

While trying to programmatically open appium server using java-client 8.0.0 I see below error msg:

io.appium.java_client.service.local.AppiumServerHasNotBeenStartedLocallyException: The local appium server has not been started. The given Node.js executable: /usr/local/bin/appium Arguments: [/usr/local/lib/node_modules/appium/lib/appium.js, --port, 18384, --address, 0.0.0.0]
Process output: usage: /usr/local/lib/node_modules/appium/build/lib/main.js
[-h] [–shell] [–allow-cors] [–reboot] [–ipa IPA] [-a ADDRESS]
[-p PORT] [-pa BASEPATH] [-ka KEEPALIVETIMEOUT] [-ca CALLBACKADDRESS]
[-cp CALLBACKPORT] [-bp BOOTSTRAPPORT] [-r BACKENDRETRIES]
[–session-override] [-l] [-g LOGFILE]
[–log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}]
[–log-timestamp] [–local-timezone] [–log-no-colors] [-G WEBHOOK]
[–safari] [–default-device] [–force-iphone] [–force-ipad]
[–tracetemplate AUTOMATIONTRACETEMPLATEPATH]
[–instruments INSTRUMENTSPATH] [–nodeconfig NODECONFIG]
[-ra ROBOTADDRESS] [-rp ROBOTPORT]
[–chromedriver-executable CHROMEDRIVEREXECUTABLE] [–show-config]
[–no-perms-check] [–strict-caps] [–isolate-sim-device]
[–tmp TMPDIR] [–trace-dir TRACEDIR] [–debug-log-spacing]
[–suppress-adb-kill-server] [–long-stacktrace]
[–webkit-debug-proxy-port WEBKITDEBUGPROXYPORT]
[–webdriveragent-port WDALOCALPORT] [-dc DEFAULTCAPABILITIES]
[–relaxed-security] [–allow-insecure ALLOWINSECURE]
[–deny-insecure DENYINSECURE]
[–command-timeout DEFAULTCOMMANDTIMEOUT] [-k]
[–platform-name PLATFORMNAME] [–platform-version PLATFORMVERSION]
[–automation-name AUTOMATIONNAME] [–device-name DEVICENAME]
[–browser-name BROWSERNAME] [–app APP] [-lt LAUNCHTIMEOUT]
[–language LANGUAGE] [–locale LOCALE] [-U UDID]
[–orientation ORIENTATION] [–no-reset] [–full-reset]
[–app-pkg APPPACKAGE] [–app-activity APPACTIVITY]
[–app-wait-package APPWAITPACKAGE]
[–app-wait-activity APPWAITACTIVITY]
[–device-ready-timeout DEVICEREADYTIMEOUT]
[–android-coverage ANDROIDCOVERAGE] [–avd AVD] [–avd-args AVDARGS]
[–use-keystore] [–keystore-path KEYSTOREPATH]
[–keystore-password KEYSTOREPASSWORD] [–key-alias KEYALIAS]
[–key-password KEYPASSWORD] [–intent-action INTENTACTION]
[–intent-category INTENTCATEGORY] [–intent-flags INTENTFLAGS]
[–intent-args OPTIONALINTENTARGUMENTS] [–dont-stop-app-on-reset]
[–calendar-format CALENDARFORMAT] [–native-instruments-lib]
[–keep-keychains] [–localizable-strings-dir LOCALIZABLESTRINGSDIR]
[–show-ios-log] [–async-trace] [–chromedriver-port CHROMEDRIVERPORT]
[–log-filters LOGFILTERS] [-v]
/usr/local/lib/node_modules/appium/build/lib/main.js: error: unrecognized arguments: /usr/local/lib/node_modules/appium/lib/appium.js

Sample Start-up code(worked on java-client 8.0.0-beta version:

service = AppiumDriverLocalService
.buildService(new AppiumServiceBuilder()
.usingDriverExecutable(new File("/usr/local/bin/appium"))
.withAppiumJS(
new File(
“/usr/local/lib/node_modules/appium/lib/appium.js”))
.usingPort(port));
service.start();

Appium Version Used: 1.20.0 and 1.22.0