Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Wish: JDK_BIN environment variable defined by setup in Windows

852311Nov 1 2013

For many years, in order to make my life easier, every time after running JDK setup, I would manually set an environment variable called JDK_BIN pointing to the directory holding javac.exe

This makes a lot of things easier, like setting PATH to include javac.exe path, etc.  I also tell my friends to do so and they agree with me as well.  The only problem is that we have to remember to reset the variable to point to the new directory after running a new setup.


My little wish is that new versions of JDK setup could define this variable automatically.

I know the "home" directory is defined in registry but it would be much nicer if it's defined as an environment variable as well (I mean the bin, not the home).  For one, it's easier to get the string on command prompt and batch and we don't need any special tool or API to "dig" deeply into the registry to get the string.

Oh how I hope this message could get to the guys who make JDK setups for Windows but I don't think so.  But I feel I need to express my opinion anyway

Comments

The feature is implemented using the bash command_not_found_handle function. If this function is defined it is executed when a command can't be found. On OL this function gets defined by /etc/profile.d/PackageKit.sh which is installed by the PackageKit-command-not-found package. If you remove that package then this behavior should be disabled.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 29 2013
Added on Nov 1 2013
0 comments
971 views