Open A New Project on the Same Client

Maybe I’m going about this all wrong but I’m trying to start a new instance of a project on a client in a diffent process (I don’t want to close the current one though). I’ve tried using this when a button is clicked:

system.util.execute(["C:\Program Files\Java\jre6\bin\javaws.exe -localfile", "http://iowaeng2:8088/main/system/launchfs/client/ProductionDisplays.jnlp"])

and get the following:

I’ve tried several variations of syntax with no luck. I don’t want to redirect. Is there another way? Thanks

You have to do the following:system.util.execute(["C:\Program Files\Java\jre6\bin\javaws.exe","http://iowaeng2:8088/main/system/launchfs/client/ProductionDisplays.jnlp"])

That gives me the same error. I noticed in the error this:

It looks like an unprintable character is interpretted (?) perhaps. If I run the same thing from the client computers run prompt I don’t get that. Any idea?

Try escaping the backslashes in the path to javaws:

system.util.execute(["C:\\Program Files\\Java\\jre6\\bin\\javaws.exe","http://iowaeng2:8088/main/system/launchfs/client/ProductionDisplays.jnlp"])

Good catch :slight_smile:

I used the javaws.exe on my computer and it failed with an older version of Java at the plant.
I created a way to use the version of java based on the installed directory. I couldn’t find a way to query for version that worked. It only works if there is 1 directory in …/Java/

import os
Directory = os.listdir("C:/Program Files/Java/")

DirectoryVersion = str(Directory).replace("['","").replace("']","")

JavaLocation = 'C:\\Program Files\\Java\\' + DirectoryVersion + '\\bin\\javaws.exe'
Address = ""


Any better ways?

If you’re on 7.9, then you should use openDesktop rather than opening additional client instances:

If you insist on opening multiplie clients, then C:\ProgramData\Oracle\Java\javapath\javaws.exe is a symlink to whatever the last Java installer run put on your machine. I believe that will work on Windows 7-10.

Each piece of equipment has Edge as the HMI (4 total). This is an effort to show and control what’s happening over there without going over there. I would import the screens and tags to our project but the Edge tag limit stops that from happening so we are just opening the second instance locally. I would use the redirect as it’s much faster but the main HMI program needs to keep running.

And when you aren’t looking for something you find it - a Tag with the Java version.