How to Access the Systems ipaddress in a java program

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....

Similar Messages

  • Bought a mac for my sons bday present of eBay :( it starts up in osx utilities screen, iv never seen the actual desktop(launch pad) I dnt know how to access the systemI know the basics for start up but says to delete files so I can dwnload the software?

    AS above states the computer seems to run normally as far as turning it on, tabs & pages are fine. But I can't access the system to delete some files.. Which is what the 'error' keeps saying everytime I tr and download a helpful link/app or software.. The instal disc that seems to be stored on the comp says its mountain lion 10.8 install disk 'read only' & this is the only disc it gives me to select to startup.. I have the full software on USB as its very large.. So .. PLEASE TELL ME finally, 
    HOW to ... Access comp files to delete required memory for software install?? If this is the best option..
    HOW to ... Erase everything on computer & install 10.8 via USB?
    And when or what enables me to see and use this computer correctly..ie, launch pad? Etc..
    PLease reply back in 'normal terms' as I'm already exceeding my boundaries of imac knowledge

    First: no, you cannot use someone else's install DVD unless it is a retail version; all others are machine specific. It will not work and would be illegal.
    Is this what you bought?
    http://www.everymac.com/systems/apple/imac/specs/imac_cd_2.0_20.html
    IF that is correct, then you are not on 10.8 because the highest OS it can go to would be 10.6
    So, you'd either need the original install disks (preferred) or buy a retail Snow Leopard (10.6) - that is as high as you can go with that machine. And, your maximum RAM is 2 GB, so you couldn't go higher with the OS because of that either because it would not run well on 2 GB.
    If you do get 10.6, then I'd suggest increasing the RAM to the max. of 2 GB.
    If this is not the machine you got (maybe the seller just used any old box), then I'd suggest taking it to an Apple store/Genius Bar to have them sort out how to get out of this mess.

  • How to access the System's Printer

    Hi,
    How to access the printer using java. Can any one give me a sample.
    Thanks in advance,
    Maheshwaran Devaraj

    http://java.sun.com/docs/books/tutorial/2d/printing/index.html

  • How to access database file on CDROM from Java Programe??

    Hello friends,
    I am making online exam application.
    I want my question database to be reside on CDROM.
    but i am not getting any idea how to make DSN or static path that resolute the path that i have mentioned for CDROM.
    basically i want to know how to access CDROM from Java Programe????
    Thanks in advance
    Navik Pathak

    Once you mounted the CDROM (something maybe as /media/cdrom) as a file system (or assigned a drive letter to it like D: or F: or whatever), the files are accessible normally.

  • How can I pass system commands from a java program? Urgent!

    hi,
    I have been trying this out since a long time. How do I send system commands to command.com or cmd.exe from a java program and an output of the executed command back to the java application.
    If u have any idea, or have any information about the kind os application reply back.
    Thanks
    Deepa Datar

    This is the code which I tried, but it displays only the title of MS-DOS, something like " Microsoft Corp...etc ". But doesn't take any input, and the subprocess(cmd.exe) hangs.
    import java.io.*;
    public class cmddemo2
    public static void main(String arg[])
    try
    System.out.println("cmd");
    Process p=Runtime.getRuntime().exec("cmd.exe");
    DataInputStream din=new DataInputStream(p.getInputStream());
    DataOutputStream dout=new DataOutputStream(p.getOutputStream());
    System.out.println("after streams");
    String s;
    dout.writeChars("type cmddemo2.java");
    while((s=din.readLine())!="\n")
    System.out.println(s);
    dout.writeChars("dir");
    String s1;
    while((s1=din.readLine())!="\n")
    System.out.println(s1);
    System.out.println("over");
    catch(Exception e)
    { System.out.println("Exception : "+e);

  • How to get the process id of a java program

    Hi,
    I know this has been discussed before. But I could not find an answer. So, I'm putting it again.
    How can I find out the PID of an application (I know the name of the application) on any OS?
    Regards.

    1) Use JNI ( http://www.esus.com/docs/GetQuestionPage.jsp?uid=1766 )
    Something like
    JNIEXPORT jint JNICALL Java_Pid_getPid(JNIEnv *env, jobject object) {
    return (int) GetCurrentProcessId();
    2) In JDK 1.5, you can use the java.lang.management API, at least on Windows, to find out the process ID.
    http://www.esus.com/docs/GetQuestionPage.jsp?uid=1796
    http://www.esus.com/docs/GetQuestionPage.jsp?uid=1766

  • How do you get permission for FlexLm/HASP to access the system clock?

    I've got animation software that accesses the system clock to verify a security dongle. It works fine under 10.4.3, but I recently got a dual processor G5 with 10.4.5 on it. According to the s/w tech people, the dongle mgmt s/w doesn't have permission to access the system clock because of new security fixes. Anybody have any idea how I can open permissions to the system clock so I can get back to work?
    Thanks for any help you can offer...
    Brian

    Moving this discussion to the Using Flash Builder forum. 
    I believe the software though is working as designed.  From previous discussions I have seen the Design view was removed in Flash Builder 4.7.  The users in this forum may be able to provide additional information around this.

  • How to access the pre-delivered XI Integration Content for APO ,SCM or CRM

    Guys,
    Do anyone know how to access the pre-delivered XI Integration Content for APO ,SCM or CRM and load onto the XI server.
    Any inputs in this direction is appreciated.
    Thanks, -Vara.

    Hi VaraPrasad,
    you can try:
    1. https://websmp204.sap-ag.de/swdc
    2. Search for all Categories
    3. type: XI content
    then unpack and the easiest way is to import with the file system:
    http://help.sap.com/saphelp_nw04/helpdata/en/a8/5e56006c17e748a68bb3843ed5aab8/content.htm
    and you have the content on your XI
    Regards,
    michal

  • How to access the *.java file corresponding to a TypeElement T?

    Here is a problem:
    How to access the *.java file corresponding to a TypeElement T from a AnnotationProcessor environment?
    Let us say the hook method
    public boolean process(Set<? extends TypeElement> annos, RoundEnvironment roundEnv)
    is invoked with a TypeElement T such that T.getQualifiedname() = "a.b.c.X"
    And the problem is how to locate the file that has the *.java source code for a.b.c.X?
    That is the file that has the source code for a.b.c.X say "some/path/a/b/c/X.java"?
    For simplicity, let us assume that TypeElement T corresponds to a top-level Java class.

    Pinaki wrote:
    That is not something you as the annotation processor author should be asking about. That is something you the person configuring the javac environment should set up via the -d option or its equivalent.
    I strongly recommend using a separate output directory hierarchy.That is the way the current implementation is. The annotation processor takes a -Aout= <some directory path> to write generated output relative to a user-specified location (which defaults to the class output location).That is contrary to the design of the annotation processing facility. The intended use is for that information to be configured via options like "javac -d".
    Additionally, IMO it is a serious configuration error to put generated files and input files, presumably tracked under version control, in the same directory. Interesting you said that. We are just running some "field trial" with these things and some users want them to be in the same directory of the original *.java files (especially when their source files are spread across many roots) .
    Who knows what the user wants?The user does and the user is free to (mis)configure their environment however they like ;-) However, that is the user's option and the user has control of this via the javac command line. The annotation processor is not the proper place to configure this setting; see slide 7 of http://blogs.sun.com/darcy/resource/J1_2006-BOF-0606.pdf for some thoughts on different roles in annotation processing.
    presumably tracked under version control, in the same directory.version control is another 'usability issues' that we are trying to get our heads around with this stuff. "To check-in or not?" - that seems to be the question. When presented these facilities without any cue, "the users" were divided -- some wanted them to be checked-in, some did not. The context where these generated files being used -- there exists some rationale to check them in a version control system.The right answer depends on the circumstances, but IMO generally generated files should not be checked in under version control, especially if they are derived from other source files. Checking in generated files of this nature just creates the opportunity for them to get out of date with the originating files.

  • How to  access the ORACLE APPS table structures from SAP

    Hi Experts,
        How to  access the ORACLE APPS table structures from SAP? Is it possible from SAP?
    Thanks in advance
    Thomas

    Hi Silviya,
    you can access this database using a technique called DB Multiconnect - sometimes written as multi-connect.
    Search the SAP documentation and notes for this term and you will find how to do it.
    Essentially you configure the remote database connection via transaction DBCON.
    If your SAP system is not running on Oracle you will need to install the db-specific kernel files for Oracle along with the Oracel db client software - SQL*Net.
    Then you can access the Oracle database from ABAP using native-SQL. It works a treat!
    Cheers
    Graham Robbo

  • How to access the SAP Server Console? Through VPN

    How to access the SAP Server Console? Through VPN
    Sudhakar

    Hi,
    You need to contact your system admin as they will enable the port in ur system so that u can access client servers.It should also be allowed from client side also i mean access.
    You will connect thru weblink with user name and pw and SAP with logon details.
    Thanks
    Suresh

  • How to access the sql database in applet?

    How to access the sql database in applet?
    Please help me.

    import java.applet.*;
    import java.awl.*;
    import java.sql.*;
    //other packages
    public class jdb extends Applet
    Connection con;
    Statement stmt;
    String name="drvijay";
    String phoneno="9842088860";
    public void init(){}
    pubilc void stop(){}
    public void destroy(){}
    public void start()
    call();
    public void call()
    try{
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              conn=DriverManager.getConnection("Jdbc:Odbc:emp","sa","");
              stmt=conn.createStatement();
              stmt.executeUpdate("insert into empdetails(name,phoneno) values ('"+name + "',''"+ phoneno +"' )" );
              }catch(SQLException e)
                   System.out.println("error"+e);
                   System.exit(0);
    //<applet code="jdb" height="200" width="200"> </applet>
    u this jdbc statement in any of the method..
    */

  • How to get the system time in a Swing application ?

    I know how to do it in JavaScript, but not java. Please help me, and also how to get the system time in an Applet. Thanks !!!

    Check this link, I hope it helps
    http://202.71.136.142:8080/globalleafs/Swing/View.jsp?slno=22&tbl=0

  • In VB Programming code -- How to access the formula for suppressing a field

    In VB Programming code -- How to access the formula for suppressing a field
    I am using Crystal Reports 2008 v1
    Using VB code, I am attempting to modify a Crystal Report before exporting it into a PDF format and then displaying it on the Web.
    My problem is that I am unable to access the formula used to dynamically suppress a field.
    The following code is working:
    mySections = rd.ReportDefinition.Sections
    For Each mySection As CrystalDecisions.CrystalReports.Engine.Section In mySections
       ' myFieldToChange is a String set to the text of the field I need to adjust the Suppression
       iloop = 0
       For Each RecObj As CrystalDecisions.CrystalReports.Engine.ReportObject In mySection.ReportObjects
               If mySection.ReportObjects.Item(iloop).Name.ToLower = myFieldToChange Then
                   myTextObject = CType(mySection.ReportObjects.Item(iloop), CrystalDecisions.CrystalReports.Engine.TextObject)
                   myTextObject.Text = "new field text goes here"
                   mySection.SectionFormat.EnableSuppress = True
                   '  Here is where I want to change the formula for the Suppression
                End if
                iloop = iloop + 1
        Next
    Next
    I can not find any reference to the actual suppression formula in the SDK help file.
    Note, the EnableSuppress can be set to True for False, but if there is a formula for dynamic suppression, the True or False value is overwritten.  The results of the formula determine the suppression.
    Is there a way to reference this formula.  I know that I can put on in using the Crystal Report Designer software, I need to modify this formula using VB code and the SDK.

    Hello, Mark;
    If you are using the ReportDocument object you do not have access to the Conditional Suppression formula. You can get around it by using a formula field in the report for the supression and then using the FormulaField code to change it at runtime.
    If you want to change the supression condition directly at runtime you need to use RAS and the ReportClientDocument.
    Elaine

  • How to access the photos on icloud

    hi
    how to access the photos which i saved in i cloud, from my iPhone 5,
    Note: i do not use any PC. and i only have purchased 20 GB of space on an annual sub. so as to save my photos, and create space in my phone and now i am unable to access it,
    please advise
    thanks
    xxv

    There isn't really a way to "save" photos to iCloud currently with non-beta software.
    iCloud is involved with photos in 2 ways -- backup and Photo Stream.
    Backup of an iOS device includes Camera Roll photos but they cannot be viewed at iCloud.com -- the backup can only be used when doing a restore of an iOS device.
    Photo Stream photos also cannot be viewed at iCloud.com; Photo Stream is designed as a method of transferring photos from one device to another and is not designed to store the photos. More info http://support.apple.com/kb/HT4486
    There is a new feature -- "iCloud Photo Library" -- coming sometime after the iOS 8 release next week: http://www.macrumors.com/2014/09/12/apple-demotes-icloud-photo-library-beta/

Maybe you are looking for

  • IPad for Drawing or Storyboarding. Possible?

    I have seen this amazing device and its come into my mind that this could be very helpful for designer, specially if any software for story boarding will be great. I am waiting for the best model to come into market (64GB + WiFi etc... ). I am thinki

  • IPad 1 internet connection issues for months--connects to modem fine

    Was hoping the 4.3 upgrade would solve my issue, but it hasn't. I've had issues with my iPad for the past few months. It connects to my wireless network and works for some time (say a day or two) and then it suddenly cannot connect to the internet. T

  • Is there a way to update my first Gen ipod to 3.1.3 software?

    Ok I got a ipod gen 1, my current firmware or i guess software is 1.1.5 and I was wondering how to update the software to 3.1.3. Or if there isn't a way to do that what is the lastest I can update my software too? I just really need the app store and

  • Lumia 630 and treasure tag problem

    Hello, I justa purchased a tresure tag WS-2 and connected it to my Nokia Lumia 630. Bluetooth on my phone is on. I can setup the tag (i.e. name it). Software seams not to work properly. When i get away from the tag, the tag makes the sound, but my ph

  • What software to read Mac Os x  external Hard Drive on a XP Coputer

    Hi, I would like to know what program on windows XP can read MAC OS X format. I had a program like 2 month ago and I forgot the name. I don't want to format the drive to Fat32. Thanks