|
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
|
|
|
|
|
Hello
I am using the following code to use createLeafElement from PlainDocument
public class Doc extends PlainDocument {
private static final long serialVersionUID = 1L;
protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1)
{
return createLeafElement(parent, a, p0, p1);
}
}
The above class without the createLeafElement() method works fine .But if I add this method I get runtime error saying program not responding.
My purpose is to use createLeafElement() method.How can I use it?
Thanks
Prithaa
|
|
|
|
|
0. Wrap code in <pre> tags please.
1. What is the exact exception? Try using copy/paste.
2. The method wont work try calling the super implementation:
public class Doc extends PlainDocument {
private static final long serialVersionUID = 1L;
protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1) {
return super.createLeafElement(parent, a, p0, p1);
}
}
3. Finally, why override if you are not changing anything?
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 your advice
I dont want to override but the method createLeafElemenmt() and createdefaultroot() are not visible when I want to use them directly.
With the following object D1 the methods are not visible.
PlainDocument D1 = new PlainDocument();
Thanks for your time
|
|
|
|
|
The example I gave should work as it calls the protected method on the super class.
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
|
|
|
|