Setting file type to open in WebStart Program (Opened file as parameter)

Hi --
I've created a Java program & installed in on my PC using Web Start. Now I'd like set all .sit files to automatically open in my program. My program expects a file as input, and I'd like the opened .sit file to be that parameter.
I've tested this using a batch file to run the program (instead of Web Start), and that worked fine. I'm not able to get this to work with a Web Start program, though.
I opened My Computer & went to Tools / Folder Options / File Types. I created an SIT extention, and I tried a number of things:
1. I had Web Start place a shortcut on the desktop, and then I selected that shortcut from the list in the File Types window --> I got a "TooManyArgumentsException" when I double-clicked on the .sit file.
2. I tried to set the File Types setting to http://myserver/myapp.jnlp. --> Windows recognized that this wasn't an executable & wouldn't let me save it.
3. I created a shortcut to http://myserver/myapp.jnlp and pointed the File Types setting to that. --> Windows wouldn't let me save that.
4. I clicked the Advanced button on the File Types tab, and created an open action. I tried the same three things there & got the same results.
Is it possible to do what I'm trying to do (force .sit files to open in my Java Web Start program and send their filename into the program's main method as a parameter)? Does anyone have any pointers?
Thanks,
Bonnie

This is a new feature in Java Web Start 1.5, and in the 1.5 version of the JNLP specification.
The <association> tag in the jnlp file can be used to ask Web Start to create the fextension/mime-type asociation for ".sit" extensions so that if you click on a ".sit" file, the system will launch "javaws -open clickedfile.sit yourapp.jnlp" see:
http://jcp.org/aboutJava/communityprocess/maintenance/jsr056/jnlp_spec.html#4756982
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html#information
/Dietz

Similar Messages

  • How to set Screen type "Selection Screen" in Dialog program

    Hi Experts,
    I have copied a screen 400 from a program into my program. In that screen in source program, the screen type was defined as 'Selection Screen'. After i copied that screen into my program, the screen type Selection Screen option is disabled. How to set the screen type of a screen to Selection Screen.
    I am currently getting the following error
    "Error when generating the selection screen "0400" of   "Ztest_screen                 ".
    I tried running the generation program RSDBGENA. There the diagnosis was given as follows:
    When generating the report Ztest_screen and its selection screen, an existing screen 1000 (not a selection screen) was overwritten.
    The selection screen was defined as follows:
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK blck1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    PARAMETERS:     p_werks TYPE werks_d OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blck1.
    SELECTION-SCREEN END OF SCREEN 400 .
    I am calling the screen 400 with selection screen declarations in PBO of screen 0100.
    CALL SUBSCREEN sub_scr INCLUDING 'Ztest_Screen'  '400'.
    Where am i going wrong? Your inputs are needed.
    Thanks

    Thanks Przemysław and Nabheet for your suggestions.
    I had copied the generated screen 400 also from the source program into my program. This was the error. I deleted that and the report got activated now.
    Both the source and destination programs are not module pool. They are executable programs.
    Thanks

  • How to set default file type for Open dialog

    Dear my friends,
    I am using "At selection-screen ON VALUE-REQUEST FOR filepath" to display open dialog and i want to set default file type for open dialog = *.txt.
    Thank your times !

    Hello,
    U can make use of this code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SP_FILE.
      PERFORM SAVE_DIALOG CHANGING SP_FILE G_F_RC.
    FORM SAVE_DIALOG CHANGING PO_FILE PO_RC.
      DATA: L_VA_BOXTITLE     TYPE STRING,
            L_VA_DEFAULTFILE  TYPE STRING,
            L_VA_DEFAULTNAME  TYPE STRING,
            L_VA_DEFAULTPATH  TYPE STRING,
            L_VA_DEFAULTFULL  TYPE STRING,
            L_VA_FILTERTEXT   TYPE STRING,
            L_VA_CODE         TYPE I.
      CLEAR: PO_RC, G_F_CONF.
      L_VA_BOXTITLE   = TEXT-B01.
      L_VA_FILTERTEXT = TEXT-B02.
      IF PO_FILE IS INITIAL.
        CLEAR L_VA_DEFAULTFILE.
      ELSE.
        L_VA_DEFAULTFILE = PO_FILE.
      ENDIF.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
        EXPORTING
          WINDOW_TITLE            = L_VA_BOXTITLE
          DEFAULT_EXTENSION       = 'TXT'
          DEFAULT_FILE_NAME       = L_VA_DEFAULTFILE
          FILE_FILTER             = L_VA_FILTERTEXT
          INITIAL_DIRECTORY       = 'C:SAPWorkdir'
        CHANGING
          FILENAME                = L_VA_DEFAULTNAME
          PATH                    = L_VA_DEFAULTPATH
          FULLPATH                = L_VA_DEFAULTFULL
          USER_ACTION             = L_VA_CODE
        EXCEPTIONS
          CNTL_ERROR              = 1
          ERROR_NO_GUI            = 2
          OTHERS                  = 3.
      IF SY-SUBRC <> 0.
        PERFORM CHECK_ERRORTYPE(Z48M_MATDATA_UP) CHANGING SY-MSGTY.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        CLEAR PO_FILE.
        EXIT.
      ENDIF.
      IF L_VA_CODE NE 0.
        MESSAGE S818(3F) WITH TEXT-011.
        CLEAR: PO_FILE, PO_RC.
        EXIT.
      ELSE.
        WRITE L_VA_DEFAULTFULL TO PO_FILE.
        G_F_CONF = G_C_XFELD.
      ENDIF.
    ENDFORM.                    " save_dialog
    If useful reward.
    Vasanth

  • Associate a file type or protocol with a program.

    I have Windows Vista… and I tried to change the program to open file .url "Internet Shortcut" with Safari, I went to Start > Control Panel > Default Programs > Associate a file type or protocol with a program.
    The 'Associate a file type or protocol with a program' dialog box is displayed.
    Under the 'Extensions' heading, select '.url' and click the 'Change program…' button.
    The 'Open With' dialog box is displayed.
    But, Safari does not appear in the list of 'Recommended Programs', then click the 'Browse…' button.
    A second 'Open With' dialog box is displayed, - Program Files - Safari - Safari.exe - Click 'Open' to open .url files with Safari, but Safari does not appear - continue IExplorer -
    Safari is my default browser, but IExplorer has 3 out of 9 defaults (.mht, .mhtml, .url) and Safari has 8 out of 9 defaults (except .url)
    Why Safari set as Default Browser does not open .url files (Internet Shortcut) ???
    Any help will be appreciate. Thanks.

    yes, it's not in your list of recommended programs.
    Click Browse and find your "Safari.exe" file.
    If you can't find Safari.exe, do a search for files and click "Advanced" to search for system and hidden files too.

  • Can I set my Macbook to open automatically all video files with VLC?

    I have some movies that I have download and they automatically open with quick time. But then the message error comes about because it can not open it!
    Now my question is can i set the computer to open all Video with VLC?
    I have a macbook Mac OX Lion 10.7.
    Thank you

    Choose any one of the files you want to have opened by VLC by clicking once on it (highlight it, don't open it).
    Right/control click on it and choose Get info. Or press -i
    In the Info dialog box, select the pop up menu under "Open with:"
    Choose VLC from the list.
    Click the "Change all" button just below. You may need to confirm this.
    That should do it.

  • I've recently upgraded to Lightroom5.7.1 and now when I try to import photos a window pops up saying 'the photos can't be imported 'cos the files can't be read'. I had no problems before upgrading. I have Windows8 & can't find any 'app' which sets the typ

    I've recently upgraded to Lightroom5.7.1 and now when I try to import photos a window pops up saying 'the photos can't be imported 'cos the files can't be read'. I had no problems before upgrading. I have Windows8 & can't find any 'app' which sets the type of files I can import. Any help appreciated.

    Well, think about it. This is a Lightroom forum. We are here to answer questions about Lightroom and how to solve problems in Lightroom. Your permissions issue is an operating system issue, not a Lightroom issue. I didn't mean to be sarcastic. But there are plenty of Internet resources that will answer that question.
    I just went to Google and typed in "change disk permissions", and there are links for the Mac as well as for Windows listed. There's no sense in me rewriting instructions that are already available.

  • BEx Web - Open/Save dialog - Set Default Type

    Hi All,
    In the BEx Open/Save dialog (accessed thru New Analysis button), shows "Views" in the Type drop down as default. Is there a way to set this type to Query by default?
    Thanks & Regards,
    Sree

    Option is available in the XML code where the type of dataprovider can be selected as "QUERY" or "VIEW" or "INFOPROVDER".

  • How to define "byte stream type" for "open file"?

    Hello,
    I created some numbers (type "double") in Matlab and stored in a file. What value should I use to specify the "byte stream type" for "open file" in Labview? Should I put something like "DBL" or "I32". I don't know where to find the list of legal "types" in Labiew help.
    Thanks so much!
    Felicia

    Looks like 7.1:
    The Matlab "double" is 64 bits (8 bytes). It doesn't make much sense to use an integer datatype to read a floating point value, so you would use DBL in LabVIEW. The numeric data types table can be found here.
    By the way, this assumes you saved the file as raw binary, as opposed to a .mat file, which is something different.
    Message Edited by smercurio_fc on 08-08-2008 11:21 AM
    Attachments:
    read file 7.png ‏13 KB

  • My wife changed start up somehow. Now 7 or 8 files open when restart. Have to  close all to do anything. How do adjust setting so that it open do normal screen with icons etc?

    my wife changed start up somehow. Now 7 or 8 files open when restart. Have to  close all to do anything. files, applications, internet, folders etc. How do adjust setting so that it open do normal screen with icons etc?  before this, it started up and went to main screen with dock, save folders ICOns etc

  • How do I set my downloads to open in the finder ?

    How do I set my downloads to open?

    Welcome to Apple Support Communities.
    If I understand your question correctly, you want to know how to 'open', view, or install something you've successfully downloaded from the internet and saved in the Downloads folder.
    I am unable to determine which operating system you are using on your MacBook. Your profile lists iOS 5, but iOS5 is for an iPod Touch, iPhone, or iPad, not MacBook.
    Your MacBook likely has one of the OS X 'cats': 10.4 Tiger, 10.5 Leopard, 10.6 Snow Leopard, or 10.7 Lion. Click on the Apple icon in the top left menubar and select About This Mac to see which operating system you are using.
    If you are using OS X 10.7 "Lion", you should post your question in the OS X 10.7 Lion forum here:
    https://discussions.apple.com/community/mac_os/mac_os_x_v10.7_lion
    These instructions are for a Mac using OS X 10.6 "Snow Leopard" but the process is very similar with OS X 10.5 Leopard.
    Here's one way:
    Open Finder by clicking on the icon in the lower left corner of your Dock.
    Under Places in the left column, click on the 'House' icon in the left column. It probably has your name after it.
    That will open a list of file folders and files in the right column.
    Click on the Downloads folder.
    Clicking on the Name column heading in the right column will sort the file list by that column.
    Clicking on the column heading a second time will sort the file list in reverse order.
    Locate the file you want.
    Single click on the filename and press the space bar to preview many types of files, including documents, spreadsheets, and images.
    To open the file, double-click on the filename.
    If the file has the extension .dmg, it is a disk image file (program to be installed) and will open the file installer dialog. You will likely need to enter your Administrator password to install the program.

  • Content type for OPEN WITH dialogbox

    +     // set the http content type to "APPLICATION/OCTET-STREAM+
                        response.setContentType("APPLICATION/OCTET-STREAM");
                        +// Setting file name in header in order to save with same name+
                        String disHeader = "Attachment;Filename=\""+fileNameStr+"\"";
                        response.setHeader("Content-Disposition", disHeader);
    when I am using above code to open the files from the database, and filename stored with the extension then open dialog box is gets opened and and click on open will open the document/ file in respective/default software installed.
    I want open with dialog box to select the software by which the file should be opened, for that when I remove the extension from the filename, its taking html as a default content type and opening in the browser.
    How to do it .. ?

    you are correct but its client requirement that when he click on the the filname he want to look open/save dialog box and when he clicks on the open , OPEN WITH DIALOG should appear where he can choose the program/software to open the file.

  • How do I set Pages to automatically open all Word (.doc) documents?

    Being a relatively new Mac User, I haven't yet figured out how to associate programs with particular file types.
    How do I set Pages to automatically open all Word (.doc) documents?
    Thanks.

    Hello Argelius
    If you select a word file in the Finder and do File>Get Info you will see a section in there where you can specify which application should be used to open files of that type.

  • Document types displayed as folders when arranged by set to type

    Hello everyone,
    I have an issue with the finder since upgraded to Lion.
    I use to open finder in column view with "Arranged by" set to "Type" and "Sort by" set to name. But the thing is that the titles/names of the document types are sometimes diplayed or behave as ordinary folders.
    Look at the snapshot below (sorry it's a french one): in the left column, display is fine. But in the middle one, "Dossiers", "Contacts", "Documents PDF" and "Documents" are displayed as ordinary folders.
    Note that the issue does not limit to the display. These non existing folders can be selected with my mouse.
    Moreover, it happens randomly and I checked on a new Account: issue is still there.
    So, as anyone observed that ?
    Thanks a lot,
    Nicolas.

    Sorry for the late reply, but yes this happens to me quite often.
    I have no solution to the problem, but it is rather annoying. Especially if you navigate from one column to another. The first file or folder does not get selected instead it is the "headline with the folder icon" that gets selected. Irritating and it looks terrible when highlighted.

  • How to set file bindings?

    There must be an obvious way to do this, but I can't find it.
    How do you set a *file type* to open with a specific application?
    I can see how to set *individual documents* to open with a specific app, but not file types.
    For example, "soundeffect.aif" opens with iTunes by default. By right-clicking and selecting Open With > Other, I can make ONLY "soundeffect.aif" open with another app (like Quicktime Player) by default. How can I globally set ALL aiff files to open with another app by default?

    Select the file, CMD+I, set the open with to your choice and then click on the Change All button. Do note that means all aif files will open with that choice.

  • Finder - Set file icon as plain text

    I would like to know if there is a way to set files of a certain extention (in this case, .tex files) to be displayed as text files in finder. And no, I'm not talking about Quick Look, because when I press the space bar, the file does come up as a textfile would, i.e. Quick Look displays it as a text file. I'm talking about the icon that finder uses to display the file. Right now, Finder uses the icon of the default program used to open the file (TeXMaker). I would like it to display the .tex file just like a .txt file, i.e. the icon is "a sheet of paper with text on it".
    I hope you can help me.

    At first, when I used an other program for editing .tex files (TexShop), the .tex files were displayed as text files. They changed, however, when I installed TeXmaker and set it as the default program.

  • SoulseekQt not respecting set mime types in Openbox.

    Hi,
    I am having a strange problem with mime type handling in openbox.
    When opening files through SoulseekQt, instead of opening with VLC as my mime types are set to do it opens Audacity. And when opening the folders, it opens Gwenview instead of Thunar.
    I tried doing the same thing in xfce and it opened vlc, and thunar fine.
    Is there a file I need to edit for openbox specific mime types?
    Thanks for any help.

    My appologies for posting it into wrong forum. It should have been posted to Web Tier APIs > Java Servlet

Maybe you are looking for

  • Weird error message from aplay

    Got a new system this week and everything is set up and working, except a few weird audio glitches.  Audio goes through the onboard HDMI thingie, but I'm not using HDMI; my monitor sends the HDMI signal to a different computer and VGA to my problem c

  • HT4623 cannot customize contacts ringtones on iphone5

    try to choose a curtain ringtone but the phone doesnt allow me too ,it only allows me 2 pick one for all my contacts .

  • Inspection lot status MCAN - Lot marked for cancellation

    Hi QM Team, Once we cancel lot through QA02 or if we cancel document then system cancell lot accordingly & put the lot status as "LTCA". But in my system I have seen couple of lot with status "MCAN - Lot marked for cancellation". Can you suggest me h

  • Fixed ip address NAS not being found

    I have a mysterious network problem. I have a buffalo linkstation as NAS which is connected on to a switch (US robotics) which is connected to the network via an airport extreme which is set up as a remote base station on a WDS link from an airport e

  • Trigger Smartform From External System

    Dear All, Hi all. I  have a different issue. Using bapi  i am able to create quotation and order . They are generating the no also . I General case if we create quotation or order and given the preview the smart form attached to that  tcode will be e