How do you open a directory ?

Hello everyone !
My situation :
I'm working on a small application that manages all my pictures in a directory.
My problem:
My application should open a subdirectory, not a file. This is what I got to view a picture :
private void openPicture(String name)
               String location = "D:\\Pictures\\"+name+".jpg";
               try
                    Runtime.getRuntime().exec("cmd /c \""+location+"\"");
               } catch (IOException e)
                    JOptionPane.showMessageDialog(this,"Error while openening the file !");
                    e.printStackTrace();
          }So now I want it to open a SUBDIRECTORY(and view it in my Windows explorer) instead of opening file..... Any ideas ?
And YES, I'm new to Java programming --> Apologies.
Thanks

Thanks for the quick reply !
That JFileChooser looks interesting to use later, but I won't need it now ! =)
As I'm just working on my Windows platform, I found this :
private void openDirectory()
               String location = " D:\\Films\\"+dc.getIDMovie()+"\\";
               try
                    Runtime.getRuntime().exec("explorer.exe"+location);
               } catch (IOException e)
                    JOptionPane.showMessageDialog(this,"Error while openening the directory !");
                    e.printStackTrace();
          }Stupid me, could've found this immediately.
Thanks anyway for the reply and have a nice day !
Andrew

Similar Messages

  • How do you add a directory to a manifest.mf file, andf in what order.

    How do you add a directory to a manifest.mf file in a JAR file, andf in what order.
    I know how to set a classs files and file class's & Main Class's not a problem, but how about a directory/folder.
    The Directory/folder contains class's. My prog can run the class's from a Jlist, as long as I set the classpath directly by control panel user varaibles manully or by a Bat file running in the back ground.
    any crazy ideas I'll excecpt and give a bloody good try.
    I tried.
    Class-Path: C:/bb/
    Class-Path:C/bb
    Class-Payh:bb
    Class-Path:bb/
    Class-Path: \bb\
    Class-Path:bb\ Not to sure if I've tried this, ttto many beers cans drunk at this stage.
    Friday night is beer night.
    WHAT am I doing wrong, or doing that can't be done with a JManifestMF file.
    Maybe Wrapper, and not the type that turn decks, and look at very low cameras while singing.

    If I open Font Book, and choose named font, I can see a list of symbols, e.g.
    If I open Character Viewer, and switch to Pictographs, I can see something like this
    so I assume that named font includes chars in the category Pictographs, which you can use at ease, I hope.
    If you need them frequently, you may create your custom keyboard layout, if you wish this, come back with what you wish.
    Screenshots are in Lion, but the procedure is the same, I hope.

  • How can i open the directory/​folder and read all the files inside it in order and then close it?

    How can i open the directory/folder and read all the files inside it in order and then close it? any example would be nice.
    thanks

    In the File I/O>>Advanced File Functions Palette is a function named "List directory". This function will give you two arrays. One contains the names of all subdirectories the other the names of all files. If you want to sort them by name use the array sort function. If you want to sort them by another attribute use the File/Directory Info function to get more data. Use a cluster which contains the attribut to sort and the original index of the name. Then sort this array.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • How do you open the DVD tray on a K430 without using Windows Explorer?

    How do you open the DVD tray on a K430 without using Windows Explorer? I can't find a button on or below the door.  Am I missing something?  Additionally, will the K430 boot from a DVD/CD if it finds one in the DVD tray instead of the hard disk?  Please help. Thanks. 
    Solved!
    Go to Solution.

    hi penguin247,
    Regarding your questions:
    1. Can you try to press the eject symbol on the DVD bay and observe if the DVD tray comes out.
    Link to picture
    2. By default, the HDD is set as the first boot device and the ODD second on the K430. You will need to change the boot order or continuously tap F12 during POST to boot from the ODD (assuming you have a bootable media inserted).
    Regards
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • How do you open a PDF using Adobe Reader on your IPad in IBook?

    How do you open a PDF File using Adobe Reader on your IPad When in IBook?

    You can't. When you're in most of the PDF readers, the Share button gives you the option of Open In another app. But iBooks does not.
    You need to add your PDFs through the iTunes method which Alec wrote about here:
    http://forums.adobe.com/thread/1040579?tstart=0
    Or you can use another way of transferring your PDF to the iPad, like Dropbox. You install the Dropbox app on your iPad and copy your PDF from Dropbox (cloud application). It opens in Dropbox app and you use the Share icon to move it into Reader.

  • How do you open a .cwk document in pages?

    How do you open a .cwk (the old Apple word processing program) document in Pages?

    If it's an AppleWorks 6 document, Pages 4.3 will open it. It won't open older AppleWorks documents, and Pages 5 won't open those.
    (101294)

  • How do you open a PDF that comes in as a winmail.dat on an iPad2

    How do you open a PDF file that comes in as winmail.daton an iPad2?  Is there any setting that I need to turn on?  Or do i need to purchase a converter to make this work?
    Thanks,
    firehorse7

    You could ask whoever sent it to you to resend the email, but not in rich text format : http://support.apple.com/kb/TS1506
    Otherwise there are a number of apps in the store that say that they support winmail.dat (search for 'winmail.dat')

  • How do you open a multi page tif be opened in Photoshop?

    I have an embedded tif with a render, shadow layers and other channels in one tif. (Not created in Photoshop)
    I thought it was multilayered tif, but I think it's called a multi page tif.
    When I open it in Photoshop it opens the top layer/page, and none of the others. (It doesn't give the option to choose a page/layer either).
    How can you open the tif in Photoshop and still access all the layers?
    I thought it would be like opening a normal tif created in Photoshop...

    Nope. Render it again to separate files or split it in another program.
    Mylenium

  • How can you open photos in adobe reader x

    How can you open photos in adobe reader x

    You can't - Adobe Reader will only open PDF files.

  • HT201769 how do you open a photo database file?

    how do you open a photo database file?

    You have to tell us a whole lot more for us to help you.
    You attached an article about rebuilding an iPhoto library, which is done on a Mac, not an iPad.
    Exactly what are you trying to do and failing at?

  • Final cut X-- how do you open previous projects?

    i must be missing something really basic. How do you open previous projects in Final Cut X? When I try to open one it hangs on "loading (nameofproject) into time line.

    You need to provide more information. Are you seeing it within the FCP interface properly when you go to show the Project Library?  If so, I would click on it to select it and then open the Inspection window and click on Modify Event References and select proceed from there. I'm assuming you have not moved the project from it's proper folder....

  • Please Help.  How can you monitor a directory using jndi connection to a ldap server?

    How can you monitor a directory using jndi connection to a ldap server? I
    want the ldap server to monitor the content change in a file system
    directory on another computer on the network. Can someone please help.
    Thanks
    Fred

    Hi,
    Why do you want to use LDAP for Hard disk monitoring..???
    U can do this by creating a MD5 checksum for all the files existing in some
    perticular
    directory and every hour or any configurable period u can recalculate the
    checksum
    to find out the change in the content.
    I guess all u need is to get the code for "updatedb" utility of Linux and
    instrument it for ur needs..
    Hope it helps...
    -aseem
    mr wrote:
    How can you monitor a directory using jndi connection to a ldap server? I
    want the ldap server to monitor the content change in a file system
    directory on another computer on the network. Can someone please help.
    Thanks
    Fred

  • How do you open Illustrator CS6 files in CS5

    how do you open Illustrator CS6 files in CS5

    Hi codfather33,
    Please downsave your Ai file from AICS6 to Illustrator CS5 version and then open this file in AICS5. This would ensure that any content is not dropped or expanded unwantedly.
    Thanks,
    Dhirendra

  • How do you open a DVD/file in another search engine

    how do you open a DVD/file in another search engine?

    Hi
    I think it is simpler than that: place DVD in computer and then try to run a video from the disk. It will not run using Safari, but I know it runs in Firefox which I have on the computer.
    I believe that I can depress one of the moifier keys while clicking an item on the application menu bar to open a menu where you can open the dvd using Firefox or another application.
    Should be simple, but yet to find solution.

  • How do you open Photoshop in Administrator mode?

    how do you open Photoshop in Administrator mode?

    In Windows, right-click on the PS icon, choose "run as administrator", enter your admin password when asked for it.

Maybe you are looking for