check url (IDEA-33220)

This commit is contained in:
anna
2010-04-23 17:09:18 +04:00
parent 424b060705
commit 4e7f906cca
@@ -44,6 +44,7 @@ import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -253,6 +254,12 @@ public class AppletConfiguration extends ModuleBasedConfiguration<JavaRunConfigu
if (HTML_FILE_NAME == null || HTML_FILE_NAME.length() == 0) {
throw new RuntimeConfigurationWarning(ExecutionBundle.message("html.file.not.specified.error.message"));
}
try {
new URL(HTML_FILE_NAME);
}
catch (MalformedURLException ex) {
throw new RuntimeConfigurationWarning("URL " + HTML_FILE_NAME + " is not valid: " + ex.getLocalizedMessage());
}
}
else {
getConfigurationModule().checkClassName(MAIN_CLASS_NAME, ExecutionBundle.message("no.applet.class.specified.error.message"));