Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7685763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:19:33+00:00 2026-05-31T19:19:33+00:00

I am creating a chat application using java sockets programming. I want to launch

  • 0

I am creating a chat application using java sockets programming. I want to launch it in my local network which means my application doesn’t require internet to run. I tested the application on my computer itself by using the

InetAddress.getLocalHost();

method to create an Inetaddress object of my ip address.
Now the problem comes when i want to create this object with some other ip address in the local network..

After some experimenting i came to know that there is another function Inetaddress.getbyAddress(byte[]);

which takes byte array as ip address argument. Now if i want to create an
InetAddress object of an ip address say
192.168.234.190 i am not able to… since the .
byte array holds only values up to 127!!

what to do?

thanks in advance…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:19:34+00:00Added an answer on May 31, 2026 at 7:19 pm

    You could use InetAddress.getByName("192.168.234.190"); or if you really want to use getByAdress:

    InetAddress.getByAddress(new byte[]{(byte)192,(byte)168,(byte)234,1});
    

    The IP can be stored like this:

    byte IP[]= new byte[]{(byte)192,(byte)168,(byte)234,1});
    

    Now you have the IP in the array of bytes named IP and you could call multiple times InetAddress.getByAddress(IP);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a very simple Java chat program, using the Java TCP sockets. I'm
I am Creating a chat application using XMPP Framework in iPhone. I want to
I am creating a application with chat using java ,mongo database using servlet ,
I am creating a chat application using JApplet . I have a TextArea where
I am creating a chat application wherein I want to use smileys in the
I am creating a chat application the interacts between two users. I want to
I am creating a chat application which supports chat, group chat, file sharing, whiteboard(not
I am creating a web chat application using asp.net vb. I have got the
I want to create chat application in iPhone. Are there any framework(s) which support
I'm working on a chat application which I would love to use a SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.