• Post Reply Bookmark Topic Watch Topic
  • New Topic

Loading a class from an Applet?  RSS feed

 
Karis Brown
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to load a class from another Applet Class
If so how please?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Because "load a class" has a specific technical meaning, and because this is the beginner's forum where people don't always know such high-falutin' stuff, I'm going to ask first if you can explain exactly what you want to do in a little more detail. I don't want to answer a question that you haven't actually asked.
 
Karis Brown
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its exactly what i mean, I suppose i have to give great detail..
erm..I have an applet(loaded by appletviewer) that sends data to a normal dos type screen (server). I was i was wondering is there a away to get the applet to load the server class rather than me having to load them up on at a time?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I'm still not at all sure what you're using the verb "load" to mean. This time, it sounds like you might mean "launch an application," something you'd do with the various static exec() methods in the Runtime class.
The words "load a class" mean to bring a *.class file into the JVM, optionally verify it, and set it up so that you can refer to the Java class it represents. Normally, this happens automatically. If you need to do it manually, using the static method "forName(String)" in java.lang.Class is the easiest way; it works from an applet as well as from a normal application.
Are you talking about one of these, or about something else?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!