You're not importing that library.
As you can see i have already imported com.tableausoftware.server.ServerAPI in my program.
Thanks Tom, I was able to run ServerAPI.initialize() after reinstalling SDK and adding PATH to environment variable.
Now i'm getting
com.tableausoftware.TableauException: Server Response Code: 401
at com.tableausoftware.server.ServerConnection.connect(Unknown Source)
new ServerConnection().connect("https://dub01.online.tableau.com", "username", "password", "");
I'm sure my credentials are correct since i can login into web portal with same credentials.
Any idea what may be the reason?
Error got resolved after adding siteID i.e fourth parameter in connect meathod. Is it mandatory to enter siteID?