> I just wonder if there wouldn’t be some way to have a platform wide 
> mechanism. Build something in the java installer maybe that makes sure the 
> complete set of /usr/bin links is there? 
> Or if scripts like this start getting to OS X with /usr/bin/jdeps they will 
> break.

The issue (for Oracle...) is installing things in /usr/bin is (putting it 
lightly) generally frowned upon, that's an Apple managed area (along with all 
the symlinks into JavaVM.framework). Users are, of course, free to modify at 
will but are wholly responsible for the consequences of modifying the system.

Ultimately, this is no different than Windows, Linux or Solaris. At least in 
some Linux distributions there are symlinks managed by the flavor provider 
(e.g., Ubuntu with it's "alternatives") but even those are subject to becoming 
stale when things change in the JDK and in my experience the whole system is 
extremely fragile, allowing tools to be out of sync with other tools. For 
example, javac, javah and javap could all end up being symlinked to different 
JDKs (that's a bit extreme, but I've had a similar situation happen, more than 
once).

IMHO, the best solution is to not have centralized stub tools or symlinks and 
rely on setting the path correctly (that's exactly what PATH is for). At most, 
provide tools for discovering the desired toolset, like /usr/libexec/java_home. 
Then these problems simply don't exist because you're always running the tools 
directly rather than via symlinks or stub binaries.


I do agree that it would be ideal if we could provide something that would 
basically accomplish what my script does. There's been discussion about this, 
but as you can see it hasn't gone anywhere.

-DrD-

Reply via email to