Good Q. Working on same myself. To point Selenium to correct profile, so far I have the following (not complete - but part way; think there is better way; I can't open to drivers with same executable path, but can define multiple chrome drivers that pt. to same executable and then add arguments with separate profiles to each of those...(I'm using Python, you'll need to find out equivalent for Java).
from selenium import webdriver
from selenium.webdriver.chrome.webdriver import WebDriver
Options = webdriver.ChromeOptions()
Profile_Path = "C:/Users//AppData/Local/Google/Chrome/User Data/Profile/"
'''i.e. relevant path to profile in question'''
Options.add_argument('--user-data-dir=' + Profile_Path)
'''I'm experimenting with the map function to pass list of chromedrivers to a function with a loop that does something like this:'''
def SetUp(Number_Drivers):
v_profiles = []; v_options = []; v_chromedrivers =[]; v_drivers = []
profile_path = "C:/Users/..../User Data/Profile"
'''put path of profile, noting this will become Profile1, Profile2, etc. below...'''
chromedrv_path = "C:/Users/... '''(i.e. path to chromedriver)'''
for i in range(Number_Drivers):
v_profiles.append(profile_path + str(i) + "/")
v_options.append(webdriver.ChromeOptions())
v_chromedrivers.append(chromedrv_path)
v_options[i].add_argument('--user-data-dir=' + v_profiles[i]
''' v_options[i].add_argument to be included for each other argument you want to
add, e.g. '--restore-last-session', '--disable-notifications', '--disable-
search-geolocation-disclosure' etc.)'''
v_drivers.append(webdriver.Chrome(executable_path=v_chromedrivers[i], options=v_options[i])
That's as far as I am - good luck!