Welcome to LQ.
No, the "rpm database" will not know the package name
jdk-6u14-linux-i586.rpm
But probably jdk-6u14-linux-i586 , if that is correct ?
Please find the actual name with
yum list installed | grep jdk
or
rpm -qa | grep jdk
.....
The reason for 'java -version' to return java version 1.4
is that the link 'java' in /usr/bin/ is pointing to " 1.4 "
This can probably be changed with the command
# /usr/sbin/alternatives --config java
( or may be : sudo /usr/sbin/alternatives --config java )
More hints here
http://fedorasolved.org/browser-solutions/java-i386
.....