Why does html link=class in folder 1, but upload class in folder2?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tpgames
    Contributor
    • Jan 2007
    • 783

    Why does html link=class in folder 1, but upload class in folder2?

    When I renamed the class file to Audiodriver.cla ss and changed the link to Audiodriver.cla ss, the game wouldn't load. I got this error
    Code:
    java.lang.NoClassDefFoundError: Audiodriver (wrong name: Driver)
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClass(Unknown Source)
    	at java.security.SecureClassLoader.defineClass(Unknown Source)
    	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)
    Exception in thread "Thread-417" java.lang.NullPointerException
    	at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
    	at sun.plugin.AppletViewer.showAppletException(Unknown 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(Unknown Source)
    	at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
    	at sun.applet.AppletPanel.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    The applet html code, with everything in the same folder.
    [HTML]<applet width="400" height="300" name="Audiodriv er" code="Audiodriv er.class"></applet>[/HTML]
    Also, the images do NOT reflect the image file. I see connectfour sign instead of a 'we can do it' sign. I use a cPanel interface, whose cache may be part of the problem.
    All files, images are in the same folder, which each version of the game having a separate folder.
    Part of the java source code is:
    Code:
    import java.awt.image.*;
    
    public void init()
    	{
    		resize(400, 300);
    		zoom = new double[26];
    		for (int t=0;t<25;t++) {
    			zoom[t] = 200.0/(t+1)-8;
    		}
    		offscreenImage = createImage(400,300);
    		offscreenGraphics =offscreenImage.getGraphics();
    		cracked=getImage(getCodeBase(),"cracked.gif");
    		cars[0][0]=getImage(getCodeBase(),"car1f.gif");
    		cars[0][1]=getImage(getCodeBase(),"car1b.gif");
    		cars[1][0]=getImage(getCodeBase(),"car2f.gif");
    		cars[1][1]=getImage(getCodeBase(),"car2b.gif");
    		cars[2][0]=getImage(getCodeBase(),"car3f.gif");
    		cars[2][1]=getImage(getCodeBase(),"car3b.gif");
    		signs[0]=getImage(getCodeBase(),"banner1.gif");
    		signs[1]=getImage(getCodeBase(),"banner2.gif");
    		signs[2]=getImage(getCodeBase(),"banner3.gif");
    		tree=getImage(getCodeBase(),"tree1.gif");
    		bush=getImage(getCodeBase(),"tree2.gif");
    		post=getImage(getCodeBase(),"post.gif");
    		backdrop = createImage(800,600);
    		drawBG(backdrop.getGraphics());
    Any clues as to what is going on?
    Thanks!
  • tpgames
    Contributor
    • Jan 2007
    • 783

    #2
    I tried rezipping the philip folder from my harddrive, with the original class and java file and uploading it with the correct images. I extracted the contents in to cPanel. The game won't even work. It just says Applet Driver started. cPanel uses a Linux operating system. Could this be part of the problem? Do I need to find host that has better Java support? Or, am I just grasping at straws trying to figure out my issue. Thanks!
    (It turns out that I do not have to upload the images in to Java. Another issue is causing them to not work. I found this out when I got my new site, and the game did work with 1 original image, one new image, the connect four image I only uploaded to see what was going on, as that image was very large.) I was trying to recreate the 'new site' happening but with the images I actually wanted, but failed.

    Comment

    • tpgames
      Contributor
      • Jan 2007
      • 783

      #3
      The issue was partially resolved. The real problem is I am on a linux server without the specific java program that are on the server that I would need. I'd have to find a windows server host. With that in mind, why does everyone think Java is so good? It can't be that good, if it is cross-browser compliant, but only works on Windows servers.

      Any thoughts? Corrections? Thanks!

      Comment

      • tpgames
        Contributor
        • Jan 2007
        • 783

        #4
        Actually, the problem is Java code for a palm pilot and not for a web browser!

        Comment

        Working...