[Feature-5311] JXBrowser EngineOptions

Is it possible to modify the userDataDir setting of a running JXBrowser instance on a vision window?

EngineOptions.newBuilder
        .userDataDir(somePath)

Hey @jpark!

It doesn’t look like we expose this directly, but you might be able to do it by providing the correct switch with prefix by setting a system property on the client. It looks like ignition.chromium.switch.user-data-dir=/some/path/to/userdata might work.

Let me know if you get that working!
JJ Coffman

I’ve added that option in the client launcher jvm argument, but it doesn’t seem to affect anything.

@jcoffman
Adding ignition.chromium.switch.user-data-dir=/some/path/to/userdata doesn’t seem to have any effect?

Sorry, probably should have said this a system prop (D prop) so -Dignition.chromium.switch.user-data-dir=/some/path/to/userdata defined in the Vision Client Launchers’ JVM options in that vision application’s settings.

I was able to confirm this works locally. Let me know if that helps.

Obviously I am doing something incorrectly.

image

Try forward-slashes or double back-slashes in your path?

I’ve tried every combination of slashes.

Hey Jae,

I did some poking on windows and it looks like JxBrowser is supplying its own user-data-dir on windows which is preventing the one applied as a switch. There is a way to supply this value to JxBrowser directly instead of passing it through to chromium (as you mentioned in your first comment) and Im going to open a ticket to expose that so its available regardless of the OS you are on.

2 Likes