This discussion is archived
4 Replies Latest reply: May 17, 2011 7:57 AM by 797744 RSS

Why would this fail in 64-bit JRE but work in 32-bit JRE?

797744 Newbie
Currently Being Moderated
I've got a Linux box with both a 32-bit and a 64-bit JRE installed. The code

InetAddress host = InetAddress.getLocalHost();

run fine when I use the 32-bit JRE but throws a UnknownHostException when run against the 64-bit JRE. Everything else seems to run fine in the 64-bit Java; this is the only code we've found that is failing. I suspect I am missing a 64-bit library but I would think that would lead to a different error. I've run strace against both cases and the libraries loaded are identical, other than one loads the 32-bit libraries and the other loads the 64-bit libraries. Something is missing though on my system that causes Java to throw an exception when running with the 64-bit JRE. Does anyone have any suggestions what might causes this behavior?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points