Solved

Show the class that is loading

Posted on 2004-04-29
16
187 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
object oriented programming comparison 5 69
throw exception 21 42
Android development question 2 34
String array comparison 4 32
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

813 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

14 Experts available now in Live!

Get 1:1 Help Now