Hey guys I got a bug in the following code and the error is as follows in the main function...in the line 'XMLValidator xmlv = new XMLValidator(file1, file2);' saying that it is not a statement and also another error that a semicolon is required which leads me to think that I must be doing something extremely retarded. Please help out if you guys can...I am goinghere....haha. Thanks in advance fellas and if you feel I forgot something relevant to mention then dont hesitate to knock me on my ass...lates.
Code:package xmlvalidator; import java.io.File; /** * * @author Surya */ public class XMLValidator { private File xml; private File xsd; /** * Creates a new instance of XMLValidator */ public XMLValidator(File xml, File xsd) { this.xml = xml; this.xsd = xsd; java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new ValidateGUI(this).setVisible(true); } }); } // Returns the xml file public File getXmlFile() { return xml; } //Returns the xsd file public File getXsdFile() { return xsd; } /** * @param args the command line arguments */ public static void main(String[] args) { if (args.length != 2) System.out.println("Usage 'java XMLValidate filename.xml filename.xsd"); else { File file1 = new File(args[0]); File file2 = new File(args[1]); if (file1.exists() && file2.exists()) XMLValidator xmlv = new XMLValidator(file1, file2); else System.out.println("One or more of the filenames mentioned does not exist."); } } }


LinkBack URL
About LinkBacks
here....haha. Thanks in advance fellas and if you feel I forgot something relevant to mention then dont hesitate to knock me on my ass...lates.
Reply With Quote
