Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Java
  4. tcp server applet

tcp server applet

Scheduled Pinned Locked Moved Java
javawpfwcfsysadminhelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rareseu
    wrote on last edited by
    #1

    Hy guys ! i'm having a problem getting my tcp server applet on it's feet, the problem is that it doesn't get past instantiating a socket, if i instatiate it with port nr 80 it throws an exception ( Address already in use: JVM_Bind ), with other ports it just locks up at the "binding port" part

        ServerSocket server;
        int port= Integer.parseInt(portNumber.getText());//port number's a text field
        status.setText("Starting server..\\n");//status is a text area
    
        try {
            status.append("Binding to port " + port + ", please wait  ...\\n");
            server = new ServerSocket(port);
        } catch (IOException ioe) {
            status.append("EROARE la creearea socketului\\nEXCEPTIE:
    

    "+ioe.getMessage()+"\n");
    return;
    }

    does anybody have a clue why this happens?

    R Z N 3 Replies Last reply
    0
    • R rareseu

      Hy guys ! i'm having a problem getting my tcp server applet on it's feet, the problem is that it doesn't get past instantiating a socket, if i instatiate it with port nr 80 it throws an exception ( Address already in use: JVM_Bind ), with other ports it just locks up at the "binding port" part

          ServerSocket server;
          int port= Integer.parseInt(portNumber.getText());//port number's a text field
          status.setText("Starting server..\\n");//status is a text area
      
          try {
              status.append("Binding to port " + port + ", please wait  ...\\n");
              server = new ServerSocket(port);
          } catch (IOException ioe) {
              status.append("EROARE la creearea socketului\\nEXCEPTIE:
      

      "+ioe.getMessage()+"\n");
      return;
      }

      does anybody have a clue why this happens?

      R Offline
      R Offline
      rareseu
      wrote on last edited by
      #2

      i'm uploading the server class and test web page if it will help sort this out here it is : [url]http://uploading.com/files/XQ0TGHPT/server.rar.html\[/url\]

      1 Reply Last reply
      0
      • R rareseu

        Hy guys ! i'm having a problem getting my tcp server applet on it's feet, the problem is that it doesn't get past instantiating a socket, if i instatiate it with port nr 80 it throws an exception ( Address already in use: JVM_Bind ), with other ports it just locks up at the "binding port" part

            ServerSocket server;
            int port= Integer.parseInt(portNumber.getText());//port number's a text field
            status.setText("Starting server..\\n");//status is a text area
        
            try {
                status.append("Binding to port " + port + ", please wait  ...\\n");
                server = new ServerSocket(port);
            } catch (IOException ioe) {
                status.append("EROARE la creearea socketului\\nEXCEPTIE:
        

        "+ioe.getMessage()+"\n");
        return;
        }

        does anybody have a clue why this happens?

        Z Offline
        Z Offline
        zhaonameloc
        wrote on last edited by
        #3

        I couldn't say why a port might lock up, but if you're using windows you could run the "netstat -a -b" command with arguments to determine if the ports you are selecting are in use. The -b parameter will also tell you what process is using the port in question. At a minimum, that will tell you if a port you are trying to use is available or not. If you have an appserver installed and running, (or even skype), one of them may be using port 80.

        1 Reply Last reply
        0
        • R rareseu

          Hy guys ! i'm having a problem getting my tcp server applet on it's feet, the problem is that it doesn't get past instantiating a socket, if i instatiate it with port nr 80 it throws an exception ( Address already in use: JVM_Bind ), with other ports it just locks up at the "binding port" part

              ServerSocket server;
              int port= Integer.parseInt(portNumber.getText());//port number's a text field
              status.setText("Starting server..\\n");//status is a text area
          
              try {
                  status.append("Binding to port " + port + ", please wait  ...\\n");
                  server = new ServerSocket(port);
              } catch (IOException ioe) {
                  status.append("EROARE la creearea socketului\\nEXCEPTIE:
          

          "+ioe.getMessage()+"\n");
          return;
          }

          does anybody have a clue why this happens?

          N Offline
          N Offline
          Nagy Vilmos
          wrote on last edited by
          #4

          You might have something else on port 80? This is the main port used by HTTP, so if you've got another web-service it may well be in use. Try running it up pointing to a DIFFERENT port and see what happens.


          Panic, Chaos, Destruction. My work here is done.

          R 1 Reply Last reply
          0
          • N Nagy Vilmos

            You might have something else on port 80? This is the main port used by HTTP, so if you've got another web-service it may well be in use. Try running it up pointing to a DIFFERENT port and see what happens.


            Panic, Chaos, Destruction. My work here is done.

            R Offline
            R Offline
            rareseu
            wrote on last edited by
            #5

            [quote]You might have something else on port 80? This is the main port used by HTTP, so if you've got another web-service it may well be in use. Try running it up pointing to a DIFFERENT port and see what happens. [/quote] allready tried , it locks up at the ServerSocket instantiation, and starting today it lock up on 80 too, i have absolutelly no clue what i'm doing wrong

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups