Simple TCP chat application half duplex not working for me

I m having a problem in TCP application working half duplex
My friend runs client program who is in near by city and i run the server program in my system
Let my ip address is 116.x.y.z
My server program is
import java.net.*;
     import java.io.*;
     public class tcpserver
         public static void main(String args[]) throws IOException
          ServerSocket s1=null;
          try
             s1=new ServerSocket(98);
          catch(IOException e)
             System.err.println("Could not find port 98");
             System.exit(1);
          Socket c=null;
          try
             c=s1.accept();
             System.out.println("Connection from"+c);
                                  catch(IOException e)
             System.out.println("Accept failed");
             System.exit(1);
          PrintWriter out=new PrintWriter(c.getOutputStream(),true);
          BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
          System.out.println("I am ready,type now");
          String l=in.readLine();
          while(l!=null)
             out.println(l);
          out.close();
          in.close();
          c.close();
          s1.close();
     }The Client program is which my friend executes is
import java.net.*;
     import java.io.*;
     public class tcpclient
         public static void main(String arg[]) throws IOException
          Socket s=null;
          BufferedReader b=null;
          try
             s=new Socket(InetAddress.getByName("116.x.y.z"),98);
             b=new BufferedReader(new InputStreamReader(s.getInputStream()));
          catch(UnknownHostException u)
             System.err.println("I dont know host");
             System.exit(0);
          String inp;
          while((inp=b.readLine())!=null)
             System.out.println(inp);
             break;
          b.close();
          s.close();
     }Important Note: When i run this program specifying within my system its working ( i mean running the program in two different windows(terminals) its working for me)
When i give the client program to my friend its getting compiling for him but not running for him
Its showing him unknownhost exception and main method not found like this.
Please correct the above code or else just what kind of strategy we should follow in order to get rid of this problem
When i normally run this program in my system
the output when i run in my own system is
Output for running tcpserver.java
~\JDK2~1.0\bin>java tcpserver
Connection fromSocket[addr=/116.x.y.z,port=1930,localport=98] // in output i edit the ip address text
I am ready,type now
this is test text
Output for running tcpclient.java
~\JDK2~1.0\bin>java tcpclient
this is test text
My problem is its working in my system when it exceeds out the output is not available for me
Help me Please !!!

          String l=in.readLine();
          while(l!=null)
          out.println(l);
          }That will print the same thing forever. Make it the same as the loop in the client.
Important Note: When i run this program specifying within my system its working ( i mean running the program in two different windows(terminals) its working for me)Looping forever might be what you call 'working'. I don't.
Its showing him unknownhost exception and main method not found like this.Change this:
new Socket(InetAddress.getByName("116.x.y.z"),98)to this:
new Socket("116.x.y.z",98)although your friend may then run into connectivity problems ...

Similar Messages

  • Duplexing not working for LaserJet 5M (maybe just LaserJet 5?)

    Hi,
    I have a HP LaserJet 5 printer (that's what it says on the front), and at one point, I believe that I bought the memory module that adds PostScript handling, which at the time I think made the printer equivalent to a LaserJet 5M. Anyway, I recently discovered that I can no longer print duplex pages (the printer has the duplexer attached, and it works when printing from my Windows machine). I'm not 100% sure that this started when I upgraded to Leopard, but this is probably the case. I went to HP's website, and went to the driver download area and for the "LaserJet 5/m/n Printer Series", there was a driver called "HP LaserJet and Edgeline Print Driver Only for Mac OS X 10.5". The version of this driver was listed as 7.8.761 with a date of 28 Jan 2008. Feeling that I had found the problem, I downloaded this driver (it was an install package), and installed it. Prior to installation, I deleted my LaserJet from my list of installed printers. After installation, I reinstalled it (it is an IP printer, with a JetDirect card in it), but the duplexing problem remains. But checking the printer driver information in System Preferences, it shows the driver version as 4.3.1.094, and not the version 7.8.761 that was reported on HP's website for the driver that I just downloaded. When I select "Select a driver to use..." from the Driver tab of the info panel for my LaserJet, I see the following candidate printer drivers listed:
    HP LaserJet 5 - Gutenprint v5.1.3
    HP LaserJet 5 series - CUPs+ Gimp-Print v4.2.7
    HP LaserJet 5 series - Gimp-Print v5.0.0-beta2
    HP LaserJet 5M
    HP LaserJet 5M - Gutenprint v5.1.3
    It doesn't seem to me that any of these drivers are the one that was supposedly installed by the HP software that I downloaded. I'm hoping that someone here has been through this situation and has figured out how to get duplexing to work for this printer. Thanks for any suggestions.
    Ken

    Razmee209,
    Yes, I have checked ALL settings, restored and tried even the "illegal" things that could possibly fix it, it has left me with nothing but headaches and disappointment because I'm either faced with more errors.  I feel I'm suck with this error that Apple is using us to update to a newer more expensive phone. 
    So Razmee, what kind of phone do you have and are you on an AT&T contract?  Are you on iOS 6?

  • The Help Link from the Application Pages Does not Work for Peoplesoft Campus Solutions 9.0

    Hi everyone.
    I have a problem, I have been trying to set up the Help Link from the Application Pages for Peoplesoft Campus Solutions 9.0 according to the instructions given in the Document: http://docs.oracle.com/cd/E17566_01/epm91pbr0/eng/psbooks/EnablingtheHelpLinkfromApplicationPages.pdf ,  (referenced in the Doc ID 1289101.1, E-PB: How to Set Up the Context Sensitive Help with Hosted PeopleBooks using Universal Linking).
    I follow the instructions of that document carefully:
    I go to: PeopleTools -> Web Profile -> Web Profile Configuration
        2. Then I choose the Web Profile: "Development".
        3. Then Change the value for the Help URL field by entering the following URL format: http://www.oracle.com/pls/topic/lookup?id=%CONTEXT_ID%&ctx=hrcs90r5 , the ctx parameter selected is the one that correspond to  the Campus Solutions (hrcs90r5) according to the Product Line Code Table (ULinkID) especified in the mentioned document.
        4. Stop the Web Domain and Clear cache.
        5. Start the Web Domain again.
    After setting up the Web Profile Configuration I test the help links, thas is why I click in the Help link in any Peoplesoft CS 9.0 Application Page (modify a person), but the next error message appears: "We're sorry, the topic you requested was not found.".
    I tried many combinations with the ctx parameters URL but it does not work yet. 
    I did the same test, but this time using the Help URL field with a HRMS ctx parameter by entering the following URL format: http://www.oracle.com/pls/topic/lookup?id=%CONTEXT_ID%&ctx=hcm92pbr5 , and It works fine !!!
    According to the previous test you realize that It works with HRMS ctx parameter but not with Campus Solutions 9.0 ctx parameter,  Does anybody know what else can I do ? Am I doing anything wrong or missing? or maybe the Oracle's ctx parameter for Campus Solutions URL It is broken simply.
    Thanks for you help and feedback.

    2799444 - The page you are testing with appears to be a Workforce Administration page. Is that correct?
    The CS PeopleBooks would only work for CS pages, e.g.: try navigating to Main Menu > Campus Community > Personal Information > Add/Update a Person
    Also, you can use multiple ctx parameters:
    E.g.: http://www.oracle.com/pls/topic/lookup?id=%CONTEXT_ID%&ctx=hrcs90r5&ctx=hcm92pbr5&ctx=pt852pbh2
    This way the help would work for the HR related pages like Workforce Administration, Campus Solutions pages like Campus Community and also PeopleTools pages like Web Profile Configuration. Hope this clarifies your question. Thanks!

  • Issue is TEXT_IO application API is not working in report builder 10g.

    Issue is TEXT_IO application API is not working in report builder 10g.
    TEXT_IO application api is working in report builder 6i. (Not working in upgrade from Oracle EBiz 11i to Oracle Ebiz R12)
    I saw that details in some forums, client_text_io is available for form builder 10g.
    Is any other api available for report builder 10g?
    If it is available what steps we need to do?

    All the CLIENT_% procedures are part of webutil in Forms. Forms uses the Java applet on the client PC to perform actions on the local PC via webutil. This is not possible for Reports.
    You can still use text_io on the server, but you need some other way to copy the files to/from the client PC.
    I wonder how you used the functionality in EBS R11. Even R11 uses web reports, so text_io already worked on the server, not the client PC.

  • MAM application is not working for some users

    Hi All,
    Tha MAM application is not working for some users.Different users have different workcenters other than that I dont see any other change. When I run MAM30_090_GETLIST in the backend I can see the no of customized users.But I cant see same no of users in the MEREP_207 table for the Syncbo MAM30_090 and strcture id TOP in the middleware. There is a data when I checked under worklist monitor for that user. But neither the MAM application nor MAM data is downloading to that device.
    If I use different user on the same device I can see the MAM application and MAM data.
    What could be the wrong in this case. Any help would be highly appreciated.
    Mobile Client:MI 70 SP 15 Patch 0 Build 200802280918
    Middleware:SAP NetWeaver 2004s with Patch leve 15
    Backend:SAP ECC 6.0
    Application:MAM 3.0
    Thanks and Regards,
    Ameer.

    Hi,
    from your description the source of your issue is quite obvious: some of the MAM users configured in spro are not configured properly.
    For T01 SyncBos the number of TOP records in merep_207 MUST be the same as number of headers returned by an appropriate getList FM in the backend.
    You need to solve this before you can go any further.
    Reason why a record is not recorded in MEREP_207 - getdetail failed for whatever reason. So execute MAM30_ML_getdetail for each of the users that is not replicated in the middleware and check if there are errors in RETURN table. If there is no error - one of the common reason for replication fail is when there are records in item tables that have duplicate primary keys.
    Regards,
    Larissa Limarova

  • Simple button highlights in PSD menu not working properly in Encore

    I'm having some trouble making even basic menus this week - I'm working on a couple of projects that need simple menus on their DVDs, but I can't get them to work.
    For one project, it's a simple menu with a photo as the background and two buttons - 'Play' and 'Behind the Scenes'. Each button group consists of a text layer with the button title and a layer called '(=1) Highlight'. The highlight layer is a simple straight line underneath the text. Nothing is overlapping, however the line is not appearing on one of the buttons. The group is detected as a button in Encore, and works when it is linked to the timeline, but the line does not appear
    With the other project I've been working on this week, there's a few menu pages - a main menu, and some chapter select sub menus. These menus look a bit fancier, but the buttons are still fairly simple - they basically consist of a line of text, but this time the highlight is a rectangular outline. I'm having what looks like the same problem with these menus - the highlights aren't displaying correctly. Most of the outlines are missing their bottom lines - so only a three-sided box is appearing.
    I've made plenty of menus before using the same method, and more complicated ones than this too, without running into any issues. I haven't been able to figure out what the problem is, despite starting over and making the menus from scratch several times, and making them one step at a time, importing them into Encore at every step to test. At some point, one or more of the highlights will always stop working. Despite this systematic approach, I'm still baffled. I'm using Photoshop CS5.1 and Encore CS5.1. After running into problems on one computer I tried making menus from scratch on another computer with the same version software but had the same problem.
    Has anyone got any suggestions of things I should try that might solve this problem? I can send an example of a menu that's not working for me if anyone would like to take a look.

    Thank you, everyone, for your continued support.
    I have tried everything suggested here, plus lots more, since I last posted. There are glitches no matter what I do. I don't think it's anything to do with what I'm doing in Photoshop as I've tried using some menus from the Encore library and I'm having the same problem with those. I've also tried using buttons from the Encore library on my menus with the same result.
    But that got me to thinking - perhaps it's just a glitch with Encore's previews. So I tried actually building a DVD image, even with the menus that appeared to be broken, and they turned out to be fine. So it must just be a glitch in the Encore preview.
    I've also discovered another bug while doing this - if you create a menu in Encore, it's always NTSC, even if the project is PAL. It makes a 4:3, 720x480 menu with a PAR of D1/DV NTSC 0.91. Surely, if you've set up a PAL project, and you create a new menu, it should create one that's actually PAL?

  • The application maps is not working. When I try to run it opens for a few seconds with a blank screen and then closes

    The application maps is not working. When I try to run it opens for a few seconds with a blank screen and then closes.

    Try a reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.

  • Just completed a clean install of CS6 Photoshop on my Yosemite Mac Book Pro and the Adobe Application Manager does not work and cannot install a fresh copy from Adobe

    Just re-installed a fresh copy of CS6 Photoshop on my Yosemite Mac Book Pro and somehow the Adobe Application Manager does not work and therefore cannot verify my copy.  What should I do?
    I get a message saying that Adobe Application Manager may be damaged and that I should install a new version of AAM.  But after downloading a fresh copy of AAM and doing the install, the program (AAM) still will not install.  It is like an infinite loop!
    Please, someone help!
    Thanks!

    HI gener7!
    I'm sorry but I am not on Creative Cloud.  I'm still on CS6 and it was the Adobe Application Manager that wasn't working and I could not install the update to this application.  My AAM version is:  8.0.0160
    The link you provided was the update that I wanted to install but it does not work.  A window shows up during that install that says:
    We've encountered the following issues.
    Installer failed to initialize.  Please download Adobe Support Advisor to detect the problem.
    and then the link to the Adobe Support Advisor which leads to a "Adobe Support Advisor has been discontinued" page.
    Thanks!

  • Debugger not working for BSP application

    Hi All,
    I have 4.6C sap installation and the debugger is not working for BSP Application even when i hard code the break points.
    Can anyone help me on this issue.
    Thanks and Regards
    Shilpa

    Hi Shilpa,
    How many number of sessions are open ? If there are already six sessions open and then you try and get the debugger, it will not start, and you won't be able to catch that error also...!
    Other than that there is no possibility that the debugger doesn't start, unless ofcourse, the logic doesn't reach the debugger point....
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Webcam not working for Macbook Air 2013 after upgrading to OSX Mavericks? Yahoo/ Google/Skype cam chats not working. Facetime works though. Any updates of Mavericks released to fix this?

    Webcam not working for Macbook Air 2013 after upgrading to OSX Mavericks? Yahoo/ Google/Skype cam chats not working. Facetime works though. Any updates of Mavericks released to fix this?

    I have a MacBook Pro Retina display: 15.4-inch late 2015 with OS X Mavericks install, only on second week. 
    Insight works on FaceTime, Skype, but yahoo program does not show insight cam in dropped down.
    Now when I got my new MacBook Pro, I down loaded all new Skype (worked tested), FaceTime (Worked Tested), Yahoo (not worked)
    Fix:
    With the new Maverick you have to use there messager program Version 8.0 (4218). Once I add my yahoo account video works again.
    It also supported AOL, AIM, Google Talk, Jabber.
    Guess I miss it frist time... hope this helps...

  • Document library open in client application not working for img,pdf,txt files

    In an office 365 sharepoint site i have enabled open in client applicartion for document library but it is not working for image/txt/pdf files for word and excel files it is working fine. I have even turned on the feature open document in client application
    by default from site collection features also but there is no change.
    Please advice.
    Regards,
    Chaitanya

    Hi Chaitanya,
    The feature is currently designed to be used with HTTPS, and will not work as expected with the HTTP connection available on Office 365 for professionals and
    small businesses sites.
    To take advantage of this update, do the following steps:
    Wait for the update to the SharePoint Online service, which is in progress now.
    Upgrade Adobe Reader to the version 10.1.2 client.
    Add your SharePoint Online root URL/domain to the Trusted Sites security zone in Internet Explorer1 (e.g., 
    https://contoso.sharepoint.com).
    Check the Keep me signed in box when you log in to a SharePoint Online site.
    This
    SharePoint Online update is currently
    being rolled out worldwide along with several other new features.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Half Day LOP / Unpaid Absence not working for payroll india

    Dear Gurus,
    I have created Unpaid leave which is working correctly when we maintain full day absence in infotype 2001.
    But it is not working for partial absence ie, half day.
    I would really appreciate if you help me out on this issue.
    Thanks,
    Rajesh Badita

    Dear Venkey / Rajesh,
    My issue is resolved. We have tried with Custom PCR which will convert absence days into hours. With this we are able to achieve the desired result.
    Copied from standard PCR "INP1" to "ZNP1" and modified "/801 partial period factor 1" logic. Below is the PCR for your kind reference.
    RTE=TKSOLL
    RTE*8
    RTE-TSAU**
    RTE/8
    RTE*KGENAU
    RTE/TKDIVI
    ADDWT *
    Kindly go through the below link which is very useful. Hence closing the thread. Thanks for your valuable inputs.
    http://wiki.sdn.sap.com/wiki/display/sandbox/PCRmodificationincaseofHalfdayUnpaidLeave(LOP),IndiaPayroll
    Thanks & Regards,
    Rajesh Badita
    Edited by: Rajesh Badita - ABAP HR on Oct 13, 2011 7:05 AM
    Edited by: Rajesh Badita - ABAP HR on Oct 13, 2011 7:08 AM

  • Oc4jadmin not working for application server control in SOA suite 10.1.3.1.

    Hi,
    We have installed the SOA suite, and I can login to the various components using oc4jadmin/password (bpel, esb, rules author), but for some reason that oc4jadmin password is not working for Application Server Control, which is the only piece of this I really need to log in to.
    Any thoughts on what is going wrong?
    Cheers,
    Pat Rock

    Maybe you change this password internally for another application (such BPEL, WSM,etc) and didn't make change for your main OC4J container.
    You can try to change this password by...
    1. Open the file [OASHome]\j2ee\home\config\system-jazn-data.xml
    2. Find the section that looks like this
    [user]
    [name]oc4jadmin[name]
    [display-name]OC4J Administrator[display-name]
    [guid]88836370D11611DC9F30F9C1CD6F1A73[guid]
    [description]OC4J Administrator[description]
    [credentials]{903}F+iG1A46edXG9RdfY0pD2O4Ge/qyEjsg[credentials]
    [user]
    3. Replace the value separated by the "Credentials" starting and ending tags with your new desired password, prefixed with an exclamation point
    Example:
    [user]
    [name]oc4jadmin[name]
    [display-name]OC4J Administrator[display-name]
    [guid]88836370D11611DC9F30F9C1CD6F1A73[guid]
    [description]OC4J Administrator[description]
    [credentials]!newpassword[credentials]
    [user]
    4. Save the file and restart OAS
    This should not affect other applications.
    Greetings.

  • Application Parameter does not work on migrating

    We have encountered this various times.
    When we add an application parameter to an existing application, it does not work on migrating.
    We have to make a new service (application) and then attach the parameter to it, then it works.
    What is the reason for this behavior?
    Eg: I added the parameter WDDISABLEUSERPERSONALIZATION and set it to X in development. Works fine there. On migrating to UAT, it does not work. What's amiss?
    Thanks in adv.

    Hi Aishi,
    maybe SAP Note [1332644|https://service.sap.com/sap/support/notes/1332644] "WDA Application Parameters are not changed in all clients" might be helpful in your case.
    Best regards,
      Andreas

  • ScriptLink tag not working for application page sharepoint 2010

    <ScriptLink> tag not working for application page sharepoint 2010 for including javascript in application page, it appends either 1033 or _layout to path specified for javascript.But javascripts are located in custom document library on site and not
    in _layouts folder.
    Please help and explain in details as I tried lot on this.

    Hi,
    Use the following line of code
    <SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/js/functions.js" Language="javascript" />
    Thanks,
    Vivek
    Please vote or mark your question answered, if my reply helps you

Maybe you are looking for

  • Losing bluetooth keyboard at startup / USB to blame - any fixes?

    Hi. After 10 months of normal behavior my Apple bluetooth keyboard - but not apple bluetooth mouse, strangely - now always needs to be re-paired with my MacPro at startup. (Batteries all fine, and kept nice and close to the computer.) According to so

  • About  inserting data

    Hi to all, I am trying to enter data into a table thru SE11. The process as follows SE11 --> "utilities" menu --> "table contents" --> Create entries Then my SAP is prompting a error message "The system settings do not allow  any changes " . And i do

  • NetInstall Naming Clients File???

    I have seen this same question posted a couple of different times but I have never seen a solid answer. So I hope you will bear with me. Tiger Server offers, or at least so they say, the ability to name client computers when performing a Netinstall.

  • Trignometric functions in 10 g

    does Oracle trigonometric functions only operate on radians or can they be spec ified in degrees and gradients... thank u rajiv

  • Using An Expression Pedal (CC 11) outside of keyboard.

    Hello, I'm a bit of a novice, and I'm having a hard time using my expression pedal for actual expression.  My keyboard Alesis q88 only has volume in and sustain, and I was wondering if you can take the expression pedal through an adapter somehow dire