|
It is because, there is a SortedSet in java.
|
|
|
|
|
I have created a Java game (183MB for .jar file) and can be played on local (offline) through .html and it works perfectly fine. However, once it is allocated into the server in my University, it does not run as expected and it projects the following exception:
load: class wildwildwest.applet_selection_screen not found.
java.lang.ClassNotFoundException: wildwildwest.applet_selection_screen
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: wildwildwest.applet_selection_screen
What causes the above problem and what solution can be proposed to solve it?
By the way, the .html code for the game is as followed is as following:
<HTML>
<HEAD>
<TITLE>Wild Wild West</TITLE>
</HEAD>
<BODY bgcolor="#000000">
<font color="#ffffff" face="Curlz MT">
<center>
<H3><HR WIDTH="100%">Wild Wild West<HR WIDTH="100%"></H3>
<P>
<APPLET CODE="wildwildwest.applet_selection_screen" archive="Wild Wild West.jar" width=800 height=600></APPLET>
</P>
</center>
</font>
</BODY>
</HTML>
|
|
|
|
|
Check this link[^], it has most of the common problems for deploying an applet.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Thanks for the suggestion but it doesn't seems to be able to solve the problem. There are others java games has been uploaded onto the same server but only the one I have is not able to work online while the rest can be loaded and played.
|
|
|
|
|
If there are other applets running without a problem, I'd suggest you investigate the differences.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
check the libraries you're using. Might be a indirect reference, which causes the deployment not to find the jar and therefor not to work proper.
Also check your build-Config, sometimes not all classes are marked to be added to the build.
|
|
|
|
|
Thanks for the information. I will try it out as soon as possible.
|
|
|
|
|
TorstenH. wrote: check the libraries you're using. Might be a indirect reference, which causes the deployment not to find the jar and therefor not to work proper.
Huh?
Jars don't have dependencies - classes do.
If the specified class is in the specified jar and the class has another class dependency which is not found then a different exception would be the result.
Perhaps you meant something different?
|
|
|
|
|
Maybe try changing your jar filename to no spaces.
|
|
|
|
|
thanks for the suggestion. I will try to solve it.
|
|
|
|
|
arthur89kim wrote:
<layer>What causes the above problem and what solution can be proposed to solve it?
The class is not in the class path. The solution follows from that.
arthur89kim wrote: I have created a Java game (183MB for .jar file) and can be played on local (offline) through .html and it works perfectly fine.
Which means it is in the class path.
Although it isn't clear what you mean by "through .html".
I will note some oddities.
1. 183 meg is a really big jar
2. Class name doesn't follow standard naming.
3. Jar name shouldn't have spaces in it.
What happens if you change, ONLY in the html, to XXX.jar? That should specifically fail because the jar doesn't exist. However if you get the same error then I would suppose that your jar is not being found on the server (thus it won't be in your client and not in the class path.) That is a guess though.
|
|
|
|
|
Thanks for the suggestion. I will try the solution proposed.
|
|
|
|
|
Hello,
public class Doc extends PlainDocument {
private static final long serialVersionUID = 1L;
protected Element createBranchElement(Element parent,AttributeSet a)
{
return super.createBranchElement(parent, a);
}
}
public class TestDocView {
Doc D = new Doc();
AbstractDocument.BranchElement E1 = (BranchElement) D.getDefaultRootElement();
D.createBranchElement(E1, A);
}
I get runtime error for
D.createBranchElement(E1, A);
saying Illegal casting of AbstractDocument.BranchElement.
How should I use CreateBranchElement()?
Thanks
Prithaa
|
|
|
|
|
a runtime Error??
Please use an IDE. Eclipse and Netbeans are free. No need to work on console.
Your Exception pops because the method createBranchElement(Element parent, AttributeSet a) is inheriated from AbstractDocument[^]. I guess it doesn't return much.
|
|
|
|
|
prithaa wrote: AbstractDocument.BranchElement E1 = (BranchElement) D.getDefaultRootElement();
You haven't shown us the implementation of
getDefaultRootElement()
Also, what's the relation between BranchElement and Element.
Apurv
If Java had true garbage collection, most programs would delete themselves upon execution.
|
|
|
|
|
Hi Friends,
I would like to know , how to write a timer program.For eg the application should trigger after a particular time.Thanks in Advance
|
|
|
|
|
VickyVicki wrote: the application should trigger after a particular time.
Trigger what? Do you mean that it should run doing nothing until a certain time of day or until a certain time interval has elapsed? In either case a quick look at the Java documentation for something to do with Date[^]s or times should help.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Don't believe Richard, for him time is something that is flying by
GregorianCalendar [^]is so much better!
Combine it with This one about running System Commands[^].
The rest is up to you - that is what development is about. Make a plan, write things down, sketch a GUI and afterwards start implementing what you've written down.
|
|
|
|
|
TorstenH. wrote: time is something that is flying by
Faster every year!
TorstenH. wrote: GregorianCalendar
I can never remember this class, even though it's obvious.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Richard MacCutchan wrote: Faster every year
As they sang in Trumpton[^]:
[sing]
Time flies by when you're a driver of a train,
Speeding out of Trumpton with a cargo of cocaine.
I get high when im a pilot of a plane.
Touching down in Camberwick,
I'm stoned out of my brain.
[/sing]
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
I never really watched Trumpton, but my children used to love it.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Thanks for all your replies. I wanted something like an quiz system .After the particular time getsover the application should stop and also should start after a specific min
|
|
|
|
|
If you need to measure an elapsed time, a simple Thread with a sleep or wait in it may be sufficient.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Tech Mentro is leading of IT Training Center or Institute in Noida,Delhi-NCR,India which provide software course/tutorial
in Java Training,J2EE,.Net,PHP,Struts,Spring,Hibernate,Android,ejb,c++,c,Summer training,6 months project based training,
6 weeks industrial training programme,corporate,computer training for students of MCA/BE/BTech/BCA/MSc(CS&IT)and professionals.
Tech Mentro
http://www.techmentro.com
|
|
|
|