<br><div><span class="gmail_quote">On 5/2/07, <b class="gmail_sendername">Ben Edwards</b> <<a href="mailto:funkytwig@gmail.com">funkytwig@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am trying to run something that needs JDK 1.5 and it wnt work. I<br>cant work out what version Feisty has. dpkg-l says its 1.5 but if I<br>ask vava it says its 1.4.2. Who should I believe (output from<br>commands below).
<br><br>Ben<br><br>root@chomsky:~/sqldeveloper# dpkg -l | grep jdk<br>ii sun-java5-jdk 1.5.0-11-1ubuntu2<br> Sun Java(TM) Development Kit (JDK) 5.0<br><br>root@chomsky:~/sqldeveloper# java --version
<br>java version "1.4.2"<br>gij (GNU libgcj) version 4.1.2 (Ubuntu 4.1.2-0ubuntu5)<br><br>Copyright (C) 2006 Free Software Foundation, Inc.<br>This is free software; see the source for copying conditions. There is NO
<br>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br>--<br>Ben Edwards - Bristol, UK<br>If you have a problem emailing me use<br><a href="http://www.gurtlush.org.uk/profiles.php?uid=4">http://www.gurtlush.org.uk/profiles.php?uid=4
</a><br>(email address this email is sent from may be defunct)<br></blockquote></div><br>Hi Ben,<br>
This is just a guess, but maybe you have both. Maybe the Java
executable in your path points to an old one, but you actually have 1.5
installed. Try finding the java binary that is part of the package
with <span style="font-family: courier new,monospace;">dpkg-query --listfiles sun-java5-jdk</span>. You'll get a long file listing, but you're looking for the binary java executable.<br>
<br>
After you find that binary, try executing java -version using the full path from the package.<br>
<br>
When you have found the right one, just make sure it's the first one
available in your path. I think you'll find that the one in the path
is a symbolic link. So, you just need to change where that symbolic
link points to.<br>
<br>
Mine is /usr/bin/java, but I installed Java directly from Sun and
didn't use the package. It's a symbolic link that goes two levels deep
before it points to the actual binary file. Check this out:<br>
<br>
<div style="margin-left: 40px;"><font size="1"><span style="font-family: courier new,monospace;">vince@home:/hdb/video/vince$ ls -l `which java`</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">lrwxrwxrwx 1 root root 22 2007-03-07 06:37 /usr/bin/java -> /etc/alternatives/java</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">vince@home:/hdb/video/vince$ ls -l /etc/alternatives/java</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">lrwxrwxrwx 1 root root 36 2007-03-06 17:29 /etc/alternatives/java -> /usr/lib/jvm/java-6-sun/jre/bin/java</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">vince@home:/hdb/video/vince$ ls -l /usr/lib/jvm/java-6-sun/jre/bin/java</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">-rwxr-xr-x 1 root root 47116 2006-11-29 22:49 /usr/lib/jvm/java-6-sun/jre/bin/java</span></font><br>
</div>
<br>
-- Vince<br>