A la compilation Eclipse me donne comme message d'erreur qu'il ne trouve pas
la fonction main.
Pourtant elle est présente dans le fichier.
--------------
package mysql;
after correct this mistake i receive following message :
java.lang.Error: Unresolved compilation problems: Unhandled exception type IllegalAccessException Unhandled exception type InstantiationException Unhandled exception type ClassNotFoundException
at Hello.<init>(Hello.java:30) at Hello.main(Hello.java:75) Exception in thread "main"
Craps
sorry the precedent message is wrong
receive following message
java.lang.Error: Unresolved compilation problems: Unhandled exception type IllegalAccessException Unhandled exception type InstantiationException Unhandled exception type ClassNotFoundException Unreachable catch block for SQLException. This exception is never thrown from the try statement body
at Hello.<init>(Hello.java:32) at Hello.main(Hello.java:83) Exception in thread "main"
sorry the precedent message is wrong
receive following message
java.lang.Error: Unresolved compilation problems:
Unhandled exception type IllegalAccessException
Unhandled exception type InstantiationException
Unhandled exception type ClassNotFoundException
Unreachable catch block for SQLException. This exception is never thrown
from the try statement body
at Hello.<init>(Hello.java:32)
at Hello.main(Hello.java:83)
Exception in thread "main"
java.lang.Error: Unresolved compilation problems: Unhandled exception type IllegalAccessException Unhandled exception type InstantiationException Unhandled exception type ClassNotFoundException Unreachable catch block for SQLException. This exception is never thrown from the try statement body
at Hello.<init>(Hello.java:32) at Hello.main(Hello.java:83) Exception in thread "main"
KiLVaiDeN
"Craps" wrote in message news:41881c37$0$24574$
sorry the precedent message is wrong
receive following message
java.lang.Error: Unresolved compilation problems: Unhandled exception type IllegalAccessException Unhandled exception type InstantiationException Unhandled exception type ClassNotFoundException Unreachable catch block for SQLException. This exception is never thrown from the try statement body
at Hello.<init>(Hello.java:32) at Hello.main(Hello.java:83) Exception in thread "main"
Means that in your try and catch you must intercept those exceptions : IllegalAccessException InstantiationException ClassNotFoundException
and _not_ this one : SQLException
"Craps" <frederic.crapez@wanadoo.fr> wrote in message
news:41881c37$0$24574$8fcfb975@news.wanadoo.fr...
sorry the precedent message is wrong
receive following message
java.lang.Error: Unresolved compilation problems:
Unhandled exception type IllegalAccessException
Unhandled exception type InstantiationException
Unhandled exception type ClassNotFoundException
Unreachable catch block for SQLException. This exception is never thrown
from the try statement body
at Hello.<init>(Hello.java:32)
at Hello.main(Hello.java:83)
Exception in thread "main"
Means that in your try and catch you must intercept those exceptions :
IllegalAccessException InstantiationException ClassNotFoundException
java.lang.Error: Unresolved compilation problems: Unhandled exception type IllegalAccessException Unhandled exception type InstantiationException Unhandled exception type ClassNotFoundException Unreachable catch block for SQLException. This exception is never thrown from the try statement body
at Hello.<init>(Hello.java:32) at Hello.main(Hello.java:83) Exception in thread "main"
Means that in your try and catch you must intercept those exceptions : IllegalAccessException InstantiationException ClassNotFoundException