This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

About the IP of a RMI server

 
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
My computer is in a LAN. How can I get my computer's IP , Thus I can lookup the IP from a position outside the LAN to find the remote object.
Best,
Damu
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're running Windows 2000, ME, 98, XP, NT, a double-monitor icon appears in your system tray, and your TCP/IP protocol stack is initialized, double-click the icon, click the Properties button in the Local Area Connection Status box, then choose the Internet Protocol (TCP/IP) selection and click the Properties button in the Local Area Connection box and read the IP address from the General tab.
If you're running Linux, type ifconfig in a command window.
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll add to what Michael said. You can also type ipconfig at a dos/command prompt to get it in textual form under win98/2k/XP. Under linux you can do the ifconfig as he mentioned, but if you know which device (eth0,eth1,eth2) your connection is on, you can specifically query it by typing "ifconfig eth0" for example for the eth0 device. I have my code actually parse the text response from that to see if my linux box is on a dhcp enabled network. If it's not, my program assigns the box a default network address. I do that so a user can direct connect using a crossover cable from a laptop.. Its really cool.
Just reread your post. Is your computer even visible to the outside world beyond your lan? Better check on that, as many lans are set up to restrict access in to mostly servers and such, and not user's machines.
Also, if you are trying to get your IP inside the Lan from some remote machine outside the lan, you are going to have to set up a remote RMIregistry on a server that can be accessed from the web. I haven't done that, but I think Michael has. Check out his big loooong post. I believe he describes how to do that there.
HTH
Chris
 
Straws are for suckers. Now suck on this tiny ad!
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!