How to find IP allocated to windows OS through java code

Hi,
I want to find no of IPs allocated to windows OS through java code. How i can do this.Please give me idea.
any help will be appricated.
Thanks in advance
Ravi Adha

You can use the InetAddress class in the java.net package to find all the IP addresses of your computer.

Similar Messages

  • Need to track windows processes through java code.

    Need to track windows processes through java code.
    Eg: I want to find out whether an exe file (wrun.exe) is running or stopped.
    Can I do it through java. If so can any one please tell me how to do it. That will be a great help.
    Thanks,
    Ramesh

    There are 2 options for things like this:
    1) Use Runtime.exec() to execute some command or application and parse the input from it.
    2) Write some native code and use JNI to call it.

  • How to send data to bam data object through java code

    how to send data to bam data object through java code

    I've made a suggestion in other thread: https://forums.oracle.com/thread/2560276
    You can invoke BAM Webservices (Using Oracle BAM Web Services) or use JMS integration using Enterprise Message Sources (http://docs.oracle.com/cd/E17904_01/integration.1111/e10224/bam_ent_msg_sources.htm)
    Regards
    Luis Fernando Heckler

  • How Server can read client side SSL certificates through java code?

    My code will be running on server which will be a java class that should read any SSL certificates for the user that is logging in to the application.
    Kindly let me know how it can be achieved ? I have very rare knowldge on Security. how i can read SSL certificates of the client machine.
    Also let me know the possible solutions for above question.

    For my mud written in java, I used TCP/IP for the connections. When a client connects, he gets his own thread. Those threads are held in a vector in a manager class. each tick of the server does a quick run thru the vector and if the current thread/socket its on is null or !isAlive() its remove from the vector(which in turn removes it from getting any more game updates. This removal can be caused by two things. The clients disconnects by accident(kills his game, locks up has an internet connection hiccup, etc.) or he uses the games "quit" method. The quit method calls a method that does any player saving of data, etc then closes the socket, and sets it to null. thus the manager sees this and removes him frm the vecotr list on the next server tick. Seems to work great form a mud and worked really well in a multiplayer applet game I had up for a while.

  • Running windows command through java code

    Hello
    i want to execute jar.exe through java code , i have written following piece of code , but it isn't working
    ProcessBuilder processBuilder = new ProcessBuilder(new String[]{"cmd.exe","/c","%java_home%\\bin\\jar.exe"});
              Process process = processBuilder.start();
              BufferedReader inputReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
              String line = inputReader.readLine();
              while(line != null){
                   System.out.println(line);
                   line = inputReader.readLine();
    does anybody knows why
    Regards
    Edited by: Mayur Mitkari on Mar 5, 2013 10:19 PM
    Edited by: Mayur Mitkari on Mar 5, 2013 10:20 PM
    Edited by: Mayur Mitkari on Mar 5, 2013 10:20 PM

    sorry for that , but the
    Runtime runtime = Runtime.getRuntime();
              Process proc = runtime.exec(new String[]{"cmd.exe","/c","jar"});
              proc.waitFor();
    int i = proc.exitValue();
    this code was different from first one
    and in case of Process if runtime .exec is succesful it is wainting for long time , in this case i want if the runtime.exec is succesful something should be returned
    Regards

  • How to save the image on the web through java code?

    Suppose a picture can be loaded on the browser, and nothing
    else. If I want to use a jave code to intercept the picture
    and save it into a file, what does the code look like? I know
    the URL of the picture. Thanks.

    Hi. Running your code, I got the following, with the URL as:
    String dir = "http://california.biocars.org/viewFrames2.php?";
    String fileName = "r=840190844&fn=/data/pub/kb030129_fp_2_001.img&xsize=512&ysize=512&zoom=1&contrast=2048&xcen=0.5&ycen=0.5&wval=0&jpq=100";
    String urlName = dir+fileName;
    URL imageURL = new URL(urlName);
    So something wrong? This output does not look like anything
    of a jpeg file. Thanks.
    ==================================================
    <html>
    <head>
    <TITLE> View BioCARS Data </TITLE>
    <META name='Author' content='Keith Brister'>
    <META HTTP-EQUIV="expires" CONTENT="0">
    </head>
    <body bgcolor=#ccffff>
    <form action=/viewFrames2.php method=POST><input type=hidden name=oldZoom value=1><input type=hidden name=xcen value=0.5><input type=hidden name=ycen value=0.5>
    <input type=hidden name=theTrip value=0>
    <table>
    <tr><td valign=top><table>
    <tr><td width=128 height=128><a href="/viewFrames2.php?theState=a:7:{s:4:xcen";s:3:"0.5";s:4:"ycen";s:3:"0.5";s:4:"zoom";s:1:"1";s:13:"autoZoomLevel";i:16;s:5:"azcco";i:0;s:8:"contrast";i:2048;s:6:"wvalue";i:0;&theTXYZ="><img ismap border=0 width=128 height=128 src=imageServer2.php?r=159196106&fn=/&xsize=128&ysize=128&zoom=1&contrast=2048&xcen=0.5&ycen=0.5&wval=0&jpq=100&thumbnail=1></a></td></tr><tr><td><input type=text name=seqDir value=""></td></tr><tr><td><input type=text name=fFileName value=""></td></tr></table></td>
    <td><table border=1 cellpadding=0 cellspacing=0><tr><td width=512 height=512><a href="/viewFrames2.php?theState=a:7:{s:4:"xcen";s:3:"0.5";s:4:"ycen";s:3:"0.5";s:4:"zoom";s:1:"1";s:13:"autoZoomLevel";i:16;s:5:"azcco";i:0;s:8:"contrast";i:2048;s:6:"wvalue";i:0;}&theXYZ="><img ismap border=0 width=512 height=512 src=imageServer2.php?r=159196106&fn=/&xsize=512&ysize=512&zoom=1&contrast=2048&xcen=0.5&ycen=0.5&wval=0&jpq=100></a></td><td width=8 length=512><a href="/viewFrames2.php?theState=a:7:{s:4:"xcen";s:3:"0.5";s:4:"ycen";s:3:"0.5";s:4:"zoom";s:1:"1";s:13:"autoZoomLevel";i:16;s:5:"azcco";i:0;s:8:"contrast";i:2048;s:6:"wvalue";i:0;}&bMapVal="><img ismap alt='Set Black Value' width=8 length=512 border=0 src=pixselect.php?r=159196106&bVal=2048&wVal=0&minVal=0></a></td>
    <td width=8 length=512><a href="/viewFrames2.php?theState=a:7:{s:4:"xcen";s:3:"0.5";s:4:"ycen";s:3:"0.5";s:4:"zoom";s:1:"1";s:13:"autoZoomLevel";i:16;s:5:"azcco";i:0;s:8:"contrast";i:2048;s:6:"wvalue";i:0;}&wMapVal="><img ismap alt='Set White Value' width=8 length=512 border=0 src=pixselect.php?r=159196106&bVal=2048&wVal=0&maxVal=2048></a></td><td valign=top><table><tr><td><input type=submit name=subbieResetXYZ value='Reset Zoom and Center'></td></tr><tr><td><input type=submit name=subbieZoomIn value='Zoom In'> <input type=submit name=subbieZoomOut value='Zoom Out'></td></tr><tr><td><table border=1><tr><td align=right>Auto Zoom and Center:</td><td><input onClick='this.form.submit();' type=radio name=azcco value=0 checked></td></tr>
    <tr><td align=right>Center Only:</td><td><input onClick='this.form.submit();' type=radio name=azcco value=1 ></td></tr>
    </table></td></tr>

  • How to check any URL working or not through Java Code

    Hi,
    Is there any way by which i can check whether any particular URL is working or not using JAVA..
    Thanks in advance......
    AJ09

    Especially for POSTs, I would use HTTPClient: [http://hc.apache.org/httpclient-3.x/]
    For simple GETs, you could just create the URL and then see if openStream works.

  • How to find out the condition type of the tax code in the PO document

    Hi friends,
    My questions is how to find out the condition type of the tax code in the PO document.
    When you use me23n to display one PO document. In the invoice tab, there is one text field named 'tax code' whose value could be T1, T2, J1, J2 and so on. Beside the text field, there is one button named taxes. When you click the button taxes, it will show you the condition type of the tax code. For example, if the tax code is 'T1', then its condition type 'mwcn'.
    I want to use the information on the PO to find out the value 'mwcn' of the tax code 'T1'. Could anybody help to describe the logic?it looks like the value is saved in the table konp. But I don't know the logic. Please describe. Thank you.

    Hi,
    Hope you have asked for select query..
    select single knumh from a003 into wa_knumh
      where mwskz = wa_itpotab-mwskz
      and kappl = 'TX'
      and aland = 'IN'.
    select single kbetr from konp into wa_kbetr
      where knumh = wa_knumh.
    cheers,
    Dep

  • How to find the size of an arrayList through Expression Builder.

    Hai OTN,
    How to find the size of an arrayList through Expression. I have a managed bean in View Scope.I am using Jdeveloper 11.1.1.2 with ADF Faces components.
    Managed Bean :
    ArrayList<IllnessEmployeesObj> employeeGridList =
    new ArrayList<IllnessEmployeesObj>();
    JSPX :
    Value="#{viewScope.PandIVH.employeeGridList.size}"
    Error : java.lang.NumberFormatException: For input string: "size"

    Hi Dinil,
    I have provided you with a sample that would show you the how you can get the size of an arraylist
    the sample has a page untitled1 and a bean named test.
    I have run in on jdev 11.1.2 and it is ok, it will be ok on 11.1.3
    after running the sample you will see the 2.
    please remember that you must add the JSTL taglib on the viewcontroller.
    just right click on viewcontroller, go to tag lib select the jstl.
    page
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>untitled1</title>
    </head>
    <body>
    <h:form>
    <h:outputText value="#{fn:length(test.a)}"/>
    </h:form>
    </body>
    </html>
    </f:view>
    bean
    import java.util.ArrayList;
    public class Test {
    public Test() {
    a= new ArrayList();
    Object o=new Object();
    a.add(o);
    a.add(o);
    ArrayList a;
    public void setA(ArrayList a) {
    this.a = a;
    public ArrayList getA() {
    return a;
    I hope this sample came handy.
    regards,

  • How to find out internet explorer version ,using a java program?

    How to find out internet explorer version ,using a java program?

    Browser version from java?....you must be referring it from some web application....rite?
    You can read the User-Agent header using request.getUserAgent() or request.getHeader("User-Agent") in your jsp or servlet.
    for more details pls refer:
    http://www.jguru.com/jguru/faq/view.jsp?EID=12253

  • Opening a word file in MS Office Word software window through Java code

    I want to open a word file in MS Office Word software window through Java code.
    Is it possible ? If possible then please let me now how can I do it.
    Bhoopender

    Thanks for replying.
    I tried the following code -
    public class OpenFileWithItsExt
         public static void main(String[] args) throws java.io.IOException
              Runtime.getRuntime().exec("a.doc");
    and it gets compiled successfully, but on running outputs as -
    Exception in thread "main" java.io.IOException: CreateProcess: a.doc error=193
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:66)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:428)
    at java.lang.Runtime.exec(Runtime.java:364)
    at java.lang.Runtime.exec(Runtime.java:326)
    at OpenFileWithItsExt.main(OpenFileWithItsExt.java:5)
    My file is in the pesent working directoty.
    Please solve my problem.
    Thanks

  • How to access XI_AF_MSG table in Composite Application Framework Java Code

    Hi Experts,
    I've no knowledge about PI. In one of my projects, I need access the XI_AF_MSG table of PI through java code in a composite application.
    How do I access this table? I've searched this forum for this query but the replies say that any SQL editor can be used to access XI_AF_MSG table. But my question is; How do I get the login details of the database? In the first place, how do I access the underlying database layer of PI? Is there any JAR file which can be used to make the connection?
    It would be of great help if any expert on this can give me a detailed reply.
    Thanks a lot in advance.
    Best Regards,
    Nitin

    Hi Nitin,
    The AFW runs on the J2EE Engine, so this table is in the Java Schema of the database and thus not visible in the ABAP stack. I guess you can use any tool your database provider offers for looking at table contents (e.g. SQLPlus).
    Regarding how to access the table please contact you basis administrator they will have access to the tables as they have j2ee_admin login ids and pwds.
    Regards
    joel

  • How to upload 20MB of file into MySQL through Java

    Hi Friends
    Anyone let me know how to upload 20MB of file into MySQL through Java programming, is there is any feature available, or any changes to be made in MySQL
    Thanks
    Sella

    Don't know. Ask the MySQL folks. This is not a Java issue.

  • Getting windows services through java

    Hi,
    I just want to get the status of windows services( SERVICE_NAME: DWMRCS)
    and also i have to stop and start the services through java code is there any help?
    thanks

    Use "sc" util with Runtime.exec().

  • How do I pass an error status from my java code back to the Program Job Ser

    How do I pass an error status from my java code back to the Program Job Server?
    I have a jar program object that reports a scheduled status of "Success" even if the java code errors out.

    Exceptions thrown from the program object are ignored by the program job server.
    You need to configure the Program Object, then stream out a special string sequence to the stdout of the Program Object, to set the scheduled instance status to Failed.
    Look up SAP KBase  1201804 - How to programmatically set the status of a Program object to "Failed"
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • IMac Message not allowing preference or account changes.  These options are "greyed" out.

    How can I get Message to allow changes to preferences and/or accounts?  These are both greyed out and can't be accessed.  My Message icon show that I have messages, but the messages do not show when icon is selected.  Everything I have read says to g

  • Need assistance in SQL query (10 years since I did SQL)

    Hi Guys, I've been trying to remove some SQL rust. I haven't done SQL in a while. Here are the tables (%=int, $ = varcchar) RESULT % RESULT_ID----$ RC--------------% YEAR_ID----% PERIOD_ID--% CONTRACT_NO----%Value 20841---------------1439------------

  • Error while installing cs6 on windows 7 64 bit platform

    Exit Code: 6 Please see specific errors and warnings below for troubleshooting. For example, ERROR: DW050 ... WARNING: DF012 ... -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 3 error(s), 2 w

  • Late 2013 13 inch mackbook pro will not boot after latest upgrade

    I got push notification to say there's an upgrade available.  I upgraded from App Store and then after reboot, it waits in the rounding circle on the gray screen forever. Safemode won't boot. I reset PRAM I reset SMC But all above won't work. I boot

  • Foreign currency in BI report

    Hi Experts, I want to do reports for FI. Am trying to fetch foreign currency exchange rate in BI. I can find this in R/3 in tcode FAGL_FC_VAL. but i want to do in BI.can you please help me in tracing those for which cube or ods will serve me the purp