Loading new class files when they are not available when the JVM starts

Simple Question
Is it possible to load class if it was not compiled when the original JVM was launched?
More Detailed Question
Our build system is getting a slight tweak with a new test runner. After our build system compiles the file, I would like to be able to load the files that have just been compiled.
Our build system runs inside its own JVM and calls ant scripts to run the different processes(Separate JVM). The new test runner will also be called from the build system(Same JVM) but not as an ant target. Is it possible to call the newly compiled files from inside the build system JVM if they had not been created on the start of that JVM using reflection?
Thanks in Advanced!

public class t
    public static void main(String args[])
     throws Exception
     Writer out = new FileWriter("Foo.java");
     out.write("public class Foo implements Runnable {\n");
     out.write("    public void run() {\n");
     out.write("        System.out.println(\"run like the wind\");\n");
     out.write("    }\n");
     out.write("}\n");
     out.close();
     Runtime.getRuntime().exec("javac Foo.java").waitFor();
     ((Runnable) Class.forName("Foo").newInstance()).run();
}

Similar Messages

  • Aperture ate my picture files and they are not recoverable.  The guy at the Genius Bar told me to Trash the App, empty Trash, then go to Purchases and reinstall.  But Purchases says it is "Installed" so it does not let me download it again.  HELP!!!!

    Aperture ate my picture files and they are not recoverable.  The guy at the Genius Bar told me to Trash the App, empty Trash, then go to Purchases and reinstall.  But Purchases says it is "Installed" so it does not let me download it again.  HELP!!!!

    I typed Aperture into Spotlight and sure enough it did show up.
    It looks like it is supposed to be in Apps.
    But it is not there.
    So I clicked on the spotlight Aperture and it opened up the App!!!!
    But I do not know where it is to move it!
    How can I find it?
    While Aperture is running and you are seeing it in the Dock, ctrl-click (or right click) the Dock icon.
    You will see a contextual menu. Click on "Options", then select "Show in Finder".
    And check the "keep in Dock" mark, so you will not lose it from the Dock.

  • HT4009 I have purchased items from CityVille and they are not available in the App although my card has been charged for the purchases.

    I have purchased items from CityVille and they are not available in the App although my card has been charged for the purchases. I also have an email receipt with the purchase. Can you please tell me how to resolve this issue?

    iTunes Store: Hiding and unhiding purchases
    http://support.apple.com/kb/HT4919

  • My app store wont let me download apps, says they are not available in the uk please help??

    my app store wont let me download apps, says there not available in the uk?? please help??

    Try This...
    Close All Open Apps...  Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • I recently had to get a new computer, my list of audible books is there but can't open because original file cannot be found.  how do I find them or redownload them when they are not in my purchased list anymore?

    I recently had to purchase a new computer, after doing so I no longer can open my audible books.  the list is there, but I get an error message telling me that the original file cannot be found.  How can I redownload them when they are not in my purchased list anymore when I go to the Apple Store??

    Downloading past purchases from the App Store, iBookstore, and iTunes Store - http://support.apple.com/kb/ht2519 - enabled with iTunes 10.3 and newer; not available in all countries; apps, books (not audiobooks), music, t.v. shows, and movies (some - not all studios have permitted this). Movies currently available in the USA only. Downloading previously purchased movies and TV shows requires iTunes 10.6 or later.  Discontinued items not available. For items not included in the iCloud list, or locations or computer systems where iCloud is not (yet?) available, you only get one download per fee paid.  Apple notes it is your responsibility to back up your purchases.
    Select the store on the left side of iTunes.
    Click on Purchased on the right side under Quick Links.
    You can re-download your available previous purchases.

  • I have dragged 2 files to the trash bin but I cannot delete them from the trash bin. It keeps telling me these files are in use when they are not. How do I delete these files? One is a txt file and the other is an xls file

    I have dragged 2 files to the trash bin but I cannot delete them from the trash bin. It keeps telling me these files are in use when they are not. How do I delete these files? One is a txt file and the other is an xls file

    From the Finder menu select 'Secure Empty Trash'. If this or the suggestion above doesn't resolve the problem take a look at the various suggestions in this link:
    http://www.thexlab.com/faqs/trash.html

  • Our Windows PC crashed with all our music on it.  There are copies of both purchased (thru iTunes store) and from our own CDs on another HD in a backup file.  They are not linked to a Media file.  Is there any way I can put this music on my new computer?

    Our Windows PC crashed with all our music on it.  There are copies of both purchased (thru iTunes store) and from our own CDs on an external HD in a backup file.  They are not linked to a Media file.  Is there any way I can put this music on my new computer?

    The syncing of music is one way, computer to phone. See this helpful document from a fellow user. Credit goes to the author.
    https://discussions.apple.com/docs/DOC-3141

  • Please help! I defragged my hard drive and now Illustrator CS6 is trying to open all of my complex Illustrator files with a "Text Import Options" box as if they are text files, and they are not opening!

    Please help! Illustrator CS6 started trying to open all of my complex.ai files with a "Text Import Options" box as if they were text files, and they are not opening!  Help!

    Hi Monika,
    I have spent the last two or three days trying to do what you suggested.  I uninstalled Adobe 6 from Windows.  Some files that CS6 placed on my system during installation remained, including fonts and .dll files.
    I had to abandon the Cleaner Tool you suggested because in one screen it allowed me to specify removing CS6 only, but on the following screen it only gave on option to remove ALL Adobe programs.  I could not do that because I didn't have the serial number handy for CS3 in case I want to reinstall it at some point.
    I tried to get technical help with the Cleaner Tool problem but no definitive help was available, so I reinstalled CS6 again without having the benefit of the Cleaner Tool.  I tried to get the serial number for CS3 so I could use the Cleaner Tool but spent 2 wasted hours in chat.  Even though I had a customer number, order number, order date, place of purchase, the email address used AND 16 digits of the serial number, in two hours the agent couldn't give me the serial number.  After two hours I had nothing but instructions to wait another 20 minutes for a case number.
    Illustrator CS6 is still trying to open some backups as Text and otherNone of the problems have been fixed.  I have tried to open/use the .ai files in CS6 installed on another system and am getting the same result, so I don't think the software was damaged by the cleaner.  The hard drive cleaner is well-known and I've run it many times without any problem to previous versions of Illustrator or any other programs.
    When I ordered, the sale rep promised good technical support and gave me an 800 number, but after I paid the $2000, I learned that the 800 number she gave me doesn't support CS6 and hangs up on me.  Adobe doesn't call it a current product even though they just sold it to me about 3 weeks ago.
    Would appreciate any help you experts can offer.  If I can't solve this, the last backup I can use was from June and I will have lost HUNDREDS of hours of work and assets that I cannot replace.
    Exhausted and still desperately in need of help...

  • I'm on a windows laptop using iTunes sharing through the family to connect with Apple TV. After choosing the folder of photos to be shared and displayed on the appletv and when I choose to show on screen, they are not shown in the order they are in the or

    I'm on a windows laptop using iTunes sharing through the family to connect with Apple TV.
    After choosing the folder of photos to be shared and displayed on the appletv and when I choose to show on screen, they are not shown in the order they are in the original folder.
    How to pair show in a certain order, for example, sorted by name.
    grateful
    Julio Cesar

    Not that I'm aware of. You just export JPEG copies to a folder that you can point iTunes to. For instance, I have created a folder in my Pictures folder called Apple TV. And within that folder I have other folders of pictures that I can choose from in iTunes to share with Apple TV. But there doesn't seem to be any way to share a Lightroom slideshow. If you have laid to create a video file that would probably work. Apple TV is a little clunky in my opinion. Some things are a little more difficult to do now than they were a while back. I probably haven't provided you with much help, but just keep experimenting and I think you will figure it out.

  • I can find many purchases in my purchase history, but they are not found when I "Check Available Downloads." How else can I download my purchases?

    I can find many purchases in my purchase history, but they are not found when I "Check Available Downloads." How else can I download my purchases?

    what happened to the initially downloaded files ? did you make a backup ? do you use time machine ?

  • I just upgraded my old versionj 3 of photoshop elements to v13  when I import photos they are not imported in the same order they are mixeds up

    hi can I have a reply to above question: I just upgraded my old versionj 3 of photoshop elements to v13  when I import photos they are not imported in the same order they are mixeds up

    In the documents screen - sorry, new to this so not sure if that's the right terminology... Basically the screen showing all documents, if you drag down, there should be two options at the of of the page: Date and Name. Select Name and your list should now be in alphabetic order.
    Hope that helps.

  • WOT and Webutation is showing as disabled when they are not

    WOT and Webutation is showing as disabled when they are not .The icons show,but no color on icons. Says WOT is disabled when its not. Also the same on Webutation. Tried uninstalling then reinstalled both and the same thing happened. Tried Wot on another users account and theirs work. Can someone help me on these issues?

    capaho wrote:
    That's like saying a boat is an airplane because it's not a car.
    SMH
    In other words, how does your explanation account for ED (enhanced definition)?
    ED is generally considered to be 576p or 480p, but this is not universally accepted and these resolutions are often accepted as HD also. Additionally an ED signal uses non square pixels just as SD does so the horizontal pixel dimensions should be no more than 720. Exactly how the tv would treat these resolutions I don't know (yet).
    If you have a copy of the source code for the function that displays the HD icon, please post it so I can take a look at it.
    Why should I have such a copy and why is it relevant. The issue here is that the OP believes his video is incorrectly labelled HD which is not the case. There may or may not be anomalies in the way the tv attributes the HD label to some files (although it isn't the case for me), however the OP has incorrectly converted his source video and they are no longer SD, they are also not ED by whichever definition you wish to apply and any such anomalies should they exist are not responsible for the OP's files being labelled HD.

  • TS1630 My iPhone 4 says the headphones are in when they are not. I am not getting any sound from the speaker. Nothing appears to be in the headphone jack.  Any ideas anyone?

    My iPhone 4S  has no sound through the speaker generally, although the speakerphone does work.  It is indicating that headphones are in, when they are not.  Nothing appears to be in the headphone jack.  Resetting the phone has not resolved the problem.  any ideas what could be wrong?

    This just happened to my brand new iPhone5. I tried turning all the way off and then on AND plugging and unplugging. Only to discover that simply connecting to the charger worked!!!
    Very frustrating though!!

  • My ipod 5th gen won't change volume when headphones are plugged in, but when they are not I can change the volume on the speaker.  How do I fix this?

    My ipod 5th gen won't let me adjust volume when headphones are plugged in, but when they are not I can adjust the volume on the speaker.  How do I fix this?

    Try a hard reset of the Nano. To do this, press and hold both the Select (Center) and Menu buttons together long enough for the Apple logo to appear.
    I assume you have double checked to make sure you are plugging the headset all the way in meaning the white part of the headset is flush with the body of the Nano?
    B-rock

  • I sometimes have blue and red square-shaped dots appear on my MBP; especially but not exclusively when I'm watching videos.  The dots don't stay in the same place; and also they are not there all the time.

    I sometimes have blue and red square-shaped dots appear on my MBP; especially but not exclusively when I'm watching videos.  The dots don't stay in the same place; and also they are not there all the time.  Also, sometimes my animations (applications opening, windows being dragged, etc.) will glitch as well.  Again, this is not a continual thing; it just happens variously throughout my day.  MBP Model A1212, OS X 10.6.8, 2.33 Ghz 3GB RAM.

    Did the original songs that do not appear on the car player play in the Music app on the iPod? Sometimes glitches happen and they do not. Also, If y ohave a 5G iPod/iOS 7, purchase songs  will show with an cloud icon by them if they are not downloaded if Shall All is turned on in Settings>iTunes and App Store

Maybe you are looking for

  • How do I stop podcasts from automatically downloading?

    I've tried everything including changing the settings for my entire library to just refresh the feeds, but iTunes is still automatically downloading episodes. What is worse though, is many times its going back into certain feeds to download older, an

  • Help diagnosing java.lang.IllegalArgumentException

    Hello, I have an Eclipse RCP desktop app that I have been working on for the past few months, without incident. In the process of upgrading to the standard com.sleepycat.je version "4.0.92" plugin in Eclipse 3.5, I am getting the exception below. Whe

  • Using advanced statistical functions in BO or creating your own ones

    Hello, Can someone tell me if it is possible to use more advanced statistical functions in BO (webi or deski f.i.) like the possibility to extrapolate figures. I only see a limited functions in Webi (mean, intrapolate, percentiles, ...). If not is it

  • RequestDispatcher.forward() bug in WLS61???

    Hi           attached is a web application called forward that demonstrate a possible           bug in weblogic 6.1 server.           Description of the application           index.html:           <html>           <head>           <title>form</title>

  • DWM Tag Configuration Question

    Hi there, I am reasonably new to DWM and I am trying my hand at a bit of customization. Currently what i am trying to do is for one of the "Tags" (9 specifically) to be named "R" to be Red when in focus and to only have a terminal open. I am just won