+ 1

why it is not run

https://code.sololearn.com/cN1pqq1qVdhS/?ref=app ~ $ java storage/shared/Download/Jvdroid/PROJ/ServerClient.java storage/shared/Download/Jvdroid/PROJ/ServerClient.java:27: error: run() in EchoClientHandler cannot implement run() in Runnable public void run() throws Exception { ^ overridden method does not throw Exception storage/shared/Download/Jvdroid/PROJ/ServerClient.java:54: error: cannot find symbol ems.run(); ^ symbol: method run() location: variable ems of type EchoMultiServer Note: storage/shared/Download/Jvdroid/PROJ/ServerClient.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 2 errors error: compilation failed

20th Jan 2023, 1:27 PM
Jables
Jables - avatar
3 Answers
+ 2
Please describe what the program is supposed to do and what issue you encounter. "Error" is not a complete problem description.
20th Jan 2023, 1:29 PM
Lisa
Lisa - avatar
+ 1
Maybe the program will not run in Sololearn try to run in Eclipse
20th Jan 2023, 3:13 PM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 1
The error messages are telling you exactly what is the problem. The method signature of run() cannot contain any throws, because of what you are inheriting from the Runnable interface. You need to handle all possible checked exceptions inside the method with try/catch. And the second error shows you are using deprecated code of the Java API that is going to be removed from the language. Maybe it used to work on an earlier version of Java but not any more (Sololearn uses Java 16 currently). It seems you are messing with things that you don't understand. I suggest you take a step back, and focus on learning the basics.
21st Jan 2023, 6:31 AM
Tibor Santa
Tibor Santa - avatar