This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

about IP  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should i allow the user to specify the IP address for server or use InetAddress to get the IP of server?
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,

in my unserstanding it's not a question of using InetAddress or not. correct me if i'm wrong, but i would say that there is no way to find out the ip address of the server (well, you can try out all ;-) )

so you have to have an option to enter an id-adress. (property files are forbidden for basic configuration.)

i implemented a little gui to enter the ip adress. i'm then constructing an InetAddress object out of it, first reason is for input verification, second reason is for type-safe communication between user-gui and data connector.

works pretty good so far ;-)

greets,
jan
 
David George
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe i had a wrong expression . I meant that if allow the server to config the IP in suncertify.property by InetAddress . Or when start the server , allow to enter the server's IP through the server' gui.
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, i see....

well, it's a three-liner to find out the current ip, and it's way more comfortable for the user.

i'm reading out the ip & display it in the server gui, which has start & stop buttons & a filechooser.

greetings,
jan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!