Simple Java Network Programming Question

import java.io.*;
import java.net.*;
public class ConsumerClient
     private static InetAddress host;
     private static final int PORT = 1234;
     private static Socket link;
     private static Resource item;
     private static BufferedReader in;
     private static PrintWriter out;
     private static BufferedReader keyboard;
     public static void main(String[] args)     throws IOException
          try
               host = InetAddress.getLocalHost();
               link = new Socket(host, PORT);
               in = new BufferedReader(new InputStreamReader(link.getInputStream()));
               out = new PrintWriter(link.getOutputStream(),true);
               keyboard = new BufferedReader(new InputStreamReader(System.in));
               String message, response;
               do
                    System.out.print("Enter 1 for resource or 0 to quit: ");
                    message = keyboard.readLine();
     if(message.equals("1")**
                         item.takeOne();**
                    //Send message to server on
                    //the socket's output stream...
                    out.println(message);
                    //Accept response from server on
                    //the socket's input stream...
                    response = in.readLine();
                    //Display server's response to user...
                    System.out.println(response);
               }while (!message.equals("0"));
          catch(UnknownHostException uhEx)
               System.out.println("\nHost ID not found!\n");
          catch(IOException ioEx)
               ioEx.printStackTrace();
          finally
               try
                    if (link!=null)
                         System.out.println("Closing down connection...");
                         link.close();
               catch(IOException ioEx)
                    ioEx.printStackTrace();
}

georgemc wrote:
BlueNo yel-- Auuuuuuuugh!
But the real question is: What is the air-speed velocity of an unladen swallow?

Similar Messages

  • Desperately need Java network programming help!!!

    I need to make a Distributed File Sharing System (DFSS) using java language. The system should not make use of the central file server. The system should coordinate the concurrent access of files over the distributed environment. Caching may be used to enhance the system performance.
    It is basically network programming.
    Does any one have any idea how to make the DFSS. If you do please help!!!
    thank you in advance for you help
    cheers

    well, you're getting somewhere I guess. My original answer was intentionally vague because your original question was so vague. These fora are no good for asking questions like "how do I implement a distributed file system", they are good for asking things like "the following line(s) of code generate the following condition I didn't expect, rather I expected this condition, could someone tell me what is going on?" or something of similar specificity.
    So you are now asking how to, for instance, check to see if a text file is being shared. This is still too vague, but it's better than "how do I write a file sharing system". If you are feeling particularly industrious, go look at a project JXTA at http://www.jxta.org/ - it's open source, you can look at the code. Of course, if you're brand new, this might not help. In fact, not to discourage you, but if you're that new, this is not the project to be doing.
    Good Luck
    Lee

  • Where can I find knowledge about "java network programming"?

    I am interested in network programming in java. I need some documents and I don't where can I find it?

    http://java.sun.com/docs/books/tutorial/networking/index.html

  • Advanced Java network programming

    I have been playing around with the various Server/Client tutorials not only on this site but many others for some time now. Whilst I have learnt a great deal I am now trying to further my knowledge.
    The problem is, there does not seem to be a great deal of information on the Web realting to the advanced network programming stuff. Obviously not having a network of my own I am now interested in learning various ideas using the Internet. Obviously not being a prat about it and port scanning other computers or anything like that.
    I was hoping someone reading this might have a suggestion about where to go next in my learning curve. Also if anyone could recommend any good sources of info for this type of stuff.
    I've currently got three telephone lines in, each line with a seperate Internet account set-up. What I want to do is have them all connected to the web at once and then attempt various things, such as connection, that type of stuff.
    Help really appreciated.
    Thanks,
    kP

    Maybe I'm catching the wrong vibe here, but it seems to me that you need to learn a bit about networking in general, before you worry about how it's all done in java. I would suggest a good basic computer networking text book. After you have good understanding of how different networks works, packet structure of the various common protocols, IP, TCP over IP and UDP over IP. I think the java code to implement it all will just fall into place. my AIM SN is SpinozaQ if you would like a book suggestion. I don't have any names going through my head right now.

  • Simple network programming, question ...

    Hello
    I'm a beginning learning student from the Netherlands.
    My clientcode looks like this:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class ConsumerClient
    private static InetAddress host;
    private static final int PORT = 1234;
    public static void main(String[] args)
    try
    host = InetAddress.getLocalHost();
    catch(UnknownHostException uhEx)
    System.out.println("\nHost ID not found!\n");
    System.exit(1);
    sendMessages();
    private static void sendMessages()
    Socket socket = null;
    try
    socket = new Socket(host, PORT);
    Scanner networkInput = new Scanner(socket.getInputStream());
    PrintWriter networkOutput = new PrintWriter(socket.getOutputStream(),true);
    //Set up stream for keyboard entry...
    Scanner userEntry = new Scanner(System.in);
    String message, response;
    do
    System.out.print("Enter 1 for resource or 0 to quit: ");
    message = userEntry.nextLine();
    networkOutput.println(message);
    if (message.equals("0") || message.equals("1"))
    response = networkInput.nextLine();
    System.out.println("\nSERVER> " + response);
    else
    System.out.println("*** Invalid! ***\n");
    while (!message.equals("0"));
    catch(IOException ioEx)
    ioEx.printStackTrace();
    finally
    try
    System.out.println("\nClosing connection...");
    socket.close();
    catch(IOException ioEx)
    System.out.println("Unable to disconnect!");
    System.exit(1);
    I've also created a server.
    When I start the client server program, the following error occurs at line:
    response = networkInput.nextLine();
    NoSuchElementException:
    No line found (in java.util.Scanner)
    does someone know how to solve this problem?
    thanks in advance
    greetings
    Bastiaan

    I think the socket you're connecting to ( server ) didn't send data to your socket. So that the method networkInput.nextLine(); returns null and the exception occured

  • Simple Java 3D program’s CPU Usage spikes to up to 90 percent!

    Hi, everyone. I’m completely new to Java 3D and I’m toying around with basic program structure right now. My code is based off of that in the first chapter on 3D in Killer Game Programming in Java. I removed most of the scene elements, replacing them with a simple grid, Maya style. (Yes, I’m starting off small, but my ambitions are grand – I intend on creating a polygonal modeling and animation toolset. After all, the Maya PLE is dead – damn you, Autodesk! – and I just plain dislike Blender.) I implement a simple OrbitBehavior as a means for the user to navigate the scene. That part was basically copy and paste from Andrew Davison’s code. The mystery, then, is why the program’s framerate drops below 1 FPS and its CPU Usage spikes to up to 90 percent, according to the Task Manager, when I tumble the scene. I’d appreciate anyone taking the time to look at the code and trying to identify the problem area. (I’ve undoubtedly missed something totally newbish. -.-) Thank you!
    (Also, I had the worst possible time wrestling with the posting process. Is anyone else having trouble editing their posts before submitting them?)
    import java.awt.*;
    import javax.swing.*;
    public class MAFrame
        public static final Dimension SCREEN_SIZE = Toolkit.getDefaultToolkit().getScreenSize();
        public MAFrame ()
            System.out.println("Initializing...");
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch (Exception e) {
                e.printStackTrace();
            JFrame frame = new JFrame ("Modeling and Animation");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            MAViewPanel panel = new MAViewPanel ();
            frame.getContentPane().add(panel);
            frame.pack();       
            frame.setLocation(((int)SCREEN_SIZE.getWidth() / 2) - (frame.getWidth() / 2),
                              ((int)SCREEN_SIZE.getHeight() / 2) - (frame.getHeight() / 2));     
            frame.setVisible(true);
    import com.sun.j3d.utils.behaviors.vp.*;
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.universe.*;
    import java.awt.*;
    import javax.media.j3d.*;
    import javax.swing.*;
    import javax.vecmath.*;
    public class MAViewPanel extends JPanel
        public static final int GRID_SIZE = 12;
        public static final int GRID_SPACING = 4;
        public BoundingSphere bounds;
        public BranchGroup sceneBG;
        public SimpleUniverse su;
        public MAViewPanel ()
            GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
            Canvas3D canvas3D = new Canvas3D (config);               
            canvas3D.setSize(600, 600);
            add(canvas3D);
            canvas3D.setFocusable(true);
            canvas3D.requestFocus();
            su = new SimpleUniverse (canvas3D);
            createSceneGraph();
            initUserPosition();
            orbitControls(canvas3D);
            su.addBranchGraph(sceneBG);
        public void createSceneGraph ()
            sceneBG = new BranchGroup ();
            bounds = new BoundingSphere (new Point3d(0, 0, 0), 1000);
            // ambient light
            Color3f white = new Color3f (1.0f, 1.0f, 1.0f);
            AmbientLight ambientLight = new AmbientLight (white);
            ambientLight.setInfluencingBounds(bounds);
            sceneBG.addChild(ambientLight);
            // background
            Background background = new Background ();
            background.setColor(0.17f, 0.65f, 0.92f);
            background.setApplicationBounds(bounds);       
            sceneBG.addChild(background);
            // grid
            createGrid();
            sceneBG.compile();
        public void createGrid ()
            Shape3D grid = new Shape3D();
            LineArray lineArr = new LineArray (GRID_SIZE * 8 + 4, GeometryArray.COORDINATES);
            int offset = GRID_SIZE * GRID_SPACING;
            // both sides of the grid plus the middle, done for both directions at once (each line defined by two points)
            for (int count = 0, index = 0; count < GRID_SIZE * 2 + 1; count++) {
                // vertical, left to right
                lineArr.setCoordinate(index++, new Point3d (-offset + (count * GRID_SPACING), 0, offset));  // starts near
                lineArr.setCoordinate(index++, new Point3d (-offset + (count * GRID_SPACING), 0, -offset)); // ends far
                // horizontal, near to far
                lineArr.setCoordinate(index++, new Point3d (-offset, 0, offset - (count * GRID_SPACING))); // starts left
                lineArr.setCoordinate(index++, new Point3d (offset, 0, offset - (count * GRID_SPACING)));  // ends right
            grid.setGeometry(lineArr);
            sceneBG.addChild(grid);
        public void initUserPosition ()
            ViewingPlatform vp = su.getViewingPlatform();
            TransformGroup tg = vp.getViewPlatformTransform();
            Transform3D t3d = new Transform3D ();
            tg.getTransform(t3d);
            t3d.lookAt(new Point3d (0, 60, 80), new Point3d (0, 0, 0), new Vector3d(0, 1, 0));
            t3d.invert();
            tg.setTransform(t3d);
            su.getViewer().getView().setBackClipDistance(100);
        private void orbitControls (Canvas3D c)
            OrbitBehavior orbit = new OrbitBehavior (c, OrbitBehavior.REVERSE_ALL);
            orbit.setSchedulingBounds(bounds);
            ViewingPlatform vp = su.getViewingPlatform();
            vp.setViewPlatformBehavior(orbit);     
    }

    Huh. A simple call to View.setMinimumFrameCycleTime() fixed the problem. How odd that there effectively is no default maximum framerate. Of course simple programs like these, rendered as many times as possible every second, are going to consume all possible CPU usage...

  • How to run the simple java card program in eclipse?

    I am trying to run a simple HelloWorld program in eclipse 3.5 having java card development kit 2.2 installed in it.
    Firstly,I go to the JCWDE tab and press start..then when trying to deploy that package its giving me error like " com.hw.HelloWorld: unsupported class file format of version 50.0." can any one help me in this what is this error???n how to resolve n run this program..

    Hi,
    It is because the converter works on byte code and it only supports a subset of the Java language (see the JC specifications). It is kind of like compiling you code on Java 6 and trying to run it on Java 5. The JCDK outlines the required compiler version.
    Cheers,
    Shane

  • Simple Java probablitity program?

    Could anyone type up a simple probability program?
    For example...
    a has a chance of being picked .44
    b has .22
    c has .30
    d has .04
    All added equals 1.00
    So, how would I print a string of 50 chars, a through d, with those probabilities/chances?

    javalavalamp wrote:
    Hell, the last time I ever posted was Sept...
    Profile: http://forums.sun.com/profile.jspa?userID=1052864
    I'm not talking about here, I'm talking about posting the same question in multiple forums. Again, this will frustrate anyone who tries to help you only to find out later that the same answer was given hours ago in a cross-posted thread.
    So again, what other fora did you post this in?

  • Simple Java Mail program

    Hi, i have written a simple code to send mail thru java... but it doesnt work... control never comes back after stepping in to the send function.. no exceptions.. no mails sent.. nothin.. cud someone hel me out??
    sometimes i get this exception after a long time:
    javax.mail.MessagingException: Exception reading response;
    nested exception is:
         java.net.SocketException: Connection reset
         at com.sun.mail.smtp.SMTPTransport.readServerResponse(Unknown Source)
         at com.sun.mail.smtp.SMTPTransport.openServer(Unknown Source)
         at com.sun.mail.smtp.SMTPTransport.protocolConnect(Unknown Source)
         at javax.mail.Service.connect(Unknown Source)
    here is the code snippet:
    public void mySend() throws Throwable
    Properties p = System.getProperties();
    p.put("mail.transport.protocol", "smtp");
    p.put("mail.smtp.host", "smtp.gmail.com");
    p.put("mail.smtp.port", "465");
    p.put("mail.smtp.starttls.enable", "true");
    p.put("mail.smtp.auth", "true");
    Authenticator authenticator = new Authenticator()
    protected PasswordAuthentication getPasswordAuthentication()
    return new PasswordAuthentication("vicky.bhandari", "password");
    Session session = Session.getInstance(p, authenticator);
    SMTPMessage message = new SMTPMessage(session);
    InternetAddress fromAddress = new InternetAddress("[email protected]");
    InternetAddress toAddress = new InternetAddress("[email protected]");
    message.setSubject("Test");
    message.addRecipient(Message.RecipientType.TO, toAddress);
    message.setFrom(fromAddress);
    SMTPTransport.send(message);
    Could someone please help me out??

    Hey,
    Im currently having problems with the code below:
    public class SendMail {
         private static final String SMTP_HOST_NAME = "smtp.gmail.com";
         private static final String SMTP_AUTH_USER = "[email protected]";
         private static final String SMTP_AUTH_PWD = "**************";
         public void sendMail(String recipients[ ], String subject, String message , String from) throws MessagingException{
         boolean debug = false;
              Properties props = System.getProperties();
              props.put("mail.transport.protocol", "smtp");
              props.put("mail.smtp.host", SMTP_HOST_NAME);
              props.put("mail.smtp.port", "465");
              props.put("mail.smtp.starttls.enable", "true");
              props.put("mail.smtp.auth", "true");
              Authenticator auth = new SMTPAuthenticator();               
              Session session = Session.getDefaultInstance(props, auth);
              session.setDebug(debug);
              Message msg = new MimeMessage(session);
              InternetAddress addressFrom = new InternetAddress(from);
              msg.setFrom(addressFrom);
              InternetAddress[] addressTo = new InternetAddress[recipients.length];
         for (int i = 0; i < recipients.length; i++)
         addressTo[i] = new InternetAddress(recipients);
         msg.setRecipients(Message.RecipientType.TO, addressTo);
         msg.setSubject(subject);
         msg.setContent(message, "text/plain");
         Transport tr = session.getTransport("smtp");
         tr.connect(SMTP_HOST_NAME, SMTP_AUTH_USER, SMTP_AUTH_PWD);
         msg.saveChanges(); // don't forget this
         //tr.sendMessage(msg, msg.getAllRecipients());
         tr.close();
         tr.send(msg);
         public class SMTPAuthenticator extends Authenticator
         public PasswordAuthentication getPasswordAuthentication()
         String username = SMTP_AUTH_USER;
         String password = SMTP_AUTH_PWD;
         return new PasswordAuthentication(username, password);
    the error i am receiving is:
    java.lang.NoClassDefFoundError: javax/mail/Authenticator
         java.lang.Class.getDeclaredConstructors0(Native Method)
         java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         java.lang.Class.getConstructor0(Unknown Source)
         java.lang.Class.newInstance0(Unknown Source)
         java.lang.Class.newInstance(Unknown Source)
         org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
         org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:292)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    If anyone has any ideas it will be much appreciated
    Thanks in Advance
    Andy

  • Assistance needed with simple java vocabulary program

    I need to construct a java program that can read in text documents. The program must then display an image and prompt the user to input the word that best-describes the image. If the user is incorrect, however, the program must tell the user how many letters the word has and what the first letter is.

    * @(#)words.java
    * @author
    * @version 1.00 2010/6/8
    import javax.swing.*; //class necessary for GUI
    import java.awt.*; //class necessary for GUI
    import java.awt.event.*; //class necessary for GUI
    import java.util.ArrayList; //import ArrayList class
    public class Words implements ActionListener { //ActionListener is required for the button to function
    //initialize values that will be used in other methods
    int noLetters = 0; //number of letters
    String[] words; //words
    JTextField textNL; //inputs number of letters
    ArrayList<JLabel> list;
    public static void main (String[] args) {
         Word s = new Word(); //this is so you are not referencing non-static methods from a static context (main must be static, but the constructor is not)
         s.go();} //runs following method as a method of the object Words s
    public void go() {
         //build GUI
              JFrame frame = new JFrame(); //intializes frame, this is essentially the GUI
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //sets program to stop when frame is exited
              JTabbedPane pane = new JTabbedPane(); //creates a new tabbed panel
              JPanel panel1 = new JPanel(); //creates input panel
              JPanel panel2 = new JPanel(); //creates output panel
              textNL = new JTextField("", 15); //initializes the text field of the same name from the beginning of the program
              JButton button = new JButton("Enter"); //This button will input the data you have entered into the text fields
              button.addActionListener(this); //tells the button to do stuff when it is clicked (see actionPerformed())
              panel1.setLayout(new BoxLayout(panel1, BoxLayout.Y_AXIS)); //Sets frame to display labels and text fields arranged vertically
              panel1.add(new JLabel("Number of Letters")); //this label tells you what the text field is prompting for
              panel1.add(textND); //adds text field to input panel
              panel1.add(BorderLayout.SOUTH, button); //adds button to input panel
              pane.add("Enter Data", panel1); //adds input panel to tabbed panel
              pane.add("Words", panel2); //adds output panel to tabbed panel
              frame.getContentPane().add(pane); //adds tabbed panel to frame
              frame.setSize(400, 400); //sets GUI intial dimensions
              frame.setVisible(true); //displays GUI
              //end of GUI build
    }

  • Help needed for java network programming

    How can I implement a GUI as a client in my server-client program.
    I have a window(JFrame)having one Textfield and a "Send" button.
    My requirement: While execution, the GUI should start as a client, and whatever textinput I will give to the Textfield, that should be printed in the server program.
    So, how can I implement a GUI window as a client.
    If any of U have idea,Please let me know soon.
    Regards.

    Well, the client part and the GUI part are separate. The button simply calls a send method.
    As for the networking, you can just use a Socket and a ServerSocket on the client and server, respectively. Then, wrap a PrintStream around one side and a BufferedReader(InputStreamReader()) around the other. You'll be able to talk back and forth once your connection is established; it's up to you to read from the BufferedReader and use the results on the server side.

  • Java networking program

    Dear Sir,
    I amstudying in Deakin International for MIT course and my main subject is java networkprogramming but i feel it diffcuilt.We have diferent assignments so please send me some tutorials or notes based on this subject please also some programming codes also based on each topic as it is hard for me
    thankyou

    http://java.sun.com/docs/books/tutorial/

  • Java network programming explanation

    I have refer to following code, i not so understand, can somebody explain it to me? Thanks
    try {
    e = NetworkInterface.getNetworkInterfaces();
    while (e != null && e.hasMoreElements()) {
    NetworkInterface net = (NetworkInterface) e.nextElement();
    Enumeration enum = net.getInetAddresses();
    while (enum.hasMoreElements()) {
    InetAddress inet = (InetAddress) enum.nextElement();
    new FileServerThread(inet);
    catch (SocketException ex) {
    }

    try {
        // get an Enumeration of network interfaces
        e = NetworkInterface.getNetworkInterfaces();
        // iterate through the Enumeration
        while (e != null && e.hasMoreElements()) {
            // retrieve the next individual NetworkInterface object from
            // the enumeration
            NetworkInterface net = (NetworkInterface) e.nextElement();
            // get the enumeration of InetAddresses from the
            // NetworkInterface
            Enumeration enum = net.getInetAddresses();
            // iterate through the InetAddresses
            while (enum.hasMoreElements()) {
                // get the next InetAddress object from the enumeration
                InetAddress inet = (InetAddress) enum.nextElement();
                // instantiate a new FileServerThread for the given
                // InetAddress
                new FileServerThread(inet);
    // catch any thrown Exception objects
    catch (SocketException ex) {
    } What questions are you having about this pretty basic piece of code?

  • Java Network Programming

    I am trying to make a Third-party chat client an alternative of rediffbol for rediffchat
    * To do this, I downloaded a packet sniffer (Sniphere) and started monitoring the packets sent and received by the original Rediff messenger.*
    * Rediff Bol uses the MSNP protocol to connect...*
    *1. First the client establishes a tcp connection with the DISPATCH server "203.199.83.62 : 1863"*
    *2. then the client sends the DISPATCH server its VERSION and a command so that the dispatch server can send back a list of available notification servers...*
    *3. Then the DISPATCH server sends back the client a list of available NOTIFICATION servers......the client connects there and like this it goes on...*
    I am using Java. I captured the packet 2. where the command the and the version is sent. I sent the exact packet to the server but due to some reason the dispatch server is not sending back the list of NOTIFICATION servers...
    the client.java is attached
    there is a difference of negotiation that is occuring between my prog-server and rediffmessenger-server
    its like this
    pck 1<client-outgoing>: 2<server-incoming> and 3<client-outgoing> which I think is a three way handshaking...its same with my program as the original rediffmessenger
    pck 4: this in case of the rediffmessenger is the command and version<outgoing>...same in my case
    pck5:  this is supposed to be an incoming stream from server 203.199.83.62:1863 which will have the data of available notification servers......WHICH in my case is becoming an outgoing packet from my client<i didnt send anything except the command , refer to client.java> which contains nothing as DATA...and in the later packets the server never sends the list of notification servers...

    import java.net.*;
    import java.nio.*;
    import java.nio.charset.*;
    import java.nio.charset.Charset;
    import java.io.*;
    import java.io.FileOutputStream;
    class client extends Object implements java.io.Serializable
    private static byte[] getBytes (char[] chars)
    Charset cs = Charset.forName ("UTF-8");
    CharBuffer cb = CharBuffer.allocate (chars.length);
    cb.put (chars);
    cb.flip ();
    ByteBuffer bb = cs.encode (cb);
    return bb.array();
    public static void main( String args[] )
    File f2=new File("data.dat");
    int decimal_value;
    char[] extract_char;
    extract_char=new char[2];
    char[] dat;
    byte[] bytes=new byte[19];
    byte[] bytes2=new byte[19];
    String str;
    int count=0;
    dat=new char[19];
    String getloginserver="564552203134204D534E503820435652300D0A"; //The data packet to ask for notification servers(Hex Dump)
    //coverting it into byte array--THIS PART IS WORKING OKAY
    for(int i=0;i<(getloginserver.length()-1);i+=2)
    extract_char[0]=getloginserver.charAt(i);
    extract_char[1]=getloginserver.charAt(i+1);
    str=Character.toString(extract_char[0])+Character.toString(extract_char[1]);
    decimal_value=Integer.parseInt(str, 16);
    dat[count++]=(char)decimal_value;
    count=0;
    bytes=getBytes(dat);
    //for(int j=0;j<30;j++)
    //System.out.print((char)bytes[j]);
    for(int j=1;j<19;j++)
    bytes2[j-1]=bytes[j];
    //converting hex dump to byte array completed
    // bytes2[] is the byte array which contains the command for the server..it has to be sent...
    //establish connection and send
    try
    Socket toServer;
    toServer = new Socket ("65.54.239.80",1863);
    OutputStream os = toServer.getOutputStream();
    os.write(bytes2);
    os.flush();
    catch ( IOException e )
    System.out.println("Cannot write to the server " + e );
    Thats why i didnt post code....its big....

  • Simple Java Bank Program

    Can anyone please help?
    I am looking for a very simple client/server banking Java Application that performs basic function such as view account balance, and being able to deposit and withdraw money from the account.
    Any help would be much appreciated!

    You are asking for an application. I don't think anyone will ever start an open source banking system, because only banks will have an interest in them and they will develop their systems in-house.
    Sorry dude, but you'll have to switch on that brain of yours and do the work yourself.

Maybe you are looking for

  • Iwlist scanning gives: Interface doesn't support sc [solved]

    When I'm trying to scan for all available networks I get: # iwlist eth1 scanning eth1 Interface doesn't support scanning : Operation not supported My wireless card works fine if I set every parameter manually. I'm currently using the orinoco drivers

  • Dumps with errors COMPUTE_BCD_OVERFLOW, COMPUTE_BCD_OVERFLOW

    Hi, We got large no.of dumps with errors COMPUTE_BCD_OVERFLOW, COMPUTE_FLOAT_ZERODEVIDE and BCD_FIELD_OVERFLOW with CX_SY_ARTHEMATIC_OVERFLOW exception in production system causing sapmnt disk space reached 95%.. I don't have idea to resolve this iss

  • Re: Hibernate Dialect error against Firebird 2.1.2 DB via JDBC

    ColdFusion9 ColdFusionBuilder1 on XP Pro Ok, now I'm completely stuck.  After 2 days of configuring CFB9 (and it's Administrator) I was able to, in CFB connect to a Firebird DB in design time using JDBC instead of ODBC.  However, when I try to Run th

  • Powerbook 12 breaks network

    I have a MacBook Pro connected to the Internet through a BT Voyager 2100 wireless router. Everything works fine until my wifes Powerbook 12" is switched on at which point the connection is lost until the powerbook is switched off. Both machines are r

  • Help passing values to graphics

    I am able to create some graphics in a stand-alone app, but I am having some difficulty passing values from one class to a sub class of JPanel. I can create a blank bar graph, the x and y axis, the title and labels, etc, but I need some values from a