codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  loading external code  wraithedge at 19:48 on Wednesday, May 03, 2006
 

I wonder if there is a way to load an external .class file such that its members are available from within the code one is executing. I am looking for JAVA’s approach encapsulation and reusable code.

I am thinking to make code in small executable bundles that can be independently loaded and offer their functionality to the main application. Is that possible?

I am not looking to build a system for doing this. I want JAVA to do this. If it does not do this already I should look for another solution.

Thanks


  Re: loading external code  crwood at 18:40 on Friday, May 05, 2006
 

Some options:
.class files in the current directory or anywhere on the class path are loaded as needed by the virtual machine (vm).
You can use the -cp switch to specify a class path for classes that you want to load or you can set/add to the classpath with the set command at the prompt.
You can import a class, classes or a package from outside the classpath with import statements.
You can write a custom ClassLoader to have more control over the class loading process.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  IE Only comeback
•  Re: java app auto web update..
•  ` Error Code 64: Host not available ` - Error when accessing ASP Appln
•  Re: dynamic crystal report generation
•  Launch an app remotely through a website
•  Run an app in my pc from another pc
•  a:hover elements
•  Rearranging elements in a table
•  window.open giving http404 error


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007