[Java] MalformedURLException

plmiurfd -  
 qsdfqf -
Bonjour,
petit problème que je n'arrive pas à régler avec mon ami (google)

String strUrl = "http://www.lesite.com/mon-image.jpg"

URL nUrl = new URL(strUrl);

et là j'ai une erreur MalformedURLException avec ces informations :

java.net.MalformedURLException: no protocol:
at java.net.URL.<init>(Unknown Source)

le constructeur d'URL selectionné est bien celui qui gère les String en paramètres.
A voir également:

1 réponse

qsdfqf
 
en fait il l'accepte bien si on le surround avec try catch, le truc c'est que l'ide me le notifié pas...

no coment !

Sujet clos !
0