| | |
finding ip thru a java application
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
Look up the InetAddress class:
http://java.sun.com/j2se/1.4.2/docs/...etAddress.html
There should be a method in there that suits your needs.
http://java.sun.com/j2se/1.4.2/docs/...etAddress.html
There should be a method in there that suits your needs.
here's the method:
Java Syntax (Toggle Plain Text)
try { InetAddress inetAdd = InetAddress.getByName(input.getText()); output.setText(inetAdd.getHostAddress()); } catch (Exception e1) { output.setText("ERROR"); }
•
•
Join Date: Jun 2004
Posts: 609
Reputation:
Solved Threads: 8
Hi everyone,
You can see the below three links. They come with sample codes and examples
http://javaalmanac.com/egs/java.net/GetHostname.html
http://javaalmanac.com/egs/java.net/...ame.html?l=rel
http://javaalmanac.com/egs/java.net/Local.html?l=rel
I hope this helps you
Richard West
You can see the below three links. They come with sample codes and examples
http://javaalmanac.com/egs/java.net/GetHostname.html
http://javaalmanac.com/egs/java.net/...ame.html?l=rel
http://javaalmanac.com/egs/java.net/Local.html?l=rel
I hope this helps you
Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
![]() |
Similar Threads
- JNDI/JDBC lookup problem with Sun Java Application Server 8.2 (Java)
- How to hide an java application (Java)
- How to create an exe for a Java application (Java)
- Can any one help me with java application (Java)
- How to Open a word doc from a java application? (Java)
- Adapting a Java Application to JSP/Servlets (Java)
Other Threads in the Java Forum
- Previous Thread: Web Crawler
- Next Thread: search and replace
Views: 1865 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Java
android api apple applet application applications arguments array arrays automation bank binary bluetooth chat class classes clear client code codesnippet component database db development dice draw ebook eclipse error event exception file formatingtextintooltipjava fractal game givemetehcodez graphics gui helpwithhomework html ide image infinite input integer invokingapacheantprogrammatically j2me jarfile java javaprojects jmf jni jpanel julia linux list loop map method methods mobile netbeans newbie number object openjavafx oracle parameter print problem program programming project recursion repositories scanner screen scrollbar server set size sms socket sort sorting sql sqlserver state storm string superclass swing swt test text-file threads time transfer tree windows






