On Apr 30, 2015, at 1:21 PM, David DeHaven <david.deha...@oracle.com> wrote:

> 
>> 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-
> 

I still have to look at what yours does more closely. At least to sort of 
understand what it is doing if not exactly how it does it.
I’m still not sure how that addresses the shell scripts that get passed around 
that often seem to hardcode the /usr/bin paths. 
Googling “/usr/bin/jdeps”
gets 5,960 hits. Not tons, but this is a pretty new command. The hits mostly 
seem to be Unix system set up and not application installs.
Maybe the scripts from Unix to other Unix aren’t that common. Or the authors 
can some day be convinced to stay away from the /usr/bin hardcoded paths.

Michael Hall





Reply via email to