Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Show the class that is loading

Posted on 2004-04-29
16
Medium Priority
?
194 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
 

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

971 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