Given raw IP and port number,create a scoket.

Dear All,
Given a raw IP number 126.124.35.41 and port number 1950,how to create a socket? I am going to use
Socket s = new Socket(InetAddress address, int port)
I know the key is to use raw IP to create a InetAddress. But how?
Thanks a lot.
Kevin

By the way, if you like to get InetAddress, you can do it by
InetAddress address= InetAddress.getByName("126.124.35.41");

Similar Messages

  • Application server name and port number

    Hi
    Is it possible to get the application server name(ip) and port number at runtime. Becuase i want to open an html file which is in the application server, when a button is pressed by using web.show_document ();
    Can anyone guide me please.
    Thanks in advance
    geethu

    application server name and port number

  • Replacing Host Name and Port number throughout Environments

    So I am currently working on a project that have several classes using simple JDBC code. I'm switching all of it to use JNDI instead of what is currently being used. I'm using Weblogic and the plan is to have the code run in a cluster.
    Here is a code Snippet of some of the code.
    Context ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,
    "t3://hostname:port");
    My problem lies in the the "t3://hostname:port" String. I don't want to hardcode that since I know its bad code practice but my question is what is the best way to replace that with the Host Name and Port number as I move environments. Should I have a Class with a Static Variable and just reference that through the other classes or should I put it in some Property file and read the value from there? Any insight into this would be greatly appreciated.
    Thank you.

    would it be something like this?
    Properties properties = new Properties();
              try {
         properties.load(new FileInputStream("src/jndi.properties"));
         String url = properties.getProperty("url");
         System.out.println(url );
         } catch (IOException e) {
         }

  • Getting host name and port number from application

    Does anyone know how I would be able to get the host name
    and port number from an application launched by java webstart ?
    This is the host and port of the URL that this application is launched from.

    A couple of suggestions:
    -The note is about 6.40. Doesn't fit for your server
    -Don't!
    -Reinstall!
    Regards,
    Benny

  • Getting host name and port number from an application

    Does anyone know how I would be able to get the host name
    and port number from an application launched by java webstart ?
    This is the host and port of the URL that this application is launched from.

    A couple of suggestions:
    -The note is about 6.40. Doesn't fit for your server
    -Don't!
    -Reinstall!
    Regards,
    Benny

  • Getting WLS host url and port number

    Hello Experts,
    I need to forward an authenticated request to JAAS LoginModule. How can I get wls host name and port numbe in the LoginModule?
    Thank you in advance,
    Thanks for reading my post

    Hi friends.
    I have used the last post, but it is not working.
    Mat be the API had changed.
    What class or interface could give me this data in web dynpro component?
    Too, I'm using the SAP NetWeaver Developer Studio
    Version: 2.0.16
    Build id: 200602130353
    Thank you.
    Manuel Loayza
    Living La Vida JAVA
    Edited by: Manuel  Loayza Gahona on Jul 23, 2008 6:54 PM

  • Big Colour and detail changes between Original Nikon RAW files and the images created on the Preview page!

    Big Colour and detail changes between Original Nikon RAW files and the images created on the Preview page! Yes there are distinct visual changes when I preview my Nikon NEF RAW Files.Please note I do not use iPhoto at all.
    If you view it as a contact sheet straight from the original folder there are no alterations but the moment you double click and want to 'Preview' it, this new preview page introduces very noticeable distortions : lighter shading goes missing and colour goes darker e.g orange turns red and mid blue goes deep blue!  Alarmingly the little column on the left of the preview page showing the collection shows the original file colours and then after a few seconds show the new distorted image...you can see this visible change and it takes place after a few seconds once you double click! Also if you use Apple's 'Cover Flow' to preview, this function will replace your original RAW file with the new 'altered preview' image!
    I have raised this with Apple but they have yet to reply...has anyone ever experienced this? I have used my Mac book for 18months only noticed it about 5 days ago!
    I went to Apple store and we tried it in other laptops and Macs and it happened to all of them so we think this is a software issue and not down to the laptop.
    Any help is much appreciated!

    Big Colour and detail changes between Original Nikon RAW files and the images created on the Preview page! Yes there are distinct visual changes when I preview my Nikon NEF RAW Files.Please note I do not use iPhoto at all.
    If you view it as a contact sheet straight from the original folder there are no alterations but the moment you double click and want to 'Preview' it, this new preview page introduces very noticeable distortions : lighter shading goes missing and colour goes darker e.g orange turns red and mid blue goes deep blue!  Alarmingly the little column on the left of the preview page showing the collection shows the original file colours and then after a few seconds show the new distorted image...you can see this visible change and it takes place after a few seconds once you double click! Also if you use Apple's 'Cover Flow' to preview, this function will replace your original RAW file with the new 'altered preview' image!
    I have raised this with Apple but they have yet to reply...has anyone ever experienced this? I have used my Mac book for 18months only noticed it about 5 days ago!
    I went to Apple store and we tried it in other laptops and Macs and it happened to all of them so we think this is a software issue and not down to the laptop.
    Any help is much appreciated!

  • Given IP and port number, Is there a way to find the service name?

    Hi,
    In the Java language, if I am given the IP and the Port number, is there way to lookup the corresponding service name?
    thanks, grace

    There are a number of standard services by port number. You can get that from /etc/services on any nx system and put it into a map or array. That list doesn't change all that often.
    In general though, as Dave says, no.
    Assuming the service is not one of the standard ones and the same port may provide different services on different IP addresses, there would need to be some standard protocol for naming services that you could access at those IPs--either a "list of ports/services" service that's at a known port, or a request/response that would be standard across all IPs and ports. As far as I know, neither of those exist.

  • FTP a file to given mailbox loacted at ip-address and port number

    I need technical suggestion on the following.
    Actually I got struck up with a technical issue related to FTP a file to UNIX mailbox through ABAP.
    We have tried with FM: SXPG_CALL_SYSTEM and FTP_CONNECT, which all works purely based on IP, USER ID and PWD.
    But we have an extra PORT NUMBER, which any of this FM doesnu2019t take up.
    Can you please suggest me any other FM that I can use to FTP a file to specified IP with Port Number along with User id and PWD.
    Else are we supposed to go for a separate script for this purpose?
    As i have no clue on UNIX, if i go for a script than what would be the reuirement for this script and where to place them and how to call them in to my ABAP?
    Timely help would be appreciable.
    Thanks in advance
    Edited by: yamuna pillai on Nov 11, 2008 8:37 AM

    Hi Yamuna,
    Can you let us know hw u did this..because we are facing the same kind of issue.
    Thanks
    Gayathri

  • Getting the IP address and port number and placing it in a window

    Hi Everyone,
    I have written the code which gives the system time in a window. But I need also to have the Internet address and the port number of the client in the window. the TimeserverRF considers incoming DatagramPackets as a request for the current time, if the client wishes to receive the current time from TimeserverRF, it has only has to send a DatagramPacket to TimeserverRF.
    I am not sure how to do this writing DatagramPackets .
    I have the TimeClient class application. Timeclient should send the Internet address and the port on which it is running.
    Do You have any ideas.
    // the code for system time.
    import javax.swing.*;
    public class Window1 {
    public static void main(String[] args) {
    JFrame win = new JFrame("TimeServer running on port 9999");
    JTextArea tA = new JTextArea(1, 30);
    win.getContentPane().add(tA);
    win.pack();
    win.setVisible(true);
    String s1; // initialise variables
    TimeData t1; // TimeData object initalise to t1 variable
    t1 = new TimeData(System.currentTimeMillis()); // start of loop body
    s1 = t1.toTimeString(); // system time held sring s1
    tA.append("Sent "); tA.append(s1); // Prints statement and time in Frame
    }

    Study this networking tutorial and then, if you have a specific question, create a new post with it.
    http://java.sun.com/docs/books/tutorial/networking/index.html

  • Visual Voicemail gone after upgrade to 2.0 (and porting number)

    Anyone else experience this? I upgraded to 2.0 and at the same time I ported the old iPhone to another cell phone number on my account with ATT. The upgrade to 2.0 and porting appeared to go OK as everything else is working EXCEPT when on the phone application, I can not get the visual voicemail button to do anything. I press it and it acts like it is taking some time to open but it never brings up the visual voicemail screen. The phone part works as usual in all other ways.

    I upgraded to the pre-release version of 2.0 and it worked fine. Then this morning i tried to update to the official 2.0 and it could not connect to iTunes, and that pinwheel kept spinning. So I pressed home button and power button until it (iPhone) rebooted. Then i connected it to iTunes and it asked me to restore.... So i pressed the option key (in mac, idk what it is in windows) and selected the prerelease version to downgrade to and now its fine. So...... good luck all

  • IPhoto not showing RAW pics, and crashing on Create New Library

    hi there
    i was just organising (tagging, deleting) pics in iPhoto 9.1 when the RAW pics started showing up as just blank placeholders - i'll clarify that:  they were showing previously, however my perception of them 'disappearing' may have been between iPhoto sessions.
    my iPhoto library is mostly JPEGs, with the RAW pics being a recent addition courtesy of a Canon EOS 5D MkII.  the iPhoto library resides on a 500GB external harddrive.  the iPhoto library was backed up by way of copying the entire iPhoto folder from the 500GB external harddrive to a separate 1TB external harddrive - this back-up process was done prior to the addition of more recent RAW pics, and the memory card from which all the RAW pics came from has been wiped several times since.  some RAW pics taken in December 2011 are showing; none of the RAW pics taken in January 2012 are showing.
    what i've done so far:
    1.  Option-Command-opened iPhoto and ticked all boxes to rebuild the library and the RAW pics are still not showing.  this rebuild process has been done at least three times now.
    2.  opened the iPhoto Library (via Show Package Contents) and confirmed that the pic files are still there in the Masters folder.  (they are identified by the date the photos were taken, the CR2, and can be viewed in Preview.)
    3.  installed the iPhoto 9.2.1 Update and the RAW Camera Update 3.9, with no change in the RAW pics' visibility.
    4.  Option-opened iPhoto and -
      a.  - created a new library (on the 1TB external HD, separate to the 'backup') into which i -
      b.  - tried to import the entire iPhoto Library from the 500GB external HD but -
      c.   this import ended in an "iPhoto quit unexpectedly" message.  unfortunately, i did not keep the error report for this.
    5.  Option-Command-opened iPhoto to create a new library on the 1TB HD but this has ended abruptly in an "iPhoto quit unexpectedly" message.  this has happened twice, and i have kept one of the error reports.
    6.  downloaded and installed the latest iPhoto Library Manager and -
      a.  - tried to Rebuild the library but -
      b.  - iPhoto quit unexpectedly - i have kept this error report - while -
      c.  - iPhoto Library Manager gave the error message "'iPLM'/'ADDK' (returnID 3)".
    interspersed with the above steps, i have run Disk Utility Repair Permissions after each crash.
    so.
    i know the files are still there.  but iPhoto won't show them.  i've trawled these forums and done - or tried doing - some of the fixes, all to no avail.
    please can someone help.
    david mamea

    this is from the last error report (step 5 of my 22Jan12 1142 post above):
    Process:    
    iPhoto [2588]
    Path:       
    /Applications/iPhoto.app/Contents/MacOS/iPhoto
    Identifier: 
    com.apple.iPhoto
    Version:    
    9.2.1 (9.2.1)
    Build Info: 
    iPhotoProject-628000000000000~3
    Code Type:  
    X86 (Native)
    Parent Process:  launchd [2471]
    Date/Time:  
    2012-01-22 11:11:23.578 +1300
    OS Version: 
    Mac OS X 10.6.8 (10K549)
    Report Version:  6
    Sleep/Wake UUID: A5D90A7D-4923-4807-925C-7572A3FDC25F
    Interval Since Last Report:     
    225 sec
    Crashes Since Last Report:      
    1
    Per-App Interval Since Last Report:  3 sec
    Per-App Crashes Since Last Report:   1
    Anonymous UUID:                 
    9111BA25-4BC3-453F-8171-C05AFE66124B
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000058723f2f
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
    0   com.apple.ImageIO.framework  
    0x94afd4cb CFMutableDictAddProperty + 101
    1   com.apple.ImageIO.framework  
    0x94a22aba CGImagePluginReadRawXMPProps + 60
    2   com.apple.ImageIO.framework  
    0x94a823ac _CGImagePluginInitPSD + 1769
    3   com.apple.ImageIO.framework  
    0x949e5334 makeImagePlus + 690
    4   com.apple.ImageIO.framework  
    0x949eba0e CGImageSourceCreateImageAtIndex + 176
    5   com.apple.iPhoto         
    0x00099e52 0x1000 + 626258
    6   com.apple.iPhoto         
    0x00099d68 0x1000 + 626024
    7   com.apple.iPhoto         
    0x009bb203 0x1000 + 10199555
    8   com.apple.iPhoto         
    0x00069c0c 0x1000 + 429068
    9   com.apple.iPhoto         
    0x00067dc8 0x1000 + 421320
    10  com.apple.iPhoto         
    0x000664ce 0x1000 + 414926
    11  com.apple.iPhoto         
    0x000663f9 0x1000 + 414713
    12  com.apple.Foundation     
    0x98735409 __NSFireDelayedPerform + 537
    13  com.apple.CoreFoundation 
    0x971c9a6b __CFRunLoopRun + 8059
    14  com.apple.CoreFoundation 
    0x971c73f4 CFRunLoopRunSpecific + 452
    15  com.apple.CoreFoundation 
    0x971c7221 CFRunLoopRunInMode + 97
    16  com.apple.HIToolbox      
    0x952c2e04 RunCurrentEventLoopInMode + 392
    17  com.apple.HIToolbox      
    0x952c2bb9 ReceiveNextEventCommon + 354
    18  com.apple.HIToolbox      
    0x952c2a3e BlockUntilNextEventMatchingListInMode + 81
    19  com.apple.AppKit         
    0x92e8d595 _DPSNextEvent + 847
    20  com.apple.AppKit         
    0x92e8cdd6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
    21  com.apple.AppKit         
    0x92e4f1f3 -[NSApplication run] + 821
    22  com.apple.AppKit         
    0x92e47289 NSApplicationMain + 574
    23  com.apple.iPhoto         
    0x0001159a 0x1000 + 66970
    24  com.apple.iPhoto         
    0x00010a29 0x1000 + 64041

  • How to get the Host name and port number

    Hi all,
    I am working in xRPM. I need to get the server name, host name & port number for the portal and i need to diaplay as a link in the Workflow step. I cant give the portal link as static, as it will vary depends on the DEV, QUAL, PROD. Is there any FM or class is available, so i can get the server name, port no. for my purpose?.
    Regards,
    Vinoth

    Hi Kanagaraja,
    My client has configured the portal and backend in different stack. So when i execute the FM you provided and with class: CL_HTTP_SERVER, CL_WD_UTILITIES, i am getting only the backend host name and port no. not the portal's info. So please help is there any way we can get the portal's info.
    Thanks for your reply.
    -Vinoth

  • About  localhost and port number

    following jdbc:microsoftLsqlserver:// , why is the host name localhost and the port number is 1433? how to change the port number into others? please help
    thanks

    "localhost" is usually but not always set up as a hostname for current host, and resolves to the IP address 127.0.0.1
    You can connect to any host or port you want (that has a database running on that port), just change the values in the connection URL.
    If your question is "how can I get SQL Server to run using a different port", you'll need to consult Microsoft's documentation for that.

  • HNSC and Port number will not open on one farm server, why?

    I have a farm with six servers, two app, two wfe, and two cache.
    on the app server that the HNSC web application was created on, I am unable to browse to the web app and port url.  I believe this is why Search that runs on that server, only, is unable to crawl anything, because it cant navigate to
    https://hnsc.beaversoil.com:1001.
    on any of the other servers, you can logon and navigate to
    https://hnsc.beaversoil.com:10001 no problem
    Alternate access mappings are as follows:
    https://bvrPsp15app01.beaversoil.com:1001         Default      
    https://hnsc.beaversoil.com:1001  
    https://bvrPsp15app02.beaversoil.com:1001         Default     
    https://hnsc.beaversoil.com:1001
    https://hnsc.beaversoil.com:1001                         Default    
    https://hnsc.beaversoil.com:1001
    https://hnsc.beaversoil.com                                
    Intranet    https://hnsc.beaversoil.com
    You can navigate to the site on port 443 from any of the servers in the farm, but you can not navigate to the web app and port (hnsc.beaversoil.com:1001) from the app01 server.  You can reach that url from the other servers in the farm.
    I thought of moving search off APP01 and then disconnecting the app01 server from the farm, to see if would fix on reconnecting it; but, am afraid the issue may reside in the config database.  Not sure.
    Have tried:
    running psconfig
    and
    rebuilding the hnsc and rejoining the 30 or so hnsc back.  Each hnsc has its own db.
    Please advise on how I can get it so I can reach hnsc.beaversoil.com:1001 from bvrPsp15app01.beaversoil.com
    Stacy Anothersharepointblog.blogspot.com

    SharePoint foundation web application service is started
    wf.msc shows port 1001 open for anything inbound
    I don't have creds to check the eset file security, cant even look at it, will have to check with server admin tomorrow about this
    telnet acts like it connects but will not display anthing for servers other than app01
    on app01 is acts like it is hung and when you try to type a command, it just give a bar on each enter.
    These are the results from netstat -ano | find "1001"
    TCP
    0.0.0.0:1001
    0.0.0.0:0
    Listening
    4
    TCP
    10.1.84.84:1001
    10.1.84.75:62064
    Established
    4
    TCP
    [::]:1001
    [::]:0
    Listening
    4
    PID 4 is for system
    IIS worker process is PID 1540
    Im not sure Im doing the telnet correctly, have the host file modified, open telnet as admin, type open bvrpsp15app01.beaversoil.com 1001 press enter
    then it says press any key to continue, press any key, then type display
    when connecting to app01, just get a bar
    when connection to another server, nothing happens after typing display and pressing enter.
    I have to get back to this tomorrow, need a break, but thanks in advance for any reply or for next thoughts on this.  What about my thought on search
    > Do you think not being able to browse hnsc:Port is why search is unable to crawl? 
    Stacy www.sharepointpapa.com

Maybe you are looking for