Java Network Question, pls help

I need a small help regrading a java program.
I need to have 3 clients and a server. The programs should communicate via TCP. The server should be called first and waits for a connection request from the clients which are on a different machine that will connect to server. After connection is established, the client prgram prompts the user to type a line of text, send it to server. The server reads the data, reverse it and send it back to the client. After responsding to clients, server should close the connection.
How can I do this?
Thanks

It's completely normal for the client and server to be on different machines. As for example when you used your browser (the client) to connect to this forum (the server).

Similar Messages

  • Java io question - pls help

    Hi all,
    I am trying to copy a file in the path "c:\temp\source.txt" to "d:\temp\destination.txt"
    Below is the code written by me. It's getting compiled but saying
    "The system cannot find the file specified"
    Also when i use exists src.exists(); it's returning false.
    Some one please help me...
    import java.io.*;
    public class fileCopy {
         fileCopy() {
         public static void main(String args[]) {
         File src = new File("c:\\temp\\source.txt");
         System.out.println( "Kiran Printing abs file " + src.getAbsoluteFile());
         File dest = new File("d:\\temp\\destination.txt");
         // boolean exists = src.exists();
         // System.out.println( "Kiran Printing exists " + exists );
         System.out.println( "Kiran Printing exists " + src.getAbsolutePath());
         try{
         InputStream in = new FileInputStream(src);
         OutputStream out = new FileOutputStream(dest);
         // Transfer bytes from in to out
         byte[] buf = new byte[1024];
         int len;
         while ((len = in.read(buf)) > 0) {
         out.write(buf, 0, len);
         in.close();
         out.close();
         catch(Exception e)
         System.out.println( "Kiran Printing" + e.getMessage() );
    }

    I used your code
    my o/p
    Kiran Printing abs file c:\A.txt
    Kiran Printing exists true
    Kiran Printing exists c:\A.txt
    Check for file.

  • I cant reset my security question pls help me

    I cant find the reset your security question pls help me

    If you mean that you're aren't getting the reset link as described in the steps half-way down this page : http://support.apple.com/kb/HT5312, then that will only show if you have a rescue email address (which is not the same thing as an alternate email address) set up on your account.
    If you aren't getting the link then you don't have a rescue email address, and you won't be able to add one until you can answer your questions - you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the above HT5312 page to add a rescue email address for potential future use

  • Very simple question pls help me

    I just want to use oracle sql and pl/sql workshop isqp*plus web site, so which product or software shouuld i download??? pls help me.
    thanks.

    Pl see your other 2 threads on the same topic (posting the same question multiple times does not make the issue go away ;-) )
    Oracle install error 10g 64 bit windows
    which product should i install??
    HTH
    Srini

  • Simple Servlet question, pls help

    This is my form submission part in my jsp page
    <form name="updateForm" method="POST" action="/Update"> This is my web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <servlet-name>/Update</servlet-name>
        <servlet-class>UpdateMap</servlet-class>
      </servlet>
    </web-app>This is my UpdateMap.java
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class UpdateMap extends HttpServlet
        public UpdateMap()
    }I put my UpdateMap.class in WEB-INF/classes/ directory but when I clicked the submit button in my jsp page, I got The requested resource (/Update) is not available error

    Found my own error. The jsp submission code should be
    <form name="updateForm" method="POST" action="Update"> But I still got error when submit
    The specified HTTP method is not allowed for the requested resource ( POST method of HTTP is not supported by this URL.)Pls help.
    Thanks

  • Question pls help

    Hi I wanted to ask a question, pls do reply to help me out.
    Can I include a method call to another class, within the same transaction, that performs a
    database statement or must the actual select statement appear within the
    setAutoCommit(false) .....commit()?

    Please elaborate. I believe the answer is yes, but it's not entirely clear what you mean.
    - Phil

  • Java Mapping. Pls help

    Hi,
    Question:
    1. What is java mapping.
    2. How I use java mapping/UDF in message mapping
        for my below scenario
    In my Request XML there are 2 fields.
    In my Response XML there are 2 fields.
    Field 1 of Request XML needs to be mapped directly to
    Field 1 of Response XML.
    Field 2 needs to be passed as paramter to java class and
    java class will be give response that will be mapped to
    Field 2 of Response XML.
    Pls advice . It is urgent.
    Regards

    Hi Rac,
    Java mapping can be used when you have complex mapping structures.
    We can do most of the times for our requirements through Graphical mapping.
    When the structures are very complex to build you can go for SAX (Simple API for XML) or DOM (Document Object Model) parsers.
    Message mapping internally generates DOM parser.
    Java Mapping in XI
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+mapping&adv=false&sortby=cm_rnd_rankvalue#
    SAP Network Blog: Implementing a Java Mapping in SAP PI
    /people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
    Java Mapping (SAP Library - Partner Connectivity Kit)
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    SAP Network Blog: XI Java Mapping Helper (DOM)
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    SAP Network Blog: Testing and Debugging Java Mapping
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    Binary Conversion in XI - Java Mapping - Code Gallery - Wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava%2bmapping
    SAP Network Blog: "JAVA MAPPING", an alternate way of reading a CSV file
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    Thanks,
    Satya Kumar.
    Reward points if it is useful..

  • Urgent! Cannot run java programme. Pls help!

    1st question:
    I am using JDK 1.3.1_03 on Win2K Server. When I have compiled the java applications, I try to use
    "java <application name>" to run the programme, but an error message "Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/Object" come up on the screen. Why is it so? It run normally in the past.
    I have upgraded Windows2K once using the Win2K Server CD recently, is it the cause of the problem?
    How can I solve it? Please help! Thank you!
    2nd question:
    I have installed JDK1.4 Final version recently. However, after I have uninstalled it, it still appear in the Add/Remove Programme list in the control panel. I have tried to install another version of JDK, see if it would replace the JDK1.4,
    but it failed. Why is it so? Now when I go to some websites designed by javascript, the Internet Explorer suddenly closed by itself. How can I solve the problem? Please help! Thank you!

    Hi,
    I got the same problem, 1st question, running the application on win NT. Is there anybady there who can help us!!!??????????

  • HT5787 I forget my security question pls help me

    Pls I need your help I forget my answer of security questions what I do ?

    Alternatives for Help Resetting Security Questions and/or Rescue Mail
         1. If you have a valid rescue email address, then use this procedure:
             Rescue email address and how to reset Apple ID security questions.
         2. Fill out and submit this form. Select the topic, Account Security. You must
             have a Rescue Email to use this option.
         3. This is the only option if you do not already have a valid Rescue Email.
             These are telephone numbers for contacting Apple Support in your country.
             Apple ID- Contacting Apple for help with Apple ID account security. Select
             the appropriate country and call. Ask to speak to the Account Security Team.
    Note: If you have already forgotten your security questions, then you cannot
             set up a rescue email address in order to reset them. You must set up
             the rescue email address beforehand.
    Your Apple ID: Manage My Apple ID.
                             Apple ID- All about Apple ID security questions.

  • Firewall question -pls help

    okay - so i was reading about system profiler today and opened it and clicked down through the various catogories then I come to Firewall- and it reads
    "Firewall Settings:
    Mode: Allow all incoming connections"
    Now this rings alarm bells - I thought my firewall was on. I go to system preferences and look in Internet& Network> Sharing as this is where (in previous operating systems) I remembered the firewall was set - except it isn't anymore. All the sharing boxes are unticked. I go into security and there is Firewall. "allow all incoming connections" is ticked.
    1) This is presumambly where i turn the firewall on or off, right?
    2) Allow Only Essential services? What does this mean - the firewall is on? what constitutes an essential service?
    3) Hypothetically could my computers privacy been compromised?
    4) Has my firewall potentially been like off since i upgraded to leopard?
    Am feeling a bit stupid right now. Any help graciously accepted!

    No such thing as stupid questions...
    -This will take you trough the basic settings done on a mac to secure it:
    In System preferences go to Security > Firewall, the default setting is "Allow all incoming", this does not compromise your privacy, only that Mac OS X will decide what it needs. I´d go for "allow only essential services" then press "Advanced", from the drop down choose "Enable Firewall Logging" and "Enable Stealth Mode".
    In the Sharing pane make sure no boxes are checked.
    Thats the basics, if you wanna secure your mac in such a way that it would make Fort Knox look like a 7/11 go here for further tips :
    http://www.macshadows.com/kb/index.php?title=HardeningMac_OSX
    ....but this might be a bit over the edge for the normal user
    Best o´luck

  • Newbie question pls help!

    hey new to java and struggling writing my first program cant get rid of this error any ideas?
    The error is:- symbol : method StringValue ()
    location: class java.lang.String
    String newColour = (colourInput.getText()).StringValue());
    please help should be easy if you know what ur doin but i dont and its drivin me crazy

    I think yawmark is in broken-record mode today. Not just today. I keep a fairly large file of
    cut-n-paste responses accumulated while addressing
    the same issues over and over and over.... I'm not at work today, so I have a lot of time to hang out here (too cold to do anything outside), and that particular response about spelling things out just seemed to pop up a lot today (no doubt caused by the posters who popped up today). A file of cut-and-paste responses is definitely a handy thing to have around here...I don't have such a file myself...I only just started here a couple of months ago, but the questions do indeed get repetitive! My cell phone only receives SMS messages--it doesn't have the capability to send them--so I don't write any SMS messages. Even if I did, I can't imagine why people think it is okay to abbreviate everything here into SMS-speak.
    yawmark, good luck on your test! Thanks!!!You're welcome!

  • MSI-6585 (648 MAX) instant restart issues questions pls help......

    Hi, i figured after months of specualation i would try to figure out what the hell is wrong with my pc.  12months ago a bought a MS-6585 648 MAX mobo and a P4 2.53ghz with 2x Samsung DDR 333 (PC2700) ram.  I play many games on my pc it seems when playing Counter-Strike + PlanetSide results in random instant restarts.  Occasionaly it will just hang the system but mainly instant reset of the system.  My cpu temp ranges from 35 48 max approx.  
    I've tried switching my ram to different slots and so on refit everything but with no luck.  I just have a very unreliable computer atm.  I've reformated plenty of times but with no joy, the odd thing is its random somtimes my pc will not crash or reset it self so this makes it very difficult to figure out what the hell is going on :S
    If you have more questions perhaps i can answer them - and give you more info that i have forgotten.
    Here are somethings that might be useful:
    MS-6585 648 MAX mobo
    Pentium 4 (northwood) 2,53ghz 533
    Samsung DDR 333 (PC2700)
    Gigabyte Maya II Radeon 9700Pro (running in agp 8x)
    Sound Blaster Audigy 2 Platinum
    Bios settings: (things ive changed)
    Turned onboard sound off than auto
    AGP Apeture size  128
    I have 32bit transfer mode running for hdds
    I have S.M.A.R.T. enabled
    (next week end i will have another 512 ram stick to try just incase its my ram but i have done the intel ram checker and it didn't find any problems)
    Any help would be greatly appreciated pls ask any things ive missed and anything else u would need to know.  I really want to sort this out as you can imagine its not very nice having a pc that can randomly crash when u do not expect it.

    Overclocking is typically limited by one of 3 factors, assuming you have sufficient power:
    1. Memory won't operate past a certain speed, so you run at a different ratio or buy faster memory.
    2. Temperature, so you need to add non-stock cooling or better case ventilation or water cooling, depending on how far you want to go
    3. CPU - At some point the CPU won't run any faster.
    Leave the CPU voltage at Auto. You should only need to raise it if you get into extreme overclocking.
    As for the size of the power supply, if you stay with Intel Northwood with an ATX board on your next upgrade, an Enermax 465, Antec 480, or something similar (should cost around $80-100US) would get good choices. If you plan on going with a Prescott on an ATX board, I would look at going to a 550W supply.
    Personally, I thing the next 12 months is shaping up to be a real headache in making upgrade decisions in the Intel world. Intel have indicated their next generation of boards will be BTX without AGP support. This looks like an upgrade could mean new case, possibly power supply, video card and possibly ram. I am hoping that companies like MSI will produce a transitional product that allows new processors and chip sets on an atx board. If that doesn't happen I see a lot of people switching to AMD.

  • Problems with async callback with the BPEL Java API (Urgent- pls help)

    Hi,
    I have an async BPEL process and I invoke it form a JSP page using BPEL java API.
    I have followed the tutorials and docs at:
    $SOA_HOME/bpel\samples\tutorials\102.InvokingProcesses\rmi\com\otn\samples\async
    I can inititiate successfully the process, but when I try to get the result using getResult() or getField(String fieldName) methods I get the error:
    Oct 2, 2007 2:35:16 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    java.lang.ExceptionInInitializerError
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoaderObjectInputStream.java:33)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:856)
         at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:287)
         at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:242)
         at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:224)
         at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152)
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
         at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.util.MissingResourceException: Can't find bundle for base name com.collaxa.cube.i18n.exception_cube, locale en_US
         at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
         at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)
         at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)
         at com.collaxa.cube.CubeException.getResourceBundle(CubeException.java:142)
         at com.collaxa.cube.CubeException.<clinit>(CubeException.java:82)
         ... 17 more
    07/10/02 14:35:16 java.lang.ClassCastException: java.util.MissingResourceException
    07/10/02 14:35:16      at com.oracle.bpel.client.delivery.ext.async.thread.AsyncInstanceWatchdog.run(AsyncInstanceWatchdog.java:152)
    I check for the result only after I have checked that the instance is closed (completed or faulted) by using IInstanceHandle:getState() and InstanceHandle.STATE_CLOSED_COMPLETED, or IInstanceHandle.STATE_CLOSED_FAULTED
    I would like to add that so far I had no problems with invocation and geting result of sync BPEL processes. I do not what is missing for async processes.
    Any kind of help is appreciable.
    Thanks and best regards,
    Evanela

    Hi again,
    i managed to solve the problem:) Totally stupid.. the process variable name was not specified correctly..., but more stupid sounds the error message:))))
    Best Regards,
    Evanela

  • About Memory Leak in JAVA Any body pls help me

    Hi All,
    In our application, with JAVA we are using c, c++ native methods also.
    The problem is, Eventhough the application is in idle state, the Virtual Memory occupation is getting increased. For 24 hours, 30 MB is increased, while the application is in idle state.
    Is there any possiblity, this much memory leak can happen in JAVA. or it is from Native c side..
    I would appreciate anybody' s help.

    Thanks
    I am using JProfiler for that. I can observe what kind of objects not getting freed and the size of memory it is taking. and i observed thro JProfiler, that is only 16 kb of memory leak is happening. Can Any body who is well known about JProfiler help me. Can i differentiate the memory leak from JAVA and Native C side using JProfiler.
    Any help would be appreciated.

  • Clarity required on these questions pls help?

    HI ,
    Need your help in solving these questions, these are questions asked in during interviews
    a) Dyamic actions, how to create a customer specific dynamic action , specify configured fields and rules?
    b) how to create Customer specific infotype, , please explain with any example with which are the fields you have created
    c)    Msn 10, 20, 30
    d) Revision  infotypes
    e) What are the  infotypes which cannot be enhanced
    f) What is log, How can we cancel and edit it?
    g) What is Ap/b
    h) Which is Default feature for wage types
    i) What are Infosets
    Thanks and Regards
    j) Define Benefit area

    You can do as suggested already and use interface nodes and cross component mapping; but that is all really not necessary.  It creates a situation where you calling application is too dependent upon the freely programmed input help.  You want to try to avoid the situation where the calling application needs code or mappings to communicate with the input help.
    That is easy to do because the framework passes all the information you need into the freely programmed input help via the value_help_listener object. 
    Part of the Freeley Programmed Input Help Component should be the component interface IWD_VALUE_HELP.  This comes with a component controller method called SET_VALUE_HELP_LISTENER.  This allows your freely programmed value help to capture this object called listener of type IF_WD_VALUE_HELP_LISTENER. I generally just store it awa into a component controller attribute.
    With this listerner object you have direct access to the context attribute in the calling component. You can query information about the calling UI element and of course set values directly back into it.  The listener is a hugely helpful object and should be the way you interact with the calling component whenever possible.  Here is small example:
      set single attribute
      wd_this->value_help_listener->f4_context_element->set_attribute(
      exporting
        name = wd_this->value_help_listener->f4_attribute_info-name
        value = l_time

Maybe you are looking for

  • MSI GeForce 6800 256MB PCI-E , NX6800-TD256E

    I have seen this card for sale and it costs about 100€ less than other cards from the 6800gt series. http://www.komplett.se/k/ki.asp?sku=305437&cks=PRL (swedish site) and ive seen this card on many other sites as well, and they say that this is the s

  • [Solved] Haskell/Xmonad Upgrade Issues

    It seems that the testing version of haskell-x11-xft requires the non-testing version of haskell-x11. Further, installing xmonad-contrib from testing seems to want to install the non-testing version of xmonad and haskell-x11-xft. It seems to be one v

  • Dynamic tables with XML schema binding

    Hello, I'm currently fighting a strange issue dealing with a complex dynamic form. This form contains multiple dynamic tables to which the user may add new lines or delete lines that are no longer needed. This is being implemented using the instanceM

  • Response Content Type

    howdy, I'm generating a Microsoft Excel document from a jsp, givin that to user to update it and then uploading to system. when generating xls i first used : <%@ page contentType = "application/vnd.ms-excel; charset=UTF-8" %>but IE couldn't recognize

  • Canon CAPT 355 doesn't work for Mountain Lion

    SInce I installed Mountain Lion onto my MacBookPro I can't print to my Canon LBP5050N. I've install CAPT 355 that Canon claims will work for Mountain Lion but it doesn't work. I've tried uninstalling all my older driver and installing CAPT 355 but th