os-maven-plugin icon indicating copy to clipboard operation
os-maven-plugin copied to clipboard

Can detects arch for OS, not JDK?

Open slavashvets opened this issue 8 years ago • 3 comments

When 32-bit JDK is running on 64-bit OS the plugin detects x86_32 arch.

Is there a way to avoid this? As a temporary workaround I do additional check System.getenv("ProgramFiles(x86)") and fix final value.

slavashvets avatar Feb 03 '17 10:02 slavashvets

I'm not sure if this is a good idea given that the primary purpose of this plugin is to use the detected architecture to load .dll or .so. If we returned x86_64 for 32-bit JDK, the chosen shared object will not be loaded.

trustin avatar Apr 21 '18 12:04 trustin

I'm not sure if this is a good idea given that the primary purpose of this plugin is to use the detected architecture to load .dll or .so. If we returned x86_64 for 32-bit JDK, the chosen shared object will not be loaded.

To the OP's point, if it's being used for building/packaging decisions, it's not necessarily true that the JDK is ever being invoked for a runtime decision. I agree that it should be non-default but I can also see why it would be useful.

tresf avatar Apr 05 '19 15:04 tresf

I see. Sounds like a good idea to have an option for that, probably from a configuration like this.

trustin avatar Feb 06 '21 06:02 trustin