how I can solves this error "address already in use" in NetBeans?

827 views Asked by At

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

1

There are 1 answers

0
Subham On

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.