Why is IOUtil.testDirExec() needed?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Why is IOUtil.testDirExec() needed?

mbastian2
Hi everyone and congrats for the recent 2.3.2 release! I'm tracking down a problem where my users are reporting Antivirus warnings about a "jogamp_tst_exe" executable being launched. I've identified the source in Glugen's IOUtil.testDirExec() method which seems to aim to test whether an executable can be run. Can someone clarify whether that's the expected behavior and why would JOGL need to be able to run executables when embedded as a library? And then, if there's a way to disable that.

Help much appreciated!
Reply | Threaded
Open this post in threaded view
|

Re: Why is IOUtil.testDirExec() needed?

gouessej
Administrator
Hi

Actually, the virus scanners shouldn't even exist. The flaws are fixed as time goes by on a safe operating system. Some virus scanners are paranoid and report false positives. This executable is necessary, it's an essential part of the automated native library loading. You can remove it if and only if you disable the automated native library loading, I documented this aspect several months ago in the JOGL user's guide, you can find it in the wiki. If you disable it, you'll have to set the Java library path to the location of the native libraries.

I suggested to use a method of the NIO 2 API as a fallback but according to Sven, it wouldn't be as reliable as the current solution.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Why is IOUtil.testDirExec() needed?

Xerxes Rånby
In reply to this post by mbastian2
the reason why this executable exist is that we need a way to determine which temp directorys on a windows system that allow us to extract and load dll's. On windows the only way to find out if a temp dir allows execution is by actually trying to launch an executable. The test executable jogamp_tst_exe is the most minimal executable possible, jogamp_tst_exe its like a hello world without printing hello world. When this executable executes and return then we know that the temp directory can be used to extract the jogamp native dll that we later use to access your opengl driver.
Reply | Threaded
Open this post in threaded view
|

Re: Why is IOUtil.testDirExec() needed?

mbastian2
Understood. Thanks both for the explanation.
Reply | Threaded
Open this post in threaded view
|

Re: Why is IOUtil.testDirExec() needed?

gouessej
Administrator
You're welcome. Feel free to fill a bug report about this problem but then you'll have to mention which virus scanners report false positives.

Actually, despite the ways to mitigate the problem, it doesn't solve everything. Some virus scanners still occasionally detect JOGL and/or GlueGen native libraries as viruses when downloading, installing or decompressing a JOGL application.
Julien Gouesse | Personal blog | Website