How do you use a specific program to open a specific file in java?

I want to use java to create a program that users get to pick what programs to open a file with and then opens it. For example, the user wants to open a .txt file. We all know that many programs can open that- MSWord, Textpad, Notepad etc. What i want to do is automatically open the file the user chose in a program that he chose. If the user wanted MSWord to open the .txt then MSWord will startup and the user should see the file. Samething applies for other programs. Anyone know how to implement this in java? I know you can open executibles but these arent those types... Thanks!

And then you still need - at least in Windows - register all of your files to be opened with your program so it can relay that call.
Frankly, I think I'd hate your program, ahving to make a chioce every time I want to open a file... I mean, how often does it happen that you want to open a file with any other program than the one you usually use? And Windows still has the "Open with..." dialog as well, if I really want to pick something else.

Similar Messages

  • How can you use microsoft office programs?

    how can i bring office homework home done on microsoft programs and use it on my imac?

    You can purchase Microsoft Office for Mac (http://www.microsoft.com/mac/products), then install it on your iMac, and be able to read most if not all Office documents generated on your work systems, be they PC or Mac computers.

  • UTL_FILE: How do you use the ^ as a delimiter from an ASCII file?

    We currently have UTL_FILE pulling in a comma delimited file,
    with this code: With the V_COMMA's declared and other variables
    declared listed below. It works. When we change the ASCII file
    to ^ delimited, the program fails. How do we get the ^ to work
    with UTL_FILE?
    BEGIN
    UTL_FILE.GET_LINE(V_FILEHANDLE, V_NEWLINE);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXIT;
    END;
    /* adding numbers 1-6 to position one on newline*/
    V_COMMA_1 := INSTR(V_NEWLINE, ',', 1, 1);
    V_COMMA_2 := INSTR(V_NEWLINE, ',', 1, 2);
    V_COMMA_3 := INSTR(V_NEWLINE, ',', 1, 3);
    V_COMMA_4 := INSTR(V_NEWLINE, ',', 1, 4);
    V_COMMA_5 := INSTR(V_NEWLINE, ',', 1, 5);
    V_COMMA_6 := INSTR(V_NEWLINE, ',', 1, 6);
    V_ITEM_NUMBER := SUBSTR(V_NEWLINE, 1, V_COMMA_1 - 1);
    V_AVAILABLE := SUBSTR(V_NEWLINE, V_COMMA_1 + 1, V_COMMA_2 -
    V_COMMA_1-1);
    V_ETA_CHAR := SUBSTR(V_NEWLINE, V_COMMA_2 + 1,
    V_COMMA_3 - V_COMMA_2-1);
    V_RETAIL_PRICE := SUBSTR(V_NEWLINE, V_COMMA_3 + 1,
    V_COMMA_4 - V_COMMA_3-1);
    V_DROP_SHIP_FILE := SUBSTR(V_NEWLINE, V_COMMA_4 + 1,
    V_COMMA_5 - V_COMMA_4-1);
    V_COMPANY_FILE := SUBSTR(V_NEWLINE, V_COMMA_5 + 1);

    Thanks for your response!
    I have simplified the sheet so it contains no split or merged cells, yet still I get the exclamation mark where I want the average. (The exclamation mark says 'Numbers can't be divided by zero'.)
    Exam
    Skit
    Exam
    Class Participation
    1
    2
    TOTAL
    MAX. MARK
    55
    30
    100
    15
    200
    ADJ. %
    MARK
    Student A
    37
    20
    84
    15
    156
    78%
    72%
    7
    Student B
    39
    28
    91
    15
    173
    87%
    80%
    8
    Student C
    39
    28
    86
    10
    163
    82%
    76%
    8
    Student D
    34
    26
    92
    15
    167
    84%
    78%
    8
    Student E
    38
    26
    74
    10
    148
    74%
    69%
    7
    CLASS AVERAGE
    37.4
    25.6
    85.4
    13.0
    161.4
    80.7%
    75.0%
    I guess the basic question is: can you actually use AVERAGE on data that is output by an IF formula?

  • How do you use Camera Raw Editor to open jpeg files by default, not using "Open As"?

    I've searched for the Camera Raw setting that is available from the Photoshop (not PSE8) menu but it is not even available in Photoshop Elements 8 that I've been able to see.  Does anyone know where this setting is?

    I had PSE8 set to open any file (tiff, jpeg and cr2) with the camera raw editor.  I can not figure out how it got changed or remember where to make this a default option in PSE8.  I found a video showing it available in Photoshop, main menu, camera raw and then you just check the boxes.  I've been looking for the similar setting in PSE8 again because I'm working through some exercises in a book and it is a nuisance to navigate to the image using the "open as" command every time.  I figured it would be just as easy to set the option by default, then, if I didn't want to use the raw editor, I could just click open from there.  Help?  Thanks so much!

  • How do you Find a Specific File in Joomla with CS5 ?

    Yes ! I have Joomla working inside DW CS5 !!! 
    The mistake which I and maybe everyone else seems to make is that during site creation I would have my local site and testing server being different. If you make them the same DW finds your dynamic pages in Joomla !
    Great - I now see the 300 or so files in my Joomla site.
    Problem: I want to change an embedded in line style on my page which Joomla has created for me.  How in the heck from the 300 files, can I find the 1 php file which contains this 1 element style ?
    any Ideas ?
    Many thanks Vincej

    Maybe ctrl+F -> Search in the entire site -> Code view
    and search for example: style="the inline style;"
    That could be a solution...
    Cheers!

  • How do I find out what program / file is using 100 GB of space on my Hard drive?  Once I find the problem  how do I delete the specific files to increase GB of space?

    How do I find out what program / file is using 100 GB of space on my Hard drive?  Once I find the problem  how do I delete the specific files to increase GB of space?

    Use OmniDiskSweeper
    Once you find file, it can be deleted from within OmniDiskSweeper
    Allan

  • How do you use the bluetooth VIs with a Microsoft Bluetooth Driver?

    How do you use the LabVIEW Bluetooth VIs with the Microsoft Bluetooth driver?  I have been trying with no such luck.
       I want to use 2 computers to talk to each other using the bluetooth VIs.  Eventually, I think we would like a PDA/phone to talk to a custom built electronics board with Bluetooth.  But for now, I would just like 2 computers to talk and then eventually talk to our own device. 
    One is a desktop w/ the Belkin F8T012 USB adapter.  It installs fine with the Belkin driver (but I know I need to use the Microsoft Driver in order to use the LabVIEW VIs, but I have tried to get Windows to install its own but it says it is a BCM92045DG-Flash.  It says it cannot install it because it cannot find the necessary hardware.  I thought this USB adapter was on the approved Bluetooth devices list?  What else should I try?  Another Bluetooth USB adapter? 
    The other computer is a Dell Latitude 820.  It has a built in Bluetooth module which I believe is the Dell 350 Bluetooth Module.  On this machine I have been able to setup a COM port with a bluetooth device (blood glucose meter).  It came with a serial port interface which we modifed to go through a bluetooth interface.  It comes up as COM40. We have been able to communicate to it using their program originally designed to talk through a serial port.  But we would like to use the Bluetooth VIs in LabVIEW.  I can't even use the Discover VI.  Perhaps it is not using the Microsoft Driver as well.  Do I just uninstall the driver and then try to have Windows install its own driver?  Do you have any other recommendations?
    Thanks,
       Javi

    Hi Javi,
    This sounds like an issue with Windows and your specific Bluetooth devices.  As you mentioned, the LV Bluetooth VI's do require that the devices use the Windows drivers.  Take a look at this link for specific requirements for using Bluetooth with LabVIEW.  Also, you can take a look at our Developer Zone tutorial on designing Bluetooth applications a found here.  Regarding your device drivers, sometimes it is as easy as uninstalling the driver and then letting Windows discover the device and fine its own driver.  You could check out the Microsoft Knowledgebase for more information.  Thanks and have a great day!    
    Stephen S.
    National Instruments
    1 Test is worth 1000 expert opinions

  • How do you use forward and back button on mouse and use "zoom" in web browser.

    Ok so apparently this forum is ruled with an iron fist or something my very honest and truthful problems with these issues seem to have been instantly deleted in my last discussion?
    I'll try this once more.
    1) How do you use the forward and back button on a mouse without having to buy a product like Steer Mouse? There must be a way to do this without having to buy a program given it's such a useful feature that 99% of users need. I don't want to spend hours researching something that should already work. Any advice?
    2) How do you zoom in for web browsers like Chrome without it globally zooming in everything on the monitor (even background applications). I don't want to zoom in background applications. I want to be able to zoom in the web browser and still maintain all the features like the side bar, not just a little magnifying glass type thing.
    I'm currently zooming in with the CTRL-Middle Mouse button, but I can't find a way to use this feature so it's useful to browse the web it seems to not scale the browser correctly but rather is a global zoom. Any solution for this?

    Thanks so much!
    Like I said I am new to Apple products so it's still unclear to me which programs I do or don't need as I'm setting up and configuring all my software and devices.
    The Logitech Control Center appears to work perfectly for what I was trying to do!
    I accidently clicked "This helped me" instead of "This Solved My Question", sorry about that this was a solve!

  • How do you use the Multiple Item Information dialog box ???

    How do you use the Multiple Item Information dialog box ???
    Where are the instructions on how the information in the Multiple Item Information dialog box equates to ...
    1. The way iTunes sorts tracks and albums
    2. The reason to select a leading check box
    3. Why there are Option selections (Yes /No) and leading check boxes.
    4. Why some changes remain in the track info, but do not "take effect" in iTunes (Part of a compilation is an example)
    Looked in Help, Support, went to the local Genius bar for an hour, even arrainged a call from apple support ...
    Thanks

    As Christopher says, it's a compilation. Different tracks are by different artists.
    Setting the *Album Artist* field to *Various Artists* and setting *Part of a compilation* to Yes should be all that is required. Depending on your *Group compilations when browsing* setting ( I recommend On ) either should suffice but I suggest doing both.
    Based on your commentary, I selected all the "O Brother" tracks, and checked the boxes for everything line that was blank in the Info and the Sort panes. Only exceptions were the album name and the disc number 1 of 1 and the artwork. I blanked and checked anything else.
    That's not what I meant. When you select multiple tracks, only those values which +are already common+ to all tracks are displayed. Typically these will include Artist, though not with compilation albums, Album Artist, Album, No. of Tracks, Genre plus various sort fields. A blank value may indicate that different tracks have different values or it may be that the value is blank for all tracks. For the drop down values on the Options tab the value shown may not reflect the information in every tag. If values you expect to be common, such as Album Artist or the Album title are not displayed you can simply type these in and click OK. This will often be enough to group the album.
    If you place a checkmark against the blank boxes and apply changes then you will clear those fields so you should only do this if that is the effect you want. Putting a checkmark next to an empty (representing different values) *Track No.* box, for example, will just clear the all the track numbers which is very rarely useful.
    Adding then removing extra text is for a specific problem where despite all common values being identical across the tracks of the album iTunes seems to "remember" that it should see two albums. A typical example would be when an album originally listed as *Album CD1* & *Album CD2* is given disc numbers X of Y and then has the Album name changed to Album. I've seen iTunes merge all but one track into the new album, but insist on listing one remaining track separately, despite both albums having the same title. In this case I've found overtyping the album title again has no effect whereas changing it to AlbumX and then back to Album does what I was trying to achieve in the first place.
    Don't forget that even properly organsied albums may still break up if you don't chose an album-friendly view. Sorting on the track name or track number columns can be useful in some circumstances but in general I revert to Album by Artist when browsing through my library.
    tt2

  • How do you use one managed session bean from another?

    Hello -
    I am a complete newbie to JSF coming from Struts 1. My question is how do you use one managed bean from the method of another one? I think this would be a common senario. For example I put a bean in session scope when a user logs in and in a different method within a different bean I want to get some of this user's information. What is the correct way to retireve one bean from a method in another with session scope?
    Also what would the code look like to retieve another bean from the method of a managed bean where the bean you want to retrieve has application scope?
    Thank you in advance.

    Sinplicity wrote:
    Could you be a bit more specific? If a bean is configured in the faces config file then all of it's properties are managed, correct?Not necessarily.
    What would the code look like to retireve the bean?You don't retrieve it, it has been injected.
    Can I retrieve the whole bean or just a property of the bean. I would be really interested in seeing how this is done in code? And would really love a bit more information on what it means to be a managed property?Time to consult a JSF tutorial.

  • HT2534 How do you use an iTunes card after you have redeemed it?? I have entered my code for redeem and when I click on purchase song it asks me for a credit card?!

    How do you use your iTunes card after you have redeemed it. I have entered my redeem code and my balance is $20.00 but when I go to buy a song it asks me for my credit card details...?!

    If you set up an Apple ID already and didn't enter credit card details because you were planning on using gift cards only, you probably set up the account incorrectly. If this is the case, you will have to enter the credit card details even if you want to use only gift cards and download free content only. Yoy will not have to use the card, but you can't use the ID without entering the card details now. You may be able to remove the card as well after the card is verified for use by Apple by editing your account details.
    There is a very specific manner in which you have to set up an ID without using a credit card. You can read about it here.
    http://support.apple.com/kb/HT2534
    See this about changing iTunes account information.
    http://support.apple.com/kb/ht1918
    If you decide to create a new ID now, you will new another email address as wel, because the email address that you are currently using will already be associated with the ID that you just set up.
    I am making certain assumptions here and reading between the lines of your post, so if I am guessing incorrectly, post back with more details.

  • How do you use a column title Ina formula in numbers

    How do you use a column title in a formula in numbers ie. "cost" vs. F-1?

    Have you tried here?   This isn't specifically a "Using iPad" question.

  • How do you use inspirion 13 7000 stylus with adobe photoshop cc

    how do you use inspirion 13 7000 stylus with adobe photoshop cc? Doe anyone know how to use the stylus on this dell 2 in 1? I was told by dell that you could use the stylus to edit in photoshop but its not working-

    You are asking a huge question. You'll get a better response if you ask something specific about a problem you are having with layers.
    I'm not trying to be mean but you can find vast amounts of basic info on layers with a simple Google query. If you click the Video link after inputting a search query, you can even find video tutorials.  YouTube  is one place that has quite a few video tutorials.
    How layers work hasn't changed between Elements versions.  Layers work the same in Photoshop. The application interfaces may be slightly different but layers are layers.
    FWIW, I'm not a big fan of the manual. You're better on getting something like "The Missing Manual" by Barbara Brundage or looking for info on the Internet.  One free resource with tons of info can be found here:
    http://www.garymgordon.com/misc/tutorials/photoshop_tutorial/elements/psE_intro.htm
    The tutorials found at the above link use an older version of Elements so you won't find info on the newest tools and features but the basic Editor info on layers and the tools still apply.

  • How do you use image tags

    How do you use Image tags. Thank you

    Hi John,
    Have you seen this video? It describes how to apply default image tags to your pictures, and then describes how to create new, custom tags. Is there something more specific that you're wondering about? I'd love to help!
    Cheers,
    Michael

  • How do you use Default Resource Access Information?

    I have some 10g Forms & Reports that I want to use with SSO and they will all be connecting to the database with the same connection info. I know how to configure a Default Resource Access Information, but how do you use this with Forms & Reports?

    Douglas,
    the default Resource Access Infomation should be the connection information right? This is used in conjunction with SSO. You need to configure your F&R applications to delegate authentication to SSO by placing ssoMode=true in the config section of formsweb.cfg.
    The Forms Servlet will connect to OID retrieve the Resource Access Information (descriptor) for a given user and automatically log them into the application.
    Users will need a global identity in OID and SSO must be enabled to use resource access info with F&R
    regards,
    tt

Maybe you are looking for