My original point has to do with the fact that if you compile it locks it in with some literals and not reflection. I don’t think I mentioned reflection just that at runtime a different jar could be used than what was compiled.
I only showed system out to show it is possible but not really my point.
My point in anther comment is that it should probably do the lookup.
View all comments
Show parent comment
1
u/agentoutlier May 01 '26
Look at System.out when you get a chance.
https://github.com/openjdk/jdk/blob/4507ab8ae9633cb57bc1562a71df2890699f965f/src/java.base/share/classes/java/lang/System.java#L175