Solved

Show the class that is loading

Posted on 2004-04-29
16
186 Views
Last Modified: 2012-03-15
Hi i have an applet that take a lot of classes to load and i have a splash screen that display the user a little image with a JProgressBar with the setIndeterminate() to true. For this i don't care, but what i want is to do like acrobat software that display all plugin that is loading. So when the splashscreen start i want it to display all classes that is loading at the moment the jre load it.

Is there a dynamic way? Cause i know i can use
Class thatClass = Class.forName("TheClassToLoad");
  theObject = thatClass.newInstance();

but each time i will have to add a new class i will add to add these line... so i want  something that will know which classes the java runtime is loading and display the name to the user

thx
0
Comment
Question by:bumpert
  • 8
  • 4
  • 2
  • +1
16 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 10949124
That's the only way of doing it, unless you want to write your own classloader and sign your applet...

0
 
LVL 35

Expert Comment

by:TimYates
ID: 10949157
0
 

Author Comment

by:bumpert
ID: 10949298
my applet is already signed, and what do you mean when you said "write your own classloader"? Will i have to load EACH class manually with the code i post in my question???

cause if i'm not wrong, if i load my applet class the jre will automatically load all the class contain in this class... so all the class will load automatically without i have to load it by myself

i'll give a check to your url

thx
0
 

Author Comment

by:bumpert
ID: 10949827
humm i'm a little bit lost in all these links... i'll try continue reading on the subject but don't really know how and where to start to do what i want. I don't want people to make code for me, but just a little hint :)

thx
0
 

Author Comment

by:bumpert
ID: 10990142
nobody???
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 10992951
What seems to be the problem now?
0
 

Author Comment

by:bumpert
ID: 10995419
i'm still not able to do something for my problem... someone posted me links but that didn't help me (maybe i'm not good enough to do this)
i'm still searching on google and java forums to find solution

thx for help
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 35

Expert Comment

by:TimYates
ID: 10995467
what you are trying to do is not an easy thing...

either you have to do it the way you said (with Class.forName) or you will need to write your own ClassLoader

To write your own ClassLoader, you will need to understand those links I gave you, and then you will need to digitally sign your applet, as applets are not normally allowed to define their own classloaders...

http://java.sun.com/developer/onlineTraining/Security/Fundamentals/magercises/ClassLoader/help.html

is another classloader tutorial
0
 

Author Comment

by:bumpert
ID: 10995559
ok i have something more urgent to do, and ill come back on this later... at least tomorrow and give you feedback

my applet is already sign so it would be more easy...

thx
0
 

Author Comment

by:bumpert
ID: 11164855
somoen answer me an another forum
sorry
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11166122
> somoen answer me an another forum

what was the answer then?
0
 

Author Comment

by:bumpert
ID: 11168031
maybe not the best, but simple and working:
http://forum.java.sun.com/thread.jsp?forum=31&thread=518176
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 11168139
If I'm not mistaken, I think that even that one is not solved, and the last comment there is from you:

>> i give 1 more duke for somebody that could give ma solution that will help me do what i want
>> thx

What was the answer, BTW?
0
 

Author Comment

by:bumpert
ID: 11172346
heu!?!?

i give the duke on reply 16 of 18
the solution is on reply 16 of 18 (answer here)
the answer you writed here is on reply 14 of 18
on the reply 17 of 18 and said that the answer looks good
and at the last reply, 18 of 18, i'm leaving the topic

you didn't read all the thread...
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11190377
Closed, 250 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now