【初心者】Java質問・相談スレッド75【大歓迎】
■ このスレッドは過去ログ倉庫に格納されています
0176172
2005/11/16(水) 13:27:00すみません、勉強不足のためよくわかりません…。とりあえずソースを載せます。
import java.net.*;
import java.util.*;
import java.io.*;
class a{
public static void main(String args[]){
try{
FileInputStream propFile = new FileInputStream("b.properties");
Properties p = new Properties(System.getProperties());
p.load(propFile);
System.setProperties(p);
System.getProperties().list(System.out);
InetAddress ia[] = Inet6Address.getAllByName(args[0]);
for(int i = 0;i < ia.length;i++)
System.out.println(ia[i]);
}catch(Exception e){
}}}
プロパティファイルb.propertiesも載せます。
java.net.preferIPv6Addresses=true
java.net.preferIPv4Stack=false
ちなみにOSはFreeBSD5.4RELEASE-p8です。
>>174
マシン名を渡してもダメでした…。
■ このスレッドは過去ログ倉庫に格納されています