on 03-16-2006 11:57 AM
Hi
In a network The ip addresses of every system is changing.So that i want to know the ipaddresses of the system dynamically.
I want a client program to do that.
And also i want to kno how to create a .exe file for java
class file
Hi
In order to find the IP address of a system dynamically through a java programme Here is code...
import java.net.*;
public class check{
public static void main(String args[])
{
try
{ InetAddress addr = InetAddress.getLocalHost();
String ipaddress_as_text =addr.getHostAddress();
System.out.println(ipaddress_as_text);
}
catch(Exception ex){}
}}
For the 2 question ie to convert a .class file to a
.exe file there are some tools available...
I think the following link will be useful to you.
http://duckware.com/jexepack/index.html
Thank you....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To get the ip address dynamically use
InetAddress.getLocalHost()
This returns an InetAddress instance. Refer this link http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html#getLocalHost()
If you are using Netweaver Developer Studio, then saving *.java file, will create corresponding *.class file in your workspace.
Else, in command prompt type in
javac <filename>.java
This command will create a <filename>.class file.
Regards,
Uma
Message was edited by: Uma Maheswari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi soma,
The interface com.sap.engine.lib.security.http.HttpCallback can be used to get the client IP... for more info check this link...
http://help.sap.com/saphelp_nw2004s/helpdata/en/b2/acc4881f6bc54c8b0c9b97dfd22d54/frameset.htm
Regs,
jaga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.