RFR: 8171508: Remove -Dsun.java.launcher.is_altjvm option [v5]

Calvin Cheung ccheung at openjdk.org
Wed Apr 9 06:19:52 UTC 2025


On Tue, 8 Apr 2025 08:16:27 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> > > Are the Posix variants all identical? If yes, can we move this to os::posix.cpp? If not, what are the differences?
> > 
> > 
> > AIX has a different dll lookup mechanism, but otherwise these should be pretty much identical. Windows also only really differs in the lookup mechanism. Maybe new RFE to refactor these and share some code?
> 
> Okay. The code could also be simpler if it were to use stringStream, spanned over the caller-provided buffer. No character counting and truncation handling needed then (but we would need to add truncation detection to stringStream, but that is really easy).

I agree with David about doing the refactoring in a new RFE. I've simplified the code by using stringStream as you suggested. I didn't add truncation detection to stringStream (which I think could be done in another RFE). However, I added an assert in `os::jvm_path()` to ensure there's no truncation.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24310#issuecomment-2788389180


More information about the hotspot-runtime-dev mailing list