Is there is a way to know my DNS in java?

hello there
i wonder if there is a way to know my DNS and therefore the internet host company?

hello there
i wonder if there is a way to know my DNS and
therefore the internet host company?Not that I know of. You can still get the ISP in a round about ugly, brittle fashion. On Windows XP you can do this:
import java.io.IOException;
import java.io.InputStream;
public class PSOutput {
     public static void main(String[] args) {
          try {
             String command = "cmd /c ipconfig";
             Process child = Runtime.getRuntime().exec(command);
             InputStream in = child.getInputStream();
             int c;
             StringBuilder sb = new StringBuilder();
             while ((c = in.read()) != -1) {
                 sb.append((char)c);
             in.close();
             printISP(sb.toString());
         } catch (IOException e) {
              e.printStackTrace();
     static void printISP(String output){
          String startPattern = ". : ";
          String endPattern = "\r\r\n";
          int beginIdx = output.indexOf(startPattern)+ startPattern.length();
          int endIdx = output.indexOf(endPattern, beginIdx);
          System.out.println(output.substring(beginIdx,endIdx));
}As you can see it is ugly and is not really a reliable process, not sure that there is another way though.

Similar Messages

  • Bookmarks - Hate the firefox version. Double click on the site to bookmark and the book it too small. And when in the bookmark window on the right side of the screen there is no way to know which folder you are actually in. Help.

    Bookmarks - Hate the firefox version. Double click on star in the address window to bookmark the site and the pop-up window is too small and user unfriendly. And when in the bookmark window and have bookmarks on the right side of the screen there is no way to know which folder on the left you are actually in. Is there any way to upgrade the bookmarks feature. So frustrating I might actually go back to IE because of this. Thanks.

    I have sort of the exact same problem. Extremely far away from user friendly
    I have an second issue as well: When I hook off all-day it comes up with an 8 hour event!
    And then if I put in a late start hour it pushes end time to next day due to the 8 hour event suggestion.
    All in all this gives a lot of changes just to enter an event.
    Command N
    I learnt from your input to use this fuction. At least that comes up with a one hour event as default.

  • Is there an easy way to know which app(s) are causing spike in Data Usage?

    I have an iphone 4, but son and daughter have iphone 5s and my wife a lumina.  We all spiked in data usage last month, how do we determine what caused this?  Was it Facebook or Pandora?  Some other app? There must be an easy way to find out. Please advise.  Thanks!

        GV2,
    I'm glad Mrhelper was able to shed some light on this for you! In iPhones, the amount of data you're seeing under each app is for the "Current Period." Just above that list you'll see info about the Current Period and Current Period Roaming. This is just an overall snapshot of total data usage for that period of time. The Current Period does not reset on its own, so it will be counting everything from the last time you reset it through now. You can reset it by scrolling to the bottom and tapping on "Reset Statistics."
    So, for example, if you reset your statistics 3 days ago and then there's 1GB used under App Store you'll know that over the last 3 days 1 GB of data has been used for the App Store.
    SarahO_VZW
    Follow us on Twitter @VZWSupport

  • Is there an easy way to know if a vi within a LLB not being use by a Labview Application

    To All,
    I have developed a Labview application over a year that contains a number of LLBs.  There are significant number of VIs within those LLB files that were written but have not been called  by the application.  I am trying to optimize all LLB files to exclude those unused VIs.  Because there are many of them, the task to find out which Vi is being used and which one is not become very tedious.  First question: Is there a way to automate the process?  Second question: Does a compiled Labview application include all used and unused Vis from the LLBs in the .exe file?  I am very appreciate any inputs from this community.
    A Labview User  

    Ben wrote:
    In pre-LV 8 you could do a "Save with options..." and choose development distribution, single prompt preserve hiarchy and LV will pick-up all of the used VI's and plomp them down in a new location leaving all of the used behind as well as fixing up a of the linkages to point at the new location.
    In LV 8 and beyond you can create a Source Distribution in the project and acoomplish the same thing.
    In LabVIEW 8+, you can get something similar to the first option by selecting "save for previous" and then pick the existing version (yes, it's there!).
    LabVIEW Champion . Do more with less code and in less time .

  • Many sites show a grey box requesting a plugin but there is no way to know which plugin to install.

    On a new install of Firefox (new laptop) i have many sites that show a grey box saying that a plugin is required to display the content. Clicking on the box does nothing so I don't know what is required.
    Previous versions of Firefox told you what was needed and assisted in fixing the problem. (as far as I remember) IE and Chrome work fine on these sites.
    one site is: http://www.allboat.co.nz/

    The ALL BOAT site uses Flash, and since that is one of the web's most popular formats, I suspect many of the missing plugins are Flash.
    There is a different Flash control for each browser. To get the one for Firefox, try loading the following page from Firefox:
    http://get.adobe.com/flashplayer/
    Before downloading, make sure the uncheck any unwanted extras.
    Does that help?

  • There's any way of knowing what Support Package we had implemented?

    Hi!
    I need to know if exists a kind of "history" of the system. I mean, a trx that shows you when you implemented X support package and when.
    My problem is that I need to implement some oss notes to a z program that is a copy of an standard. The z program was created (copied) some years ago.
    I need to know the Support Package that we had at that time because I need to check if the prerequisites applies to the Z version.
    I you don't understand what I need, please tell me...
    Thanks in advance!
    Bet

    If you got the <b>SNOTE</b> transaction, you don't need to care about support packages -;)
    Just pass the OSS note and the system is going to tell you if it can be implemented -:D
    Greetings,
    Blag.

  • Is there a easy way to draw animation image in java(like .gif)

    hi there,
    someone told me to create thread for each animation , but it would be real pain and time comsuming is there some method to do such this work?, thank you you all

    A single timer or thread works okay for animating multiple images and/or graphics. Use multiple timers if the delay interval is different among the animated objects. Or, if you must have individual threads for each object, build the thread/timer into the object so all you have to do is to tell the object to go and stop.
    Single thread usually works well.

  • Is there any way to know when an app is going to be discontinued?

    I purchased an app around eight months ago for $13. I forgot about it until I was reloading apps onto my new IPad. When I went to find it, it was no longer in the app store at all. I contacted the support people who told me that since it was "so long ago" there was no recourse.  So does that mean that any time you purchase an app it could disappear at any moment? Is there any way to know in advance that this will happen?  Never mind that it stinks to spend that amount of money and then have nothing to look back at.
    Additionally, I have had trouble reloading apps that I have paid for as an "in app purchase".  What is the deal with that?  Is that information not stored like buying an app outright?
    Thanks
    DTC

    Apple constantly reminds folks to backup their content. Apple warns folks all of the times that content may not always be available in the iTunes or Mac App Stores and most folks ignore the warnings or cannot be bothered to read them. No, unless the developer warns you that they are with drawing an app from one of the stores, there is no way to know in advance that an app may no longer be available.
    http://support.apple.com/kb/ht4009

  • Is there a way to know if someone downloaded from your Cloud?

    Hello,
    I was wondering if there was a way to know if someone downloaded from your Cloud?
    Thanks.

    Thanks. Sorry what I meant is if there is a way for me to know if someone downloaded I file link that I sent them.
    Sometimes I send people links and I would like to know if they downloaded the file.
    Phil

  • Is there a way to know how many rows were rejected using external tables?

    Hi,
    I'm developing a package that needs to load different kinds of text files into the DB.
    I was wondering whether there's a way of knowing in SQL or PL/SQL how many rows were rejected if my external table is defined with "reject limit unlimited".
    I'm using the external tables in "insert into ... (select ... from external_table where...)"
    sql%rowcount returns the number of inserted rows
    I was hoping for something similar/easy to get the number of rejected rows as well.
    I know I can try to analyze the bad file for the number of records if there's no other way...
    Thanks in advance.

    Pyrocks wrote:
    I was afraid of this answer...
    this is a certain "no there's no other way" or should i wait for other responses (no disrespect - just want to make sure :) )Well the difference would be that this external table will have no complex logic. You would simple read in all the lines from the bad file. The chances that this is broken are therefore very slim compared with your original external table.
    And tehre are many other ways possible. For example you can first copy the file into a real internal (temp) table without using any processing logic but with using an external table. Then do the processing / logic checking of the data and move the data from this temp table into your final data structure. Since you move the data two times the whole process will be slower then the original version.

  • If I have say 200 photos in an EVENT and I use 50 of them in an ALBUM and months later I'm happy with the ALBUM and want to trash the 150 extras in part to save space on the hard drive, is there an easy way to find which photos to delete?

    If I have, say 200 photos in an EVENT and I use 50 of them in an ALBUM, and months later I'm happy with the ALBUM and want to trash the extra 150 photos, is there an easy way to know which 150 photos to trash? My idea is to not have hundreds of photos taking up space on the hard drive.
    Thanks.

    Various ways:
    Easy one: Flag the ones you want to keep (do this in the Album - Select All and Flag)
    Then:
    File -> New Smart Album
    Event -> contains -> Name of the Event
    Photo -> Is Not -> Flagged
    will find the unwanted 150.
    Regards
    TD

  • VARIABLE TYPE - a way to know it

    Hi,
    I've been wondering for a big while if there is any way to know the type of an existing variable.
    To explain it, here is an example of how I would like to use it:
    var myVar:Boolean = true;
    trace(SomeFunctionReturningTypeOfVar(myVar));     // "Boolean"
    Of course, we can do a simple function that wil have like ten if clauses checking "if(myVar is String) ... else if(myVar is Boolean) ..." etc, but this is way too clumsy a solution...
    Any ideas?
    Bests!

    Check out this code here:
    http://forums.adobe.com/message/2017444#2017444

  • SAPehp tool does not know the host for Java stack

    I  am running SAPehp tool to apply enhp2 to a dual stack with
    ABAP and JAVA on seperated Windows boxes.
    I started SAPehp at the ABAP box.
    Because there is no way to tell where is the Java host, how do I apply
    the enhp2 to the Java side? How to make ABAP and Java in sync?
    Please help.
    Thanks!

    Hi Christy,
    I consider that both of your ABAP and Java system has separate database. If this is the case then you have to upgrade both system separately and run EHPI installer on both system. You can upgrade the system in same way as you are doing for your ABAP system only difference is the support packages and rest of the main things are same.
    I will recommend you to study upgrade guides for ABAP and Java system.
    If your ABAP and Java system has different SID but share same database (i.e. MCOD system) then run EHPI installer for upgrade once a time. It means that when you will upgrade the ABAP stack then don't run EHPI tool to upgrade Java stack at same time. Once ABAP system upgrade finished then upgrade Java system. And vice-versa.
    Thanks
    Sunny

  • Centralized way of catching unexpected Exceptions in Java?

    Hi Guys,
    Is there a centralized way to catch unexpected Exceptions in Java?
    Here's an example:
    public static void main(String[] args)
        try
          new Thread()
         public void run()
           String s = null;
              //NullPointerException is thrown here
           s.indexOf(12);
          }.start();
        catch (Exception ex)
          System.err.println("This is not called");
          ex.printStackTrace();
      }Think about a program error, that the program is not prepared for, i.e. NullPointerException or an ArrayIndexOutOfBounds exception.
    What I'm after is not like "put critical block in try-catch", but something like registering a global ExceptionListener in java.lang.Runtime, a monitoring MBean or something that I could use in my program to do a simple exception logging.
    Any idea, help would be greatly appreciated!
    peter

    NullPointerException , IOException ....all are subclasses of the base class Exception, so catch(Exception) will catch any exception in the current thread. So modify ur code a bit
    public static void main(String[] args)
          new Thread()
         public void run()
           try{
           String s = null;
              //NullPointerException is thrown here
           s.indexOf(12);
    catch (Exception ex)
          System.err.println("This is not called");
          ex.printStackTrace();
          }.start();
    .....

  • Hi, I got an Error 23 when trying to restore my phone. Apple support centre says its a hardware issue without doing anything to come to this conclusion. They will not tell me how to escalate this case. Please let me know if there is a way to escalate.

    One day when tried to restart my iphone 4, I got a screen asking me to connect to itunes. Itunes asked me to restore my phone. When I tried to restore, I got an Error 23 saying it cannot be restored. I tried the phone support. They asked to contact the service centre. I then tried the service centre guys. They clearly did not know what Error 23 was. They asked to contact the apple support again. After 2-3 guys tried to blow me off saying it is a hardware issue, I asked for a senior analyst. Apple support assigned a senior guy who said he will contact the engineering team. After 2 days, I was told that the engineering team has confirmed that this is a hardware issue.
    What I am surprised about is that no one seems to have done any analysis or debugging to figure this out. How do they decide that this is a hardware issue?
    The first time I tried it from my laptop and got this message. The support guy told me that my laptop may have an antivirus software which may be causing this issue. So I took it to the service centre. They tried the same restore from their machine and got the exact same error.
    The senior analyst that was later assigned to my case, again asked me to restore from my machine. I got the same error.
    Basically what they had verified in all these activities was that I was getting error 23. I dont know how they decided that this was due to hardware issues?
    Online documentation on Error 23 is vague. It is bunched long with other error codes. There is no clear explanation of what Error 23 is.
    But most importantly It says 'In rare cases, this may be a hardware issue'.
    So if it is a hardware issue in rare case, how was my case deemed to be a 'rare case'?
    When I asked them to escalate this, they said that there is no way to escalate.
    I have had a horrible experience with Apple support. Till this point I used to think of Apple as a class apart. But now I am totally disillusioned.
    My phone was about a year and a half old. I dont mind it if it actually turns out to be a hardware issue. I will take it as my bad luck.
    But I dont see how the support guys decided that this is a hardware issue. I need to know.
    And secondly I am shocked that Apple has no escalation path.
    Can anyone please help?

    Hi @imobl,
    You sound like an Apple support guy who hasn't been able to answer my questions.
    To respond to some of the points you made,
    - I did not ignore Ocean20's suggestion. If you has read my post, you would have known that I took my phone to the apple service centre where they tried this restore on THEIR machines. I am assuming that Apple guys know how not to block iTunes. So I actually do not understand your point about me trying the hosts file changes on my machine. Do you not believe that apple tested this issue with the correct settings?
    - you also give a flawed logic of why the issue is a hardware issue. You mentioned that If I thought that the issue was with the software, i should try a restore and getting it to work. The problem is that my error (23), and many others comes up when the restore fails. And you would be astonished to know that not all errors are hardware errors. Sometimes even software errors prevent restores. Funnily enough Apple itself mention that 'in rare cases, error 23 could be hardware related'.
    - all Apple has done so far is replicate the issue. I don not know how anyone can conclude that the issue is a hardware issue.
    And by the way, I am not certain that this is a software bug. Again if you read my Posts, you will notice I only want a confirmation,/proof that the issue is hardware related as they mention..
    Please refrain do. Responding if there is nothing to add.

Maybe you are looking for

  • Creation of a table..

    Hi, Could anyone please tell me what is a table and how to create a table? For suppose if i want to create an employee table, what all the necessary information required to create it? How can i proceed? Thanks.

  • Error while Restarting weblogic application server

    Hi, While Restarting weblogic application server (10.3 installed on linux) we are getting following error : <Aug 10, 2010 2:47:08 PM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 10.0-b19

  • DATABASE CREATION PROBLEM

    I followed the oracle press dba 8 book 2. I create the password file with password a. I also create the database with instance u16. When i start with my database using svrmgrl the said password does not work. what may be the possible reason. null

  • Tab deliminated option

    hai     i want to trasfer data from excel file to txt files. where i get tab deliminated option in excel files.

  • Character Limit for PDF Bookmark

    What is the maximum number of characters that Acrobat allows for a PDF bookmark?