Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By DarrylBurke

Thread: Load Java classes at runtime in a program

  1. #1
    jfabian is offline Member
    Join Date
    Jun 2012
    Posts
    22
    Rep Power
    0

    Default Load Java classes at runtime in a program

    Hi Everyone

    I want to know, if it is posible to load a folder route or a package, which has some .java files and compile it at runtime and then instantiate the classes so I can create objects of that clases ?? I read that it is possible, but I saw a few methods, and none satisfied me. What I want is just to compile the .java files and then create objects of the classes at runtime. I will really appreciate some help. I just the way of how to do it.

    Thanks in advance.

    Regards

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,305
    Rep Power
    20

    Default Re: Load Java classes at runtime in a program

    Check out the javax.tools package. Note that it's not part of the JRE; for a computer to run code using javax.tools, a JDK must be installed.

    db
    jfabian likes this.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 1
    Last Post: 05-12-2012, 08:35 PM
  2. Compiler runtime package load error
    By Dark-Redd in forum Advanced Java
    Replies: 17
    Last Post: 10-09-2011, 09:21 AM
  3. Need help with Java classes for making a program.
    By TheDarkReverend in forum Advanced Java
    Replies: 2
    Last Post: 11-28-2008, 04:50 AM
  4. load classes to jsp page
    By ITMaster in forum New To Java
    Replies: 6
    Last Post: 11-10-2008, 03:33 PM
  5. load external classes
    By gotenks05 in forum New To Java
    Replies: 17
    Last Post: 10-27-2008, 06:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •