22
Jul
08

jdk 1.6.0 error on freebsd

I got the following error everytime I run my Java code using JDK 1.6.0 on FreeBSD 7.0 Stable.

java.io.IOException: Invalid argument
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:612)

I’ve been wondering what’s wrong since then. Thanks to this site, now I found the solution. Somehow, seems like Java always interpret the send method to use IPv6 related parameter, which of course will fail in case we use IPv4 parameter. We have to add parameter -Djava.net.preferIPv4Stack=true so that our code run smoothly.

Ijyou desu..


0 Tanggapan ke “jdk 1.6.0 error on freebsd”



  1. Tinggalkan sebuah Komentar

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Ubah )

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s


Ikuti

Get every new post delivered to your Inbox.