0

this the port number in the code: 1- enter image description here

2- enter image description here

the output error: java.net.BindException: Address already in use: JVM_Bind

i tried a lot of port number but it is the same error also I try to kill task like this: enter image description here

in this pic I kill the LISSINING task and it is say the Access is denied. so I kill another task witch is ESTABLISHED and is success termination and write it in the code but still the same error enter image description here

I really need help about this problem I try everything I search a bout it in google for this and it doesn't work. // sorry for my bad English

slana
  • 1
  • 2
  • Some other process already opened a listening port on you machine. Either kill that process (might even be a previous run of you application) or pick a different port. You should also note that port 8080 is well-known for being used by the tomcat application server. – f1sh Jun 10 '21 at 17:58
  • Does this answer your question? [How do I resolve the "java.net.BindException: Address already in use: JVM\_Bind" error?](https://stackoverflow.com/questions/12737293/how-do-i-resolve-the-java-net-bindexception-address-already-in-use-jvm-bind) – Alessandro Baffa Jun 11 '21 at 06:08

1 Answers1

1

The reason why you're getting the error is clearly defined in the error statement itself. You're getting the error because some other process is already using that. It might be instance of previous run which is already running in background and listening to port 8080. If you're unable to kill that previous run, better close your NetBeans and restart your computer. However, if the error still persists, that means some other process(not your program) is already listening to port 8080. It can be tomcat, Oracle XE or so on, which you can terminate and then run your program again. Or you can also use some other port to run your application.

Subham
  • 151
  • 1
  • 5