Using InetAddress for ip of local machine

Hi.
I'm using InetAddress to obtain the IP address of the local machine. This works fine .. however ... I am trying to simulate a loss of IP address. This is done by using ipconfig/release in DOS. According to DOS, my IP address has now been set to 0.0.0.0, however, InetAddress is still returning the old IP address. My code is as follows :
InetAddress localHost;
String localAddress;
localHost = InetAddress.getLocalHost();
localAddress = localHost.getLocalAddress();
Can anyone tell me why this is not now returning 0.0.0.0?
Thanks,
Alison Kakoschke.

I got the same problem. In my case, I want to dynamically detect the IP address of my local machine, which may allocate a new IP address by the DHCP server on the network each time when it is disconnected and then reconnected to the DHCP server. But, the following code:
String localAddress = InetAddress.getLocalHost().getHostAddress();
always return the original IP address of the local machine, rather than the new allocated address after disconnected and then reconnected.
It's emergency! who can help me?!
please please e-mail to me at: [email protected]

Similar Messages

  • Error while deploying ear using Oracle weblogic 11g in local machine

    Hi,
    Initially I installed Jdeveloper along with Weblogic and got the below error while deploying. Later I uninstalled Jdeveloper and weblogic, etc and installed a new weblogic on my local machine and tried to deploy ear. But still got the same error. With the same installable file and same ear, we could deploy successfully on my colleagues' machine. Any idea?.
    Satus: deploy Failed
    Description: [Deployer:149026]deploy application part on AdminServer.
    Begin Time: Thu Feb 03 13:45:01 EST 2011
    End Time: Thu Feb 03 13:45:11 EST 2011
    Exception: [J2EE:160149]Error while processing library references. Unresolved Webapp Library references for "ServletContext@22411886[app:part module:part path:/part spec-version:2.5]", defined in weblogic.xml [Extension-Name: jstl, Specification-Version: 1.2, exact-match: false].
    Regards,
    Rama

    and also post the section of weblogic.xml which refers to JSTL library
    some entry like <library-ref>

  • Has anyone managed to use Postgres for wiki and local db ?

    I've seen all over the internet questions and solutions for:
    could not connect to database postgres: could not connect to server: No such file or directory
              Is the server running locally and accepting
              connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
    some of the solutions kind of stop the postgessql server. That is, apparently according to this
    post by Todd  Heberlein, they stop the wiki and webpage servers but allow for your own db.
    Actually I'd like to know if it is possible to have the same postgressql instal (the OS X Server) used for both the wiki\web\etc pages and for our own local db.
    If so, how?
    Much appreciated.

    Thank you both.
    Linc, I finally understood what was going on once I read the KB page.
    There are already running two different postgress processes on the server.
    One is for the server itself and other for our use.
    Once I understood that, I could figure out what to do.
    As for you, MrHoffman, I assume the page you pointed me to your page. If so, let me know there are some things that are different in ML and I can use what I did to post it there.
    It was very helpfull.
    Thank you so much.
    Anyway, before I forget:
    One has to look  at  "/Library/Server/PostgreSQL/Config/com.apple.postgres.plist
    and check the listen_address for this file. Set it to 127.0.0.1 and everything works fine
    Here is the output I get:
    $ sudo serveradmin start postgres
    Password:
    postgres:state = "RUNNING"
    petrescu:Config deivy$ serveradmin fullstatus postgres
    postgres:dataDirHasBeenInitialized = yes
    postgres:PG_VERSION = "9.2.1"
    postgres:dataDir = "/Library/Server/PostgreSQL/Data"
    postgres:postgresIsResponding = yes
    postgres:dataDirIsDirectory = yes
    postgres:PGserverVersion = 90201
    postgres:dataDirExists = yes
    postgres:setStateVersion = 1
    Very happy! Thanks

  • Problem when applet going to load local machine jar files

    hi all,
    I have an applet that contains a 'core' module(jar) and 'core dependency' modules(jars).To reduce the applet download time i decided to load some heavy weight and lesser use 'core dependency' jars from local machine and core jar module and other low weight and highly use 'core dependency' jar modules from applet archives. I use the same class loader that used to load the applet archives for load local machine 'core dependency' modules.
    eg- this.getClass().getClassLoader().loadClass("class")
    When applet starts, Local machine 'core dependency' jar modules start loading but it couldn’t find classes in the core module (that download from archives) and stop the loading applet . But when i run that applet using IDE it is work fine. Please someone help me to solve this problem.
    Exception in thread "thread applet-com.dfn.pro.ui.UIContext-1" java.lang.NoClassDefFoundError: com/dfn/pro/plugins/dataupdate/UpdatableTable
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.dfn.pro.plugins.JarClassLoader.invokeClass(Unknown Source)
    at com.dfn.pro.plugins.PluginContext.loadPlugins(Unknown Source)
    at com.dfn.pro.plugins.PluginContext.analyzeDependancies(Unknown Source)
    at com.dfn.pro.plugins.PluginContext.<init>(Unknown Source)
    at com.dfn.pro.plugins.PluginContext.getPluginContext(Unknown Source)
    at com.dfn.pro.ui.UIContext.init(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: com.dfn.pro.plugins.dataupdate.UpdatableTable
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)

    eg- this.getClass().getClassLoader().loadClass("class")Try using Thread.currentThread().getContextClassLoader() instead of this.getClass().getClassLoader().

  • JSP getting local machine time?

    I need to create a program which the users are located in two time zone. I will hence need to use the local machine time from their PC to check against certain record in my database. I understand JSP is processed at the server end. Is JSP capable of requesting the local machine time when a user hit the page?
    otherwise, is there a way to use javascript to parse the local machine time into JSP?
    Thank you.

    create a javascript function to get the local time:
    function getLocalTime() {
    var dDay = new Date();
    var nHours = dDay.getHours();
    var nMinutes = dDay.getMinutes();
    var localTime = nHours + ":" + nMinutes;
    document.localTime.value=localTime;
    in your jsp include a hidden field to accept the local time:
    <input type=hidden name=localTime value="">
    call the getLocalTime() function onload, in this way you can get the local time of the client machine when the page is loaded, store it in a hidden field and then retrieve it in the next jsp using request.getParameter("localTime") method.

  • How do I load a JPG from the local machine into BitmapData class?

    Hi All,
    I have some code below :
    I use the linkage id of jpg's which are present in my
    library. Is there any way i can use jpg's from the local machine's
    C drive? Like BitmapData.loadBitmap("C:/xxx.jpg")??
    I need to use the pixelDissolve effect and this is done by
    the BitMap class. And I can find only linkage id reference and no
    loading from path.
    Regards
    Roshan Kolar

    you can load jpg into a target movieclip, use that target
    movieclip and the draw() method of the bitmapdata class to create a
    bitmap of the image and apply the pixeldissolve() method to that
    bitmap.

  • Use WZZIP in local machine urgent

    Hi
    We use forms 9.0.4, we try use WZZIP in local machine for send email with this zip file, we try use the webutil function, CLIENT_HOST, we put
    CLIENT_HOST('cmd /c cd C:\Archivos de programa\WinZip\WzZIP.EXE c:\TEMPORAL\MAC.ZIP c:\temp\texto1.txt');
    I don't know is possible to use setence or other similar.
    Thank

    Sorry, i write bad, the correct is
    We use forms 9.0.4, we try use WZZIP in local machine for send email with this zip file, we try use the webutil function, CLIENT_HOST, we put
    CLIENT_HOST('cmd /c C:\Archivos de programa\WinZip\WzZIP.EXE c:\TEMPORAL\MAC.ZIP c:\temp\texto1.txt');
    I don't know is possible to use setence or other similar.
    Thank

  • 11.5.10 Step by Step - Run istore from local machine for customization

    Hello,
    Does anyone have step by step instructions on using JDeveloper to run iStore JSPs on local machine with the end goal to customize JSPs? We have 11.5.10. I am using JDeveloper 9.0.3.5. Have tried following steps per lot of metalink notes but none seem to be working. Need to know exactly:
    - what Jdeveloper version to use for 11.5.10?
    - Where to download this version from?
    - Is it even possible to run iStore from local Windows machine using JDeveloper?
    - What is the main iStore page that should be run the 1st time?
    - Any expert available in USA for a 2 week paid assignment to help our team setup Jdeveloper for customization? And give intro lessons?
    Much Help...
    Thanks

    1. The Jdeveloper you use with 11.5.10 will depend on which ATG patch level you are at (see metalink note 416708.1)
    2. It will be in a metalink patch (see metalink note 4167708.1)
    3. I don't believe you can run it locally on a windows machine.
    4. Can't remember it off the top of my head but I will look back in my notes, I'm no longer working at the client site who has iStore.
    5. I know of 3 or 4 experts that I have worked with in Canada on JDeveloper/iStore/Configurator, I don't know anyone in the US but there has got to be a bunch out there looking for work.
    Edited by: mcharchu on Jul 17, 2009 9:20 PM

  • Use Graphics on Local Machine in Safari

    I'm pretty new in using Mac / Safari, so i searched the discussions here but couldn't find what i was looking for.
    I'm trying to use graphic files that are stored on my local machine/ local hard drive to be displayed on an online game website. Purpose: to reduce traffic, to speed up the data transfer and to use custom made graphics.
    Is there a chance that Safari supports my "desire"? What would the path look like? Using windows i simply put the drive letter and the path in to direct IE towards the locally stored graphics.
    Any help would be greatly appreciated!
    Thanks in advance.

    Yes, that's correct. I want to display a website, some web content but replace some of the graphics i would have to load from the server every time with files i have on my hard drive.
    the website (online browser game) supports this feature but i don't know how to tell safari (or maybe firefox) on my mac where to look for the files.
    as described above usually i would type something like d:/documents/graphics/ and the browser would know that it is supposed to load the files from the disk, not from the server.
    i guess what i also have to verify is that the game supports the safari browser.
    thanks for your help!

  • Local machine using - expecting remote machine

    Any advice on this one? I did modify the security / firewall to except IChat
    2009-01-04 19:42:44 -0600: No data has been received for the last 10 seconds.
    Audio channel info: local machine using 10.0.1.200:16402, expecting remote machine to send to 68.179.174.46:41078
    Video channel info: local machine using 10.0.1.200:16402, expecting remote machine to send to 68.179.174.46:41078

    Ok,
    Most Cable Modems do not router.
    It means that they pass the Public IP to the Router (Or any computer that might be directly connected if you only have one).
    This also means it is not doing DHCP (so no two lots of DHCP in this case most likely)
    Telling us the Make and Model of the modem will help to confirm this.
    Alternatively you can check if it is in this List (Very new models tend not to be included yet. They work on people sending in info, so not all devices are listed either.)
    Also tell us which version and what firmware the Base Station is Running.
    The set up pages for this can be accessed with Airport Utility in the Applications/Utilities folder.
    This presents you with a list of the Airport Devices it can find in a list on the left.
    Click on yours.
    Click on the Internet icon.
    This pane is essentially in two parts.
    The top is how you are getting connected to the Internet.
    It normally tells you the IP you are getting.
    If it is the same as when you go here the modem is not routing.
    At the Bottom is whether the Base Station is set to DHCP (Share an IP) to the computers (LAN).
    Tell us what you find out.
    If it is a Public IP you see quote it as 90.66.xxx.xxx (Or put some xxx's in somewhere).
    Pic of Internet Pane with Public IP
    Older firmware and Base Stations have slightly different Access methods where you get a little Pop Up window to log on by IP first.
    (I don't have Pics of that at the moment)
    8:04 PM Monday; January 12, 2009

  • Ifs Connection problem from local machine to Ifs server using API

    I am trying to make an API call to connect to Ifs database server running on different machine(UNIX) from local machine. I copied all jar files and /Lib/Ifs/Settings directory to my local machine. All these files are in the classpath of weblogic 6.0 environment. A jsp on weblogic server call a bean which has a responsibibility of connecting to Ifs server to get LibrarySession.
    From Visual Cafe 4.5 everything works fine but when i start weblogic 6.0 outside the visual cafe environment i get the error
    below. I included all the jar files and /Lib/Ifs/Settings in start up script of weblogic server
    Do you know if i missing some thing????
    java.lang.UnsatisfiedLinkError: do_open
    at oracle.jdbc.oci8.OCIDBAccess.do_open(Native Method)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
    at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:198)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at oracle.ifs.server.LibraryConnection.(LibraryConnection.java:235
    at oracle.ifs.server.ConnectionPool.createLibraryConnection(ConnectionPo
    ol.java:576)
    at oracle.ifs.server.ConnectionPool.(ConnectionPool.java:321)
    at oracle.ifs.server.S_LibraryService.(S_LibraryService.java:912)
    at oracle.ifs.server.S_LibraryService.startService(S_LibraryService.java
    :1129)
    at oracle.ifs.beans.LibraryService.connectLocal(LibraryService.java:408)
    at oracle.ifs.beans.LibraryService.connect(LibraryService.java:280)

    Have you installed the Oracle client software on the machine where you are running WebLogic and your custom iFS application (your bean)?
    It looks like the native JDBC libraries are not available to the JVM where WebLogic is executing your code. iFS uses JDBC to access the Oracle database, and it requires "thick" (OCI8) JDBC to do so. This means that you need Oracle client software to be installed (in an ORACLE_HOME directory) on a computer where you want to use the iFS API.
    If you do have the Oracle client software installed already, then perhaps the WebLogic environment isn't configured to have access to the native JDBC libraries. Normally, as long as $ORACLE_HOME/lib is in the LD_LIBRARY_PATH (on unix) or $ORACLE_HOME/bin is in the PATH (on windows), stuff should just work.
    See if you can find any information about including native libraries (for instance, to use JNI) in the WebLogic documentation. We don't certify with WebLogic, which is why I don't know the answer offhand.

  • Accounts used by application pools or service identities are in the local machine Administrators group.

    I am getting the Warning: "Accounts used by application pools or service identities are in the local machine Administrators
    group."
    Using highly-privileged accounts as application pool or as service identities poses a security risk to the farm, and could allow
    malicious code to execute.  The following services are currently running as accounts in the machine Administrators group: SPUserCodeV4(Windows Service) 
    OSearch14(Windows Service) 
    SPSearch4(Windows Service) 
    WebAnalyticsService(Windows Service) 
    I understand that the users running these Windows Services must not
    be a local administrator of the server. The user I have assigned for the aforementioned Windows Services are in the following Groups in the SharePoint Server:
    IIS_IUSRS
    Performance Monitor Users
    WSS_ADMIN_WPG
    WSS_RESTRICTED_WPG_V4
    WSS_WPG
    Which group must I remove the user from?

    Since I used the same account for all; I am getting the following error message:
    The server farm account should not be used for other services.
     the account used for the SharePoint timer service and the central administration site, is highly privileged and should not
    be used for any other services on any machines in the server farm.  The following services were found to use this account: SharePoint - 80 (Application Pool) 
    SPUserCodeV4(Windows Service) 
    OSearch14(Windows Service) 
    SPSearch4(Windows Service) 
    Web Analytics Data Processing Service(Windows Service) 
    Should I use another non administrator account for farm Administrator?

  • Local machine's taskbar stays in focus after using saved connection settings

    I'm not sure if this is the right place to ask as I have only seen this happen on thin clients we use running Windows Embedded Standard 2009. I cannot reproduce the issue on Windows 7 and do not have any XP machines to hand at the moment (having recently
    killed them all off).
    This is a minor issue but does confuse and annoy some users when they attempt to use these terminals. Basically we have them set up with a saved RDP shortcut that points to our terminal server. When they open this it will connect to the server in full-screen
    as intended, however the taskbar of the local machine remains visible and in focus, and anything the user types will not go in the Username field on the remote server. A single click is all that is required to be able to start entering credentials, however
    you would understand not all users immediately notice and it is quite annoying.
    Any ideas why this happens and how to fix it? It only happens when you use a saved .rdp file and does not happen if you were to open Remote Desktop Connection click Connect.

    H,
    Based on my experience, it seems to be a Windows Embedded Standard 2009 side issue. Therefore, I would like to suggest you post the question in Windows Embedded Standard forums
    for help.
    http://social.msdn.microsoft.com/Forums/en-US/home?category=embeddedwindows
    Thanks.
    Jeremy Wu
    TechNet Community Support

  • HT201250 I had files stored on a hard drive that were not on my Mac. I used the hard drive for my first Time Machine back up, but it was not enough hard drive space to finish. Now those stored files are gone. Is there any way I can recover them?

    I had files stored on a hard drive that were not on my Mac. I used the hard drive for my first Time Machine back up, but it was not enough hard drive space to finish. Now those stored files are gone. Is there any way I can recover them?  No, they were not part of previous Time Machine backups, and I have checked both the hard drive the documents were lost on and the new one that I now use for backups. Any suggestions would be helpful, as the lost files are old pictures that are gone forever. :[ Thanks!

    1. Yes, if both drives are formatted as Mac OS Extended (Journaled).
    2. Reformat the drives if needed, open the Time Machine pane of System Preferences, and remove the drive with the pictures from the list of items set to be excluded.
    (110331)

  • I have a 1TB external hard drive (NTFS) that has all my files from my old PC, how do I create a partition on it for HFS  without formatting it so that I can use it for Time Machine and the like?

    I have a 1TB external hard drive (NTFS) that has all my files from my old PC, how do I create a partition on it for HFS  without formatting it so that I can use it for Time Machine and the like?

    There aren't any 3rd party apps or anything. I use PC's and Mac's at school and the only computer connected to a printer at my house is a PC so i need access to both

Maybe you are looking for

  • TDS on Advance payment

    TDS deducted on advance get reversed when we clear advance with invoive. but how the system should work in case there is a change in the rates of tds deducted between the two. For example, Advance made in march for Rs 10000, tds deducted @ 10 % 1000.

  • Issue in PCo 2.1

    Hello Experts, We are facing an issue with SAP PCo while working in SAP MII 12.2.We are not able to start a particular agent instance.First we are stopping the agent instance and then when we are trying to start the same it is taking a huge time and

  • How to make installer file for windows?

    Hi, I want to make a installer file for auto installing the ssl certificate. My folder contains following files: 1. importpfx.exe 2. Main.java 3. Main.class 4. TestCertificate.p12 I want to bundle above files into a single setup file.How should it be

  • Pre Invite Response

    I submitted this in another thread in response to a Palm administrator asking if there are still any issues out there with the meeting invite responses from a pre as they were supposed to be fixed.   http://forums.palm.com/palm/board/crawl_message?bo

  • I need help recreating this

    I would like to create something like this. I have tried myself and just got frustrated.  I made a custom shape and copied it and changed color, shape, direction and size. I made a symbol out of it and mapped it on a sphere shape but it just came out