473,321 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

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

tpgames
785 512MB
When I renamed the class file to Audiodriver.class and changed the link to Audiodriver.class, the game wouldn't load. I got this error
Expand|Select|Wrap|Line Numbers
  1. java.lang.NoClassDefFoundError: Audiodriver (wrong name: Driver)
  2.     at java.lang.ClassLoader.defineClass1(Native Method)
  3.     at java.lang.ClassLoader.defineClass(Unknown Source)
  4.     at java.security.SecureClassLoader.defineClass(Unknown Source)
  5.     at sun.applet.AppletClassLoader.findClass(Unknown Source)
  6.     at java.lang.ClassLoader.loadClass(Unknown Source)
  7.     at sun.applet.AppletClassLoader.loadClass(Unknown Source)
  8.     at java.lang.ClassLoader.loadClass(Unknown Source)
  9.     at sun.applet.AppletClassLoader.loadCode(Unknown Source)
  10.     at sun.applet.AppletPanel.createApplet(Unknown Source)
  11.     at sun.plugin.AppletViewer.createApplet(Unknown Source)
  12.     at sun.applet.AppletPanel.runLoader(Unknown Source)
  13.     at sun.applet.AppletPanel.run(Unknown Source)
  14.     at java.lang.Thread.run(Unknown Source)
  15. Exception in thread "Thread-417" java.lang.NullPointerException
  16.     at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
  17.     at sun.plugin.AppletViewer.showAppletException(Unknown Source)
  18.     at sun.applet.AppletPanel.runLoader(Unknown Source)
  19.     at sun.applet.AppletPanel.run(Unknown Source)
  20.     at java.lang.Thread.run(Unknown Source)
  21. java.lang.NullPointerException
  22.     at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
  23.     at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
  24.     at sun.applet.AppletPanel.run(Unknown Source)
  25.     at java.lang.Thread.run(Unknown Source)
  26.  
The applet html code, with everything in the same folder.
[HTML]<applet width="400" height="300" name="Audiodriver" code="Audiodriver.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:
Expand|Select|Wrap|Line Numbers
  1. import java.awt.image.*;
  2.  
  3. public void init()
  4.     {
  5.         resize(400, 300);
  6.         zoom = new double[26];
  7.         for (int t=0;t<25;t++) {
  8.             zoom[t] = 200.0/(t+1)-8;
  9.         }
  10.         offscreenImage = createImage(400,300);
  11.         offscreenGraphics =offscreenImage.getGraphics();
  12.         cracked=getImage(getCodeBase(),"cracked.gif");
  13.         cars[0][0]=getImage(getCodeBase(),"car1f.gif");
  14.         cars[0][1]=getImage(getCodeBase(),"car1b.gif");
  15.         cars[1][0]=getImage(getCodeBase(),"car2f.gif");
  16.         cars[1][1]=getImage(getCodeBase(),"car2b.gif");
  17.         cars[2][0]=getImage(getCodeBase(),"car3f.gif");
  18.         cars[2][1]=getImage(getCodeBase(),"car3b.gif");
  19.         signs[0]=getImage(getCodeBase(),"banner1.gif");
  20.         signs[1]=getImage(getCodeBase(),"banner2.gif");
  21.         signs[2]=getImage(getCodeBase(),"banner3.gif");
  22.         tree=getImage(getCodeBase(),"tree1.gif");
  23.         bush=getImage(getCodeBase(),"tree2.gif");
  24.         post=getImage(getCodeBase(),"post.gif");
  25.         backdrop = createImage(800,600);
  26.         drawBG(backdrop.getGraphics());    
Any clues as to what is going on?
Thanks!
Feb 9 '07 #1
3 1680
tpgames
785 512MB
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.
Feb 9 '07 #2
tpgames
785 512MB
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!
Feb 9 '07 #3
tpgames
785 512MB
Actually, the problem is Java code for a palm pilot and not for a web browser!
Mar 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: D. Alvarado | last post by:
Hello, I am running PHP 4 on my Fedora Core 2 dev machine, Apache 1.31. I made a lot of calls to $_SERVER. Unfortunately, when I move my application to a Windows environment, running on an IIS...
1
by: Jean-Francois Brault | last post by:
I wrote a crappy class for radian angle management. The class consists of an array of radian values. I put all these things in a class in which all methods are static, so I can access it anywhere...
5
by: Kunle Odutola | last post by:
Prototype.js is here: http://prototype.conio.net/
2
by: Jacques Cooper | last post by:
Hello, How do I upload a disk file using HTML? For example, many job boards allow you to upload your resume to their site. Thanks, Jacques
5
by: Edward Mitchell | last post by:
I am trying to include two class files into a web service project. The structure I have is a top level solution and project in a folder and below that, the web service project in it's own folder. ...
0
by: Bruce One | last post by:
I have seen there is only one type of association, and as u link 2 classes it automatically creates a property referencing to the other class. Well, does this cover all relationship between 2...
2
by: John Nagle | last post by:
In M2Crypto/m2urllib there is this: import string, sys, urllib from urllib import * def open_https(self, url, data=None, ssl_context=None): ... # Minor brain surgery. URLopener.open_https...
3
by: Hongyu | last post by:
Hi, I am a newbie in C++. I saw a code like the below and don't understand it. class A { public: A();
7
by: praveenb000 | last post by:
Hi, every one on this forum.... I am new to web designing (using HTML/CSS). i designed a web page using HTML, Css with dream weaver. Here is the code i used for the desinging. it appears well...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.