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 Responses to “jdk 1.6.0 error on freebsd”

  1. Tinggalkan sebuah Komentar

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

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

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s

%d blogger menyukai ini: