apt is the Annotation Processing Tool and is distributed with implementations of java >= 1.5. It is located in the bin directory of the sdk and should be handle the same as java, javac etc etc. Should this symlink be created by >=virtual/jdk-1.5? My thinking is that as java-1.4 does not provide apt a user who does not have a 1.5 sdk installed should not have this link.
apt symlink is there since java-config-2.0.28. even if you installed it with virtual/jdk-1.5 you could try it to run with jdk-1.4 and get the error, so that's not a solution. Patches welcome for a more intelligent error/warning messages :)
See bug 122516 for another example of what to consider.
Created attachment 97223 [details, diff] patch to display better error msgs for missing java tools (option 1) Here is the first option for an improved error message. As has been stated in #122516 we can not 'choose' to use a external tool if it is not available within the currently selected java vm. Nichoj also suggested a change to an error message similar to 'Tried to execute javaws from the VM located in /etc/java-config-2/current-system-vm, but the executable did not exist' I like this as being clean but am concerned it would result in a lot of 'lost souls' who would not be able to fixure out the reasons behind it.
Fixed in SVN. Will be included with 2.0.29, see bug #141849. Removing dependency since it's a slightly different issue.