 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Infiliset Guest
|
Posted: Wed Apr 19, 2006 7:12 pm Post subject: Problema con i thread |
|
|
Ciao a tutti, ho un problema con i thread. Sto realizzando in java un web
server e devo dare la possibilità all'utente di avviare o fermare il thread
del server web. Nel far partire il thread non ho nessun problema (istanzio
un oggetto Thread a cui passo l'oggetto Runnable e poi invoco il metodo
start): il problema è sullo stop (devo dare la possibilità di fermarlo e di
riavviarlo quante volte vuole l'utente). Ho provato il metodo stop ma in
Java 5 è deprecated, ho provato il metodo destroy ma anche lui è deprecated
e mi ritorna un errore "NoSuchMethodError", ho provato ad assegnare al
thread il valore null ma quando lo riavvio mi da un errore "Address already
in use: JVM_Bind" (infatti, il thread la prima volta apre la porta 80 e poi
non la richiude più in questo caso). Come posso fare per ovviare a questi
problemi? Grazie!!!
Distinti saluti
Matteo |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|