• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Loading a class from an Applet?

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to load a class from another Applet Class
If so how please?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic