Is there a general way to find any type of file IN a JAR ?

Hi I've written an application that I want to distribute in an executable JAR format. The application runs find when I double click the Jar but ONLY when the config file is outside the Jar, however I want to distribute every thing in the Jar, because I want my program to be self contained.
I've read a lot of threads, read the Sun tutorial for JARs, but I haven't found a general way to find files within the Jar. Pehaps I should set the Class-Path in the manifest, but from what I've read in Sun Tutorial that seems that it only works for Classes.
So my question is:
Is there a general way to find any kind file ( *.txt, *.dat, *.for ) that is not a *.class, within the Jar ? Is that done on the manifest or when creating the Jar ?
The code for the app that actually works is:
            URL url = getClass().getResource( fileName );
            inputFile = new File( fileName );
            fr = new FileReader( inputFile );
            char[] dat = new char[ (int) inputFile.length() ];
            fr.read( dat );
            sDat = new String( dat );
            fr.close();
            // Parse config.txt
            System.out.print("Reading metaconfig parameters...\n");
            parseFile() ;where filename is "./config.txt".
I intend later to use a *.dat file wich will contain an object with the necessary data to configur the rest of the program instead of a *.txt file
Hope you can help me
Thank you !

Hi
For list of vairbles used in the query.
clik the tab query properties present on the top when u open the query in the change mode.
when u clik the query peroperteis u geta a screen which shows the sequence of the vairbles used and even u can change the sequence as per ur convenience
hope it is helpful asssign points if applicable
thanks
puneet

Similar Messages

  • Is there a way to find any of the old desktop photos from previous versions of iOS

    I would like to know if there is a way to install any of the old operating systems desktop picture onto Mavericks desktops photos? (Like the clown fish, or flowers)

    Never really cared for those myself, but...
    http://tinyurl.com/jwpu3la
    There they are.
    Just unzip the file, and copy them to Mac HD/Library/Desktop Pictures

  • On a Windows 7 computer I installed Firefox 9.0.1 and in my edit menu I have NO Preferences at the bottom, so there is no way to adjust any settings

    On a Windows 7 computer I installed Firefox 9.0.1 and in my edit menu I have NO Preferences at the bottom, so there is no way to adjust any settings The edit menu opens up and I have undo, redo, cut, copy, paste,delete,select all, find....but NO Preferences at the bottom. This is a new laptop and nothing like skype is installed. The Firefox install is new today 1/6/12

    Hi bruce,
    What are you actually looking for? On Windows 7 your options will be under ''Tools > Options''. If you have the ''Firefox'' menu, you can hit ''Alt'' to temporarily enable the menu bar.
    Your System details say Linux. Your say you are on Windows 7 though, correct?

  • Is there an easy way to find out if a user has a message in their voicemail.

    Is there an easy way to find out if a user has a message in their voicemail from the
    UNITY subscriber page? Or anywhere I can look to see if they do.  I don't have access to the exchange servers.  We are currently running UNITY 5.0(1).  thanks

    The only way you'll be able to do that is to login to Outlook Web Access, or possibly setup an IMAP client to that user's mailbox or have TAC run the DohPropTest in attach mode to return the contents of the user's inbox.  If the first two don't work, I'd go with the latter and let TAC help you verify if there are any messages in the inbox that are unread.
    Hope that helps,
    Brad

  • I lost my ipod touch, i know there is a way to find it through what i have purchased, i have an ipad as well, so i do not know if the system differenciates and how to do it

    I lost my IpodTouch; I know there is a way to find it as in a google map, but I do not know how, can someone tell me ?? I do not even have the ID for the ipod but through purchases in the i store, can I know and then look for it?

    In the source pane on the left click on "faces"
    You may want to watch the iphoto tutorials - https://ssl.apple.com/findouthow/photos/
    LN

  • Is there a way to find where you imported files from?

    I imported a batch of photos from a wedding. Edited them all, and then I moved the original files from their native folder. This created the "This file is offline or missing" dialogue. I tried moving the files back but with no luck. I think I just forgot where they were originally at.
    So, my question is, is there was a way to find out which folder you imported the files from so I can put them back in place and export them without losing a weeks worth of edits?
    Thanks,
    Cody

    If you left click on the question mark it will throw up a dialogue (a) advising you that the file is missing (b) show you the last location it was located and (c) offer you the option of pointing LR in the direction of where the image can be found. Often, when LR is given the new location for one image it manages to do the rest.
    The alternative is to right-click on the top level folder in the libraries left hand panel and choose 'locate folder'. Again, once the top level folder has been located LR usually updates the sub folders.
    When moving folders etc around it is better to do this from within LR itself therebye preventing these sort of problems.

  • I moved several folders from my Mac to iCloud and I cannot easily find them.  Is there an easier way to find them instead of searching in Spotlight?

    I moved several folders from my Mac to iCloud and I cannot easily find them.  Is there an easier way to find them instead of searching in Spotlight?

    If you have facing pages, you have to set up the document with facing pages that is what is it for. If you have a spreadwide design as above, keep the spreads together. There is not even one reason not to do so.
    Only for wire-O-bindings might a different workflow useful, but also with facing pages documents and only when the left page and the right page have not a spread wide design:
    //// I did one mistake, I created a doument with a right binding, but it would work the same way with left binding.)
    1. Create a document with Facing Pages.
    2. Select the Spread in the Page Panel (Window > Page Panel) and in the panel’s flyout menu deselect "Allow Selected Spread to Shuffle". The spread’s page number will appear in brackets.
    3. Select a single page of the spread and drag it to the side until a vertical bar appears.
    4. Now you have the result.
    Left and right pages have their own spread and will have a bleed around each page without taking information from the other page.

  • I have a lot of duplicate songs on my iPhone 4--Is there an easy way to find and delete duplicates?

    Is there an easy way to find and delete duplicate songs on an IPhone 4?

    A belated hello.  On the topic of duplicate songs / tracks showing up in, say, your iPhone Music app but not in your iTunes Library, with these versions installed ....
    iTunes 10.5
    iPhone 4 running on iOS 5
    .... I discovered this too.  This is what I did:
    1. purchased full album from the iTunes Store
    (once download completed, album magically showed up in iPhone Music app, as expected, without having to sync)
    2. I then went to my iTunes Music view and edited the album year (Multiple Item Information)
    3. Synced
    4. All album tracks showed up in duplicate in iPhone Music app (but not in iTunes view)
    Solution:
    1. in iTunes, I changed back the album year to the one iTunes Store originally downloaded
    2. Re-synced
    3. Now all album tracks show up but no longer in duplicate in iPhone Music app
    Lesson learned: When purchasing music from iTunes Store, leave metadata untouched.

  • My Iphone was lost but wasnt set up for (Find my Iphone). Is there still a way to find it/

    My Iphone was lost but wasnt set up for (Find my Iphone). Is there still a way to find it?

    Yes, the old fashion way, look for it.
    If you didn't enabled find my iphone in icloud settings, then you can't search for it online.

  • My Macbook Pro can't find any of my files!

    Hi there,
    Since yesterday, my Mac suddenly can't find any of my files anymore. All the folders are there, but all the files are missing. There are 2 big question marks on the top of the finder window and when I click on them it says that files cannot be found. I have no clue what to do now. The only thing I did before this happened, was deleting my downloads folder, but nothing more. It's weird that all the folders are visible but the content not. Anyone experienced this too? What can one do in a case like this?
    Thank you for any help!
    Raphaela

    Did you run a disk check on it? You might have data corruption. The big question mark on the top of the finder window, I believe is a short cut, not the actual file. Did the actual file move? Did you rename the file? Did you change anything, like your username? Did KIDS use your machine? KIDS can do some silly stuff to your computer without even realizing it. I know this option may sound OFF BASE, but do you have a faulty trackpad, or use excessive hand lotion? (I have seen both of these cause undesired file moves, renames, etc...)
    I would run a disk check, and if available, use Disk Warrior, Drive Genius or similar to rebuild the directory.
    If that does not help, I would search for the file using Spotlight, or a 3rd party app like Find Any File.

  • Okay so I'm trying to download Adobe Flash Pro. I've gone to creative cloud and downloaded "Flash Professional CC and Mobile Device Packaging (2014)" and I have no idea what to do afterwords... There's no way to open or run the file. And to be honest, I'm

    Okay so I'm trying to download Adobe Flash Pro. I've gone to creative cloud and downloaded "Flash Professional CC and Mobile Device Packaging (2014)" and I have no idea what to do afterwards... There's no way to open or run the file. And to be honest, I'm not even sure if it's the right download... Help!

    I'm using PC with Windows 8.1. I got onto the Creative Cloud and downloaded "Flash Professional CC and Mobile Device Packaging (2014)". <--- That would be the file. I can't open or run it from CC and I couldn't find a file in my computer either.
    I've also found direct downloads for the trial version and hit the set-up button, it loads up, and then nothing happens.

  • When i go to about this mac and look at my storage it says that i have 33GB of music. i recently deleted 2 user accounts but can't find any of these files. Where do i go to delete these files?

    when i go to about this mac and look at my storage it says that i have 33GB of music. i recently deleted 2 user accounts but can't find any of these files. Where do i go to delete these files?

    What are you asking? Where music is stored or where the user accounts were stored?
    Music should be in the music folder - perhaps inside of an iTunes folder.
    User accounts should be on the home directory.

  • HT4946 hii, on my iphone 4s, i tried upgrading my OS and i was asked if i needed back up and i said yes, after upgrading i couldnt find any of my files, document, pictures, music and all. please i need help please.

    hii, on my iphone 4s, i tried upgrading my OS and i was asked if i needed back up and i said yes, after upgrading i couldnt find any of my files, document, pictures, music and all. please i need help please.

    Hi,
    usually when you upgrade, it should not delete your files, but if it happens, than you should have a backup.
    Unfortunately it is very common, that people don't know, what exactly is in the backup.
    The question is, what files exactly you are missing? Own pictures, or taken with the device? Purchased music form the iTunes Store, or own? ....
    Documents and files are mostly up to the developer of the app, if they are part of the backup, usually not and you need to transfer them before.
    In the backup you will find just pictures from the Camera Rolle folder, everything else you should have on the PC, if you had it on the device.
    Same then for music, you can transfer purchased music from the device, but your own works just one direction, from PC to device, from device to PC it doesn't work.
    In future I recomand you to be sure how the backup works or use a 3rd party app (iExplorer) where you have a little bit more "freedome" than with iTunes.
    Or you maybe just restored from the worng backup

  • I wish there was a way to get a layered PSD file

    I wish there was a way to get a layered PSD file from a layered InDesign file.
    That would be handy.

    Hi
    Bookmark management is important, especially when using multiple browsers. Unfortunately, each browsers approach is sorely lacking.
    Given you have numerous bookmarks, consider trying out a 3rd party Bookmark Manager. The best out there at the moment is Bookdog. I'm not sure if it permits color coding of folders, however, it seems to simplify locating and managing URL's. Sometime later this year, the vendor this replaces this product with one better suited to Leopard. It's called BookMacster.

  • Whenever I open a file of any type, that file will open, as well as multiple other files I do not wish to open.  How do I prevent this from happening.

    Whenever I try to open a file of any type, that file will open, as well as several other files I do not wish to open.  How do I prevent this from happening?

    Dealing With The Resume Feature of Lion
    Managing Mac OS X Lion's application resume feature.
    If you shutdown your computer you should get a dialog asking if you want applications to resume on the next startup. Simply uncheck the box to prevent that from occurring. Open General preferences and uncheck the option to Restore windows when quitting and re-opening apps. You can also install a third-party utility to control resume features on individual applications: RestoreMeNot or Application State Cleaner.
    It is possible to completely stop the Resume feature although I'm unconvinced that it is that annoying. Nevertheless see the following:
    If you have not yet done so you must first make your /Home/Library/ folder visible. Open the Terminal application in the Utilities folder. At the prompt paste the following command line:
    chflags nohidden ~/Library
    Press RETURN. Quit the Terminal application.
    In the Finder navigate to the /Home/Library/Saved Application State/ folder. Delete the contents of the folder. Back up to the /Home/Library/ folder. Select the Saved Application State folder. Press COMMAND-I to open the Get Info window. In the Sharing and Permissions panel at the bottom click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window.
    Quit all open programs except the Finder (this is very important.) Next, navigate to the /Home/Library/Preferences/ByHost/ folder. Look for a .plist file with "com.apple.loginwindow." in the file name followed by some numbers in hexadecimal. Select the file. Press COMMAND-I to open the Get Info window and in the Sharing and Permissions panel click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window. If you also find a file with the same filename but with a last extension of ".lockfile," then you should delete it.
    The above should eliminate the Resume feature system-wide. Note that any future system updates or upgrades will likely undo these changes. You will then need to repeat this procedure assuming there are no major changes in OS X related to it.

Maybe you are looking for

  • File not found error on Mandrake 8.0

    My installation stops on 54 % and a popup message appears complaining that some files are not found on Disk2. As I have no alternative I give <Ignore> for the 10 -15 popup windows that appear, and the installations continues. In the link phase the po

  • Cairo-dock 2.2.0

    Updating with $yaourt -Syu --aur, I get a possible update: aur/cairo-dock-plug-ins 2.1.3-9 -> 2.2.0-4 Then, calling for its compilation, one of dependances "cairo-dock=2.2.0" has to be updated too. but later on, it wants to re-install the current ver

  • Installment plan v/s payment schema

    Hello, Instalment paln and payment schema(Budget Billling) both does the same functions.If i am right what are the differences. which gives the higher flexibility?where, how , when we use????

  • Stretching Panel Splitters

    Hi, I have a template in which I have placed many facet references. I use this template as the base for all my pages. I have the layout set up in which I have a facet ref for a left side navigator, a top menu area, and a place for the individual cont

  • Making a Twitter logo in Illustrator and Photoshop

    Hi I'm trying to make a twitter profile picture for a business incubator. I have the incubator logo as a vector file in illustrator and I've resized it to fit a 73x73 pixel sheet (73x73 is the size of the profile picture in Twitter). It all looks fin