Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Loading a class from an Applet?

 
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?
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • 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
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • 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?
    Bookmark Topic Watch Topic
  • New Topic