Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Constructor InetAddress private ?

Status
Not open for further replies.

Themuppeteer

Programmer
Apr 4, 2001
449
BE
what the h*ll means this ?
I need a InetAddress var to send my udp packet,but the constructor is private ! This is the error I get:

"Net.java": Error #: 307 : constructor InetAddress(java.lang.String, byte[]) is not public in class java.net.InetAddress; cannot be accessed from outside package at line 58, column 26

Can anyone please help? Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Well, solved the first problem:

InetAddress a=new InetAddress; // doesn't work

but

InetAddress a=InetAddres.blabla //works


BUT:

How do I send something to the broadcastadres 255.255.255.255 ?

I've tried :
Inetaddress a=Inetaddres.getHostByName("255.255.255.255");

but thats not correct,as when I do a getAddress on a,its not 255.255.255.255...


Any hints? Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top