After my research, I found out below code would get the path of Eclipse's current workspace's project directory:
//get object which represents the workspace
IWorkspace workspace = ResourcesPlugin.getWorkspace();
//get location of workspace (java.io.File)
File workspaceDirectory = workspace.getRoot().getLocation().toFile()
Note: You need to import org.eclipse.core.resources
and org.eclipse.core.runtime
to use these API's