Results 1 to 1 of 1
  1. #1
    Preethi is offline Member
    Join Date
    Jan 2008
    Posts
    83
    Rep Power
    0

    Default Applet not getting started

    In my applet i have to access a file from server...so i read the file this way ,
    Java Code:
    public class Remoteconnection()
    {
    File newRemoteFile(String serverName, String shareName, String path, String userName, String password) throws IOException {
    try 
    {
    	String cmdLine;
            if (userName != null)
            cmdLine = "cmd /c net use \\\\" + serverName + "\\" + shareName + " " + password + " /user:" + userName+"/persistent:no";
    	else
            cmdLine = "cmd /c net use \\\\" + serverName + "\\" + shareName + " /persistent:no";
            Process p = Runtime.getRuntime().exec(cmdLine);
            p.waitFor();
            path = path.replace('/', '\\');
            if (path.startsWith("\\"))
            path = path.substring(1);
            return new File("\\\\" + serverName + "\\" + shareName + "\\" + path);
            }
            catch (Exception e) {
                throw new IOException(e.getMessage());
            }
    }
    public class XMLReading()
    {
    public void fileParsing() throws SAXException, FileNotFoundException, IOException
    {
            NewClass1 rt = new NewClass1();
            XMLReader reader = XMLReaderFactory.createXMLReader();
            reader.setContentHandler(this);
            File f = rt.newRemoteFile("172.16.10.183", "ProjectPlanning", "ScheduledXML.xml", "devdomain/1258", "passqws13*");
    	reader.parse(new InputSource(new FileReader(f)));
    }
    }
    But if i run inside the server or in other remote machine,the applet is in its loaded stage(only the sun java symbol is showing)...Its not getting started....Meanwhile,its not showing error also....

    load: class xmlTrail/MD2.class not found.
    java.lang.ClassNotFoundException: xmlTrail.MD2.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: D:\Program Files\VirtualWorks\IIS\ProjectPlanning\xmlTrail\xm lTrail\MD2\class.class (The system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...onnect(Unknown Source)
    at sun.net.http://www.protocol.file.FileURLConn...Stream(Unknown Source)
    at sun.applet.AppletClassLoader.getBytes(Unknown Source)
    at sun.applet.AppletClassLoader.access$100(Unknown Source)
    at sun.applet.AppletClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 10 more
    Exception in thread "Thread-4" java.lang.NullPointerException
    at sun.plugin.util.GrayBoxPainter.showLoadingError(Un known Source)
    at sun.plugin.AppletViewer.showAppletException(Unknow n Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
    at sun.plugin.util.GrayBoxPainter.showLoadingError(Un known Source)
    at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Exception in thread "thread applet-xmlTrail/MD2.class" java.lang.NullPointerException
    at sun.plugin.util.GrayBoxPainter.showLoadingError(Un known Source)
    at sun.plugin.AppletViewer.showAppletException(Unknow n Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    How to rectify it....(But in some client system its getting executed)
    Last edited by Preethi; 05-27-2008 at 03:55 PM.

Similar Threads

  1. Just getting started with java
    By DuceDuceExplorer in forum Introductions
    Replies: 4
    Last Post: 06-29-2008, 06:13 AM
  2. SampleService service could not be started
    By goropad in forum New To Java
    Replies: 2
    Last Post: 05-22-2008, 03:56 PM
  3. How do I get started?
    By programmer-in-training in forum New To Java
    Replies: 4
    Last Post: 01-11-2008, 07:45 AM
  4. Getting Started
    By Doorsmaniac in forum Java Applets
    Replies: 0
    Last Post: 11-24-2007, 03:40 AM
  5. I need help getting started
    By Android in forum New To Java
    Replies: 2
    Last Post: 10-30-2007, 04:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •