Help! findResource isn't working!

I'm at a complete loss.
In my classloader, I print out all the URLs of the ClassLoader (which extends URLClassLoader). When it prints them out, one of the URLs is:
file://D:/Resources/Factory.cfg
However, when I call classLoader.findResource( "Factory.cfg" ), it returns null. In fact, I even put the below code in (to be sure it wasn't a security issue):
//IN my classloader
public URL findResource(final String name)
    final URLClassLoader loader = this;
    AccessController.doPrivileged(new PrivilegedAction()
        public Object run()
            for ( Enumeration e = loader.getResources( name ); e.hasMoreElements(); )
                System.out.println( e.nextElement() ); //Nothing prints
}Still null!! Any idea what I'm doing wrong?

Ah, so you're saying if I add the file to the
classpath, it will never find it, but if I add the
folder, it WILL find it? Why is that?It's just like classpath. It's a list of places to look for things. You don't put all your classes on classpath, just the parent directories or jar files of their packages. You could write your own classloader that works the way you were thinking, but the idea behind a classpath (which is basically an array of URLs for one of those classloaders) is that it's a list of places to look for things.
Those URLs are where the classloader will look for the resource that has the name you give it.

Similar Messages

  • HELP - Website isn't working for me but working for everybody else

    Hey I'm new to this site so I'm sorry if this is in the wrong section!
    So I've been getting annoyed lately because my website (www.curtiskeay.com) isn't working for me and just redirecting me back to my hosting website saying that the website is 'coming soon' but it works for everyone else that has tried loading it, so it just seems to be me that it's not loading for.
    It works every now and then but very rarely for me, so it makes me feel that the site is down but really and truly it's just not loading for ME. It works perfectly fine at home on my wifi on my phone which is android and I use google chrome. I know this isn't probably a Apple related problem but I was unsure where else to post this.
    If anyone can give me any kind of help it would be greatly appreciated!
    Thanks,
    Curtis

    It's working here.
    Try this..   from your Safari menu bar click Safari > Preferences then select the Privacy tab.
    Click:  Remove All Website Data
    Now empty the Safari cache.
    Back to Safari > Preferences. This time select the Advanced tab.
    Click: Show develop menu in menu bar
    Now go to the menu bar, click Develop > Empty Caches
    Quit and relaunch Safari then try your site.

  • Help!!!! My Help Link isn't Working

    When I go to the help menu in PPRO CS5 and try to launch help it states my version of Adobe Air may be corrupted and might need to be reinstalled.  I can't get to help in any CS5 program or Lightroom.  I have tried re-installng Adobe Air, but still get the same problem.  Has anyone else gotten this issue and if so how did you resolve it.  I'm really in a spot running the Master Collection and having no help available. Thanks so much.
    I am running the latest version of Snow Leopard.

    to the brokenness of the AIR application
    Has worked beautifully for me so far.  (Fingers crossed.)
    I prefer to read the document in my browser
    I prefer the speed and responsiveness of a local file (however they're accessed), rather than depending on Adobe servers, which have given me far more trouble than the AIR Help system.
    What amuses me most, though, is that we both got exactly what we wanted with the new AIR system.  I got the local files, and you get them regularly updated as the Help documents improve.  But you still don't like it?!  I just find that very odd.

  • Help CS3 isn't working correctly in my new computer

    I just bought a new computer...I had no choice..the other one was dying. I do basic photo editing, but I do it daily.
    I have loaded my CS 3 onto my new Asus, with Windows 7 and i5 processor. Before I bought I did a lot of asking of friends and computer shops...all said CS3 would work just fine with this set up. I have it installed.....BUT I do alot if editing in camera raw with my jpegs. So far when I was setting up brideg, the computer pops us telling me that it won't work well with my processor. The whole reason I got the i5 was because I was told it would work best with it. It was a huge deciding factor for buying the computer. When I open the files in camera raw, it wil llet me edit, but won't  save anything..I'm assuming because it doesn't like the i5 processor. it tells me it' unable to save conversion, access denied.  Is there anything I can do. I really DON'T want to upgrade. I just spent a lot on a computer I was told would work with CS3 by several people and I am not good with change. I like CS3, it works for what I need and I prefer not to have to learn anything new, even if thechanges are minor.
    Does anyone have any suggestions?

    Hi Jenseib
    I'm no expert on the technical in's and out's of Photoshop - hopefully someone more knowledgeable than myself will chime-in soon - but this might be a Win7 issue; is your User Profile set-up as an "Administrator?"
    As for your CS3, a word of warning. As of CS6, which should be released in April, Adobe will only allow us to upgrade from One Full Version back, as opposed to the three versions we are currently allowed.
    What that means to you is that when CS6 is released, if you are NOT on CS5, you will NOT be able to upgrade to 6 or any further releases, you will have to buy a new full copy, which will be very expensive; a new copy of Photoshop CS5 is roughly $700!
    Good luck
    Paul

  • Help: camera isn't  working properly

    For some reason my camera isn't recording the pictures it takes. this just started happening today. any ideas why this might be happening. I tried restoring my iphone but it didn't make a difference

    Any error message provided?
    If you have restored from the backup and well as a new iPhone or not from the backup with no change, time to give AppleCare a call - (800) 694-7466 or make an appointment at an Apple Store to have this checked if there is one nearby.

  • I am a newbie...and I think I did a big no-no as my Ipad isn't working.  I synced it to a second computer at work which is a new Imac after already syncing to my pc at home with Itunes.  Now it says it can't restore and can't get it to open.  HELP!

    I am a newbie...and I think I did a big no-no as my Ipad isn't working.  I synced it to a second computer at work which is a new Imac after already syncing to my pc at home with Itunes.  Now it says it can't restore and can't get it to open, getting error messages but can't fix myself.  Can anyone help??

    iPad can connect only in one iTunes Library. If you want to connect it to a iTunes Library then you have to erase it. You can erase it from iTunes. Make sure you iPad doesn't have a password, or if it has a password make sure that you connect to the computer and enter the password of your iPad

  • Safari and iTunes download isn't working. Anybody help?

    Safari and ITunes isn't working, can anyone help? Apps aren't able to open to www.

    I'm sure that a little further explanation would help. What does "Safari and iTunes isn't working" mean exactly? They are crashing? They will not launch at all? Really ... come on ... help us help you ... Explain what is happening.

  • So the left side of my iPhone isn't working at all and I even tried turning it off for 5 minutes about 10 million times but nothing is working. Any suggestions on what to do I need help like ASAP!?

    So the left side of my iPhone isn't working at all and I even tried turning it off for 5 minutes about 10 million times but nothing is working. Any suggestions on what to do I need help like ASAP!?

    Have you performed a reset? Tap and hold the Home button and the On/Off button for approximately 10-15 seconds, until the Apple logo appears. Release both buttons and await restart.

  • HT1554 Apparently, I don't know my "com.apple.smig keychain" password. And I'm in the middle of setting up my new Mac mini. I transferred data from my MacBook and what I thought was the password isn't working! Help!!

    Apparently, I don't know my "com.apple.smig keychain" password. And I'm in the middle of setting up my new Mac mini. I transferred data from my MacBook and what I thought was the password isn't working! Help!!

    Hello,
    See if this helps...
    Mac OS X 10.4 Help, I forgot a password in my Keychain
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh1960.html
    Mac OS X 10.4: Keychain Access asks for keychain "login" after changing login password...
    http://support.apple.com/kb/HT1631
    Resetting your keychain in Mac OS X...
    If Keychain First Aid finds an issue that it cannot repair, or if you do not know your keychain password, you may need to reset your keychain.
    http://support.apple.com/kb/TS1544

  • I need help my computer isn't working and there is no was to get on my iTunes and I just updated my phone and now it's stuck on where it shows the plug connected to iTunes help!!!!

    I need help my computer isn't working and there is no was to get on my iTunes and I just updated my phone and now it's stuck on where it shows the plug connected to iTunes help!!!!

    There is no other way than to plug into a computer to restore the phone. You can use another computer to do so, but in case you did not back up to iCloud your data and settings will be gone.
    Follow this article to connect in recovery mode:
    iOS: Unable to update or restore

  • The sound on my iPhone isn't working I tried putting headphones in and it worked, but as soon as I take th out and the sound countinues playing the sound stops help please

    The sound on my iPhone isn't working I don't understand why it was working fine an hour ago I haven't dropped it or anything simply just out it on silent... The music I was trying to listen to didn't want to make a sound when I turned it in , I put a pair of headphones in and and it worked as soon as I took it off it completely stopped the music was playing still I could see it in the top column that  the play button was on ... Then I made a call an the same thing happened I turned it on speaker and then I could hear them... The sound is completely off even tho i looked at the seettings and put the volume on high noting is sounding on its own not even when i tap the buttons... I took it off the silent before I tried this stuff I don't understand please help !!!

    make sure that your head phones are not attached to the phone then use the volume buttons on the side, if when using them you see a pic of headphones on the screen, then you have some lint in the headphone jack, use some compressed air and blow it out.
    If you dont see that then try to reset the phone, hold down the home and power buttons for 20 seconds or untill you see the silver apple.
    If you are still having a problem restore the phone and set up as new to see if that clears it up.
    http://support.apple.com/kb/ht1414

  • HT204492 can someone help me ? My iMac remote control isn't working properly , well all buttons are working apart from the MENU button !! Can anyone shed any light on this ?

    can someone help me ? My iMac remote control isn't working properly , well all buttons are working apart from the MENU button !! Can anyone shed any light on this ?

    As this is the forum for PPC (pre-2006, non Intel) iMacs I assume that is what you have.
    Try pairing the remote again:
    How to Pair your Remote to your Mac:
    http://support.apple.com/kb/HT1619?viewlocale=en_US

  • My iPod iMessage isn't working after I updated to the 8.2 version ! Help how do I make my iMessage work again ?

    imessage isn't working after I updated to the 8.2 version

    Hello TMT0302,
    I'm sorry, I'm a bit unclear on the exact nature or scope of the issue you are describing. If you continue having issues with iMessage after a recent update to iOS 8.2, you may find the information and troubleshooting steps outlined in the following articles helpful:
    If you get an error when trying to activate iMessage or FaceTime - Apple Support
    If you can't send or receive messages on your iPhone, iPad, or iPod touch - Apple Support
    Sincerely,
    - Brenden

  • HT1526 I can't delete any files, can't empty the trash bin, can't open my iTunes. Safari isn't working properly either. I keep getting the error message -50 when i try to delete anything...HELP!

    I can't delete any files, can't empty the trash bin, can't open my iTunes. Safari isn't working properly either. I keep getting the error message -50 when i try to delete anything...HELP!

    Hello, not too helpful, but...
    enum {
      paramErr                      = -50,  /*error in user parameter list*/
    Usually means a bvad or unacceptable Charachter in a File or Folder name...
    http://support.apple.com/kb/TA20831
    Solving Trash Problems...
    http://thexlab.com/faqs/trash.html
    Open Console in Utilities & see if there are any clues or repeating messages when trying to open Safari or iTunes.

  • My iPod touch isn't working correctly.it is displaying a white light and no matter what i try it isn't helping.tries holding the reset and power button together and tryed holding the power button in but it doesn't work. please can someone help?

    my iPod touch isn't working correctly.it is displaying a white light and no matter what i try it isn't helping.tries holding the reset and power button together and tryed holding the power button in but it doesn't work. please can someone help?

    Try the remaining items in the white-screen topic of.
    iPod touch: Hardware troubleshooting
    If not successful. let the battery fully drain and then charfe for an hour and try again.
    Frequently a white scree nis due to a hardware problem.

Maybe you are looking for

  • Settlement rule - Internal orders

    Hi all Where do I define an automatic settlement rule for settlement of an internal order to a GL account?  I do not find any strategy sequences that would settle to a GL account.... I know that I can use those strategy sequences for cost centers, WB

  • No changes in TU report, but changes in TU scores...

    So I took a drop across the board on TU today.FICO 08                     743->739FICO 04                     713->711FICO AUTO 8            764->758FICO AUTO 4            733->731FICO BANKCARD 8  758->754FICO BANKCARD 4  719->717Not a big drop, but 

  • Special permissions

    I end up with nine pages worth of "We are using special permissions for the file or directory..." when I repair permissions in DiskUtility. I've been attempting to repair permissions for several weeks now, but there's been no change. Can anyone help?

  • Meldung " Bridge funktioniert nicht mehr"

    Hallo ich verwende Photoshop CS 6 seit er veröffentlicht wurde vor ca. einem halben Jahr kam dann das erste mal die Meldung "Bridge funktioniert nicht mehr" diese erscheint jetzt sehr häufig. Dies ganz geschieht immer dann wenn ich in Bridge einzelne

  • Windows forms treeview filtering problem

    Hi, I have a textbox and treeview in C# windows form application. What i want to do is , due to the text data entered in the textbox, the treeview will automatically locate to the entered data dynamically. While i'm  typing , the treeview will refres