473,797 Members | 2,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

tpgames
785 Contributor
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
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="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:
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 1705
tpgames
785 Contributor
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 Contributor
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 Contributor
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
4663
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 web server, the variable $_SERVER is no longer supported (I always get an empty string). Question: What is a cross-web server way of finding the path to the document root -- the path to the public html folder?
1
1843
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 in my code (I could have made a library instead of a class). I can't find out why g++ compiles fine, but does not link correctly the following code. Here, I am posting my full code, .h and .cpp just to make all things clear. The linker output...
5
9995
by: Kunle Odutola | last post by:
Prototype.js is here: http://prototype.conio.net/
2
1609
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
13474
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. In the top level folder I have two class files, classA.cs and classB.cs. In the web service project, I use Add>Existing Item... and browse to select the files in the parent directory. Unfortunately, when I hit the Open button in the file...
0
859
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 classes (e.g. employee x department, customer x order etc) ? If so why then UML has 2 classical dif types of associations (aggregations and compositions) ? Could someone help me please on this topic? Thanks a lot.
2
1216
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 = open_https
3
2006
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
2497
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 in IE 6 browser but not in Mozilla 4.0 some components are disappears. This is the whole code i used for designing this page and i also given css files coding.(except images) i don't know how to upload my files in this site(forum). So i am...
0
10468
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4131
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.