You are here

Interpretation of the documentation with respect to Java

6 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
Interpretation of the documentation with respect to Java

In the documentation with the subject "Making Java applications portable" I found in the section Build systems and command line arguments the following sentence:

The problem with bypassing AppName.exe and directly calling javaw.exe is that [Launch]:SingleAppInstance no longer works correctly and must be set to false.

For a better differentiation I call the local and portable instance of AppName.exe as follows:

  • AppName_local_instance.exe
  • AppName_portable_instance.exe

Therefore I'll name also the directly called instances of javaw.exe as follows:

  • javaw_local_instance.exe
  • javaw_portable_instance.exe

Assuming that firstly was started the local instance of AppName.exe, which I've named suitably as AppName_local_instance.exe. By bypassing AppName_local_instance.exe directly was called javaw_local_instance.exe. Afterwards I run the portable instance AppName_portable_instance.exe with the consequence, that again directly was called javaw_portable_instance.exe.

My question now is why [Launch]:SingleAppInstance can not be applied to the two instances javaw_local_instance.exe and javaw_portable_instance.exe?

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 3 days 7 hours ago
DeveloperModerator
Joined: 2010-05-25 18:19
You have to think bigger to see the limitation

In having an app that runs javaw.exe directly, as soon as you attempt to run another (different) Java-based PortableApp that also directly runs javaw.exe and has SingleAppInstance=true, its Launcher would detect that javaw.exe was already running and would silently abort.

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
meaning of that statement

I assume that the statement in the documentation is related to only one app (local and portable instance of the same app) and not to different apps. In the next sentence of the documentation is mentioned the following:

Instead, if mixing local and portable instances is not valid, set [Launch]:CloseEXE to AppName.exe, so that the local version, still running AppName.exe, will be required to close before the portable application will start.

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 3 days 7 hours ago
DeveloperModerator
Joined: 2010-05-25 18:19
javaw.exe is only one app -

javaw.exe is only one app - no matter how it is launched.

To elaborate:
As far as I know when SingleAppInstance is set to true the Launcher looks to see if the app executable is currently running - for Java apps which directly run javaw.exe the executable looked for is always javaw.exe - therefore a Java-based app with SingleAppInstance=true will never launch while another Java-based app is already running because javaw.exe will be running, even if it was called by a different PortableApp.

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
limitation of the problem

Indeed is your statement correct. But I think, that the main problem is related to an other direction. Namely to the issue, that the mixing of local and portable instances of the SAME APP is not valid (see the second sentence in the documentation, which I've mentioned above). But probably it's impossible, that [Launch]:SingleAppInstance can be applied to javaw.exe. That seem to be the main issue.

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
supplementary annotations

In my last comment I've mentioned the assumption, that probably [Launch]:SingleAppInstance can't be applied to javaw.exe. For a better understanding of this statement, I would like to explain briefly the scope of Launch]:SingleAppInstance. This construct is related to the case of the simultaneous running of a local installed and a portable version of the same app. But in the case of the execution of two instances of javaw.exe we have not the situation, that now simultaneously runs a portable and local installed version of the same app. Because javaw.exe is no portable version of an app.

Log in or register to post comments