Uninstalling additional files associated with JWS applications

I have a JWS application that works fine however I would to be able to optionally remove or delete the work directory and files which are not in the JWS cache. Is there a way of doing this?

I couldn't find a direct way of doing this. But I found a workaround. I created a uninstaller jnlp so that when it is uninstalled it deletes the resources.
Uninstaller jnlp Example:
<?xml version="1.0" encoding="utf-8"?>
<jnlp
     spec="1.0+"
     codebase="http://...."
     href="uninstall.jnlp">
     <security>
          <all-permissions/>
     </security>
     <resources>
          <j2se version="1.5+"/>
          <jar href="/lib/uninstall.jar"/>
     </resources>
     <installer-desc/>
</jnlp>
Main jnlp
<jnlp
     spec="1.0+"
     codebase="http://..."
     href="launch.jnlp">
     <resources>
          <j2se version="1.5+"/>
          <jar href="/lib/main.jar"/>
          <extension href="uninstall.jnlp"/>
     </resources>
     <application-desc/>
</jnlp>When a <installer-desc/> is installed its main will be called with "install" and when its uninstalled main will be called with something else.
Here is a sample main for uninstall.jar:
     public static void main(String[] args) {
          javax.jnlp.ExtensionInstallerService extensionInstallerService = null;
          try {
               extensionInstallerService = (javax.jnlp.ExtensionInstallerService)javax.jnlp.ServiceManager.lookup("javax.jnlp.ExtensionInstallerService");
          } catch (javax.jnlp.UnavailableServiceException ex) {}
               if (args.length == 0 || !"install".equals(args[0])) {
                    ApplicationServices.deleteLogDir();
                    ApplicationServices.getInstance().setStartup(false);
                    try {
                         Preferences prefs = Preferences.userNodeForPackage(Uninstall.class);                              
                         Preferences parentPrefs = prefs.parent();
                         prefs.removeNode();
                         removeIfEmpty(parentPrefs);
                    } catch (BackingStoreException ex) {
                         ex.printStackTrace();
          if (extensionInstallerService != null) {
               extensionInstallerService.installSucceeded(false);
          System.exit(0);               
     }I think it would be nice if this functionality could be described in the application jnlp so the main on the original application could get the message and handle any cleanup it needed to do instead of a separate extension jnlp

Similar Messages

  • File association with JWS and windows

    Hi,
    We are moving all our applications over to JWS from install anywhere. One final hurdle we have is the requirement to associate a file extension with a given JWS application.
    e.g a double clicking a .foo file will launch JWS application MYJWSFooApp.
    As install anywhere defines the install directory and exe file this is possible. Has anyone managed it with JWS ?
    Thanks
    Chris

    Yes - you can do so with the new association feature in Java Web Start 1.5
    Basically you specific the file ext and/or mime-type that you want to associate with in the jnlp file; and when javawebstart launch the application, it will prompt you to see if you want to create the association.
    Refer to the JNLP spec changes in Java Web Start 1.5 for more details:
    http://jcp.org/aboutJava/communityprocess/maintenance/jsr056/jnlp_spec.html#4756982
    You can download J2SE 1.5-beta (which includes javawebstart) now and give it a try!
    http://java.sun.com/j2se/1.5.0/

  • IPAD restores applications but not data or files associated with applications

    1) Today Itunes prompted me to update the OS on the IPAD.
    2) It warned me to back up IPAD before I did.  I did
    3) I updated software.
    4) It returned with an error saying it could not install software and I must restore to facotry settings
    5) I resotored to factory settings
    6) After that I attempted to restore contents of my IPAD from Itunes on my Windows 7 machine. 
    7) It restored only music but no applications and no other information
    8) I spent all day on the phone with Apple Support who managed to get the applications restored by going through one by one and syncing.
    9) It took a few hours
    10) After I finished I noticed that files/documents associated with various applications like Kindle, Goodreader, Penultimate Notes were missing on the IPAD.
    11) I have made a few phone calls to Apple and thy claim the following: "Apple is not responsible for restoring files or data associated with any applications, only the application itself.  It is your responsibility to contact the application developer to get your files restored."  This sounds patently absurd to me. I spent half an hour explaining the absurdity of this claim to the Apple representatives but they are firm and non-wavering in this opinion.  One even claimed that restoring does not restore applications which of course is not correct.
    12) I gave them the example of MS Word on MacBook Pro. If I save/back up on another machine and then restore back to the original machine I would expect to be able to see the Word files I had created and saved.  That in particular the failure to view them would not be Microsoft's responsibility but Apple's.  They disagreed saying it would be between me and Microsoft and the Apple devices had nothign to do with saving or successful restoring.
    13) So I have lost all e-books purchased on Kindle, plus all documents saved on Goodreader application, notebooks on Penultimate applications, and my children’s drawings on their drawing applications.  Apple Support say I should contact each application vendor to try and recover the missing data.  They refuse to tell me how to get it from ITUNES backup stored on my Windows 7 machine as they say it will not be there. 
    They have asked me to write to
    Apple Customer Support,
    Holly Hill,
    Cork,
    Ireland
    quoting case number 319718819.

    Did you try restoring from a backup of the iPad? If you have a backup with all of your app data and files, that should restore all of that content to the device.
    No - restoring does not restore applications. You have to either sync the applications back from iTunes on your computer, or you can download them again, BUT ... All of your data, files and device settings are stored in your backup. Do you have a backup in iTunes .... Edit>Preferences>Devices - that should show you all of your iDevice backups.

  • I have Windows 7 for PC if I view a jpg file I gat the following message - Some of the file types associated with QuickTime applications are currently associated with otherapplications. Should I restore these file type associations to Quicktime. Yes or No

    After viewing a jpg file on my Windows 7 PC I get the following message and I don't know how to answer it "Some of thw file types associated with QuickTime applications are currently associated with other applications. Should I restore these file type associations to QuickTime?" Options are " Yes, No or Do not ask to perform yhis check again. QuickTime Control Panel can be used to make subsequent changes."
    What shoul I do about this message?

    Select no.

  • "Error occurred in deployment step 'Retract Solution': The solution does not have a WSP file associated with it." occurs while deploying from Visual studio

    HI,
    I get this error "Error occurred in deployment step 'Retract Solution': The solution does not have a WSP file associated with it. " when deploying my project from visual studio 2010 to
    SharePoint 2010 site. I tried restarting IIS, but it didn't help. This application used to work fine until the server crashed during the deployment process. All the other applications on the same server works fine also. Any ideas how to fix this issue? 
    Thanks in advance,
    AM

    Hi
    AM ,
    Thank you for your posting!
    According to your error message, it says your solution does not have a WSP file associated with it. Take a look at the file system.  After you Right Click -> Deploy Solution on the VS Solution, there
    should be a .wsp file at <Solution Directory>\bin\<debug|release>.
    Also the error can be occurring when the developer try to deploy solutions over pre-existing solutions  with material changed  in the solution.  Go to your Central Administration Site and then
    Operations and then Solution Management.  Make sure that there not already a solution with the same name deployed or installed there.  If there is, remove it and try deploying again.
    And you could look in logs and find if there is a below error in ULS log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS).
    Thank you for your understanding and support.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Visual Source Safe keeps checking out my .cs file associated with a report

    Hello there.
    I am new in this community and I need some help. I am part of a team that works with Crystal Reports under .NET framework and we are using Ms Visual Source Safe. Any time we open a solution (.sln file) all .cs files associated  with a Crystal report are checked out. This, of course, drives all of us crazy. If I try to delete the .cs file, it is added automatically. And we could not find any solution to this problem.
    I compared the 2 .cs files (before and after check out) and the indeed differ. The namespace , to be more specific is different.
    I believe the problem is that we are using a separate project that contains the report files and then those .rpt files are added as links to the main project.
    So ... my question is... is there anyway I can tell Sourcesafe or Crystal report or any other program, application or person to stop checking out my .cs files or stop modifying them?
    Thank you.

    Hello  Don.
    Thank you for your answer.
    It seems I have SP1 already installed. I am referencing the following files with versions in my report project:
    CrystalDecisions.CrystalReports.Engine v12.0.2000.0
    CrystalDecisions.Enterprise.Framework v12.0.1100.0
    CrystalDecisions.Enterprise.InfoStore v12.0.1100.0
    CrystalDecisions.ReportSource v12.0.2000.0
    I personally believe that the problem is with the link files.
    To be more exact, I have several projects (csproj) that handle all reports and report loading. I also have several applications that refer these projects (not all in the same time). Because all .rpt files are loaded at runtime, I made these files Embedded resources and I created a folder in the main projects named Reports where I added all .rpt files as links.
    When I open main application A solution, all .cs files associated with the .rpt files are checked out (the namespace is modified to A).
    When I open main application B solution, all .cs files associated with the .rpt files are checked out (the namespace is modified to B).
    And so on.
    And since we are a team of several developers working with all main applications, this is rather annoying.
    I hope this presents my situation a little more clear.
    Any ideas?
    Thanks again

  • How to identify files associated with apps?

    Hello all -
       I am considering buying a new Mac mini which would come with Yosemite.  My existing mini (mid 2011, Lion 10.7.5) has a lot of apps I do not wish to migrate, so I think I am stuck with manually reinstalling each of the apps I want on the new computer.  How do I identify the necessary files associated with these apps (preferenes, app support, etc.) so I can copy them over after reinstalling on the new computer?  Is there any way to track what files were installed along with the app when it was first installed?  Anyone familiar with the claim of CleanApp to log all associated files with an installation (at time of install), or any other software that does this?
       Thanks - Randy

    Thanks again Arthur for your response.  I looked at RoaringApps but was not sure if I should enable the real time or just use basic.  Real time seems to require a lot of downloading (and modification?)   What do you recommend - Real TIme or Basic?
    As far as SunnyMenu, it is old but has worked flawlessly through and including Lion 10.7.5.  The only alteration of the system is that it is added as a startup item in my User in System Preferences.  It does not change the GUI, but adds menus (that you can customize) in addition to, rather than changing what System X does.  The Dock will not accomodate nearly as many items and SunnyMenu allows for nested subfolders of menu items.  I find it extremely useful and use it every day. I realize one day it will no longer work, but hope that, as it's pretty simple, that may be a bit further off.  As a rule I don't dabble in System modifiying stuff like maintenance, clean-up, speed-up, "optimization" etc. and just rely on System X.  I do have iStat Menus, but I don't believe that's modifying the System, but only displays information.  RoaringApps seems to indicate it's compatible with everything through Yosemite.  Would you recommend against that as well?  It saved me once when my fan failed but I noticed the iStat temp & rpm display and got it repaired at my Apple Store before I completely toasted my mini.
    Thanks again for your replies, they have been extrmely helpful in understanding how to start planning my move to a new Mac mini with Yosemite!

  • Displaying icon file associated with the exe file.

    Hi ,
    I want to display the icon file associated with the an exe file.
    I know that it is posssible to (Using wni32 API's) it is possible to extract the ico file. But I don't know how I can display it in my Java application.
    It will be great if anybody can throw light on it.
    With Regards,
    Praveena

    Hi,
    what functions do you both have in mind when talking about extracting the icon file using JNI and Win32 API? I know there is ExtractIcon in VisualBasic and Delphi that works for this, yet I do not see anything similar in JNI.
    Thanks in advance,
    Gleb.
    P.S. You should be able to display .ico files after decoding them & encoding them into gif/jpg in JIMI (Sun package for advanced image/graphics management).

  • Unable to open files associated with Adobe Reader - program goes into a loop

    i am unable to open any file associated with adobe reader or adobe pro.  when i double-click the file, adobe reader opens up but it goes into a loop. 
    adobe reader opens, then a progress window opens, as if the file will open but adobe closes and opens again and the same cycle repeats itself until i manually close the program.
    any advice?
    update:
    i can open regular .PDF files when i double-click the icon and i can also open .PDF files when i open adobe reader first and then choose open file.  it's just the .FDF files that are the problem (so far).
    the file in question happens to be an .FDF extension, which is an internet generated form. i attached a screen shot of the screen that pops up, goes away, and pops up again that creates the loop.
    the white out section is the server name where the file was saved to.  but i also get the same symptoms when i am in internet explorer, hit the generate form button.

    hey ankit,
    sorry i didn't see a notification that you replied to this discussion.
    "1. Generate a new PDF and a FDF file. Try opening the same and see if it behaves the same way."
    yes, it does behave the same way, it's just a continuous loop until i have to kill the process.
    "2. Check if you have access to the PDF that is being used by the particular FDF."
    by this do you mean the correct permissions?  if that is what you mean, then yes, the permissions are set correctly.
    "3. If possible, please send me the FDF and the associated PDF that is behaving in this way on your system."
    i really wish i could but the information in the form is sensitive and cannot be sent. 
    as an update though, i reimaged the customer's workstation, installed Adobe Reader 10.1.1 and it worked perfectly (finally).  HOWEVER, after about two weeks the same symptoms returned! 

  • EA Could Not Find The .html File Associated With...

    After naming folder names, I now get the "EA could not find the .html file associated with..." message when I open the .edge file. When I open the .an file, I have all elements and the timeline are gone! How can I restore it? Surely, it is just a question of changing a path, or? Please help. Thanks!

    From the File > Open menu, browse to the that same folder (the newly renamed one), and select the .html file.
    Darrell

  • Is there a way to store files associated with my page (js, png, css, etc) privately on the cloud with Thimble?

    Right now the only way I have found to have css and js files associated with my page is to put them in a public folder on Dropbox. Is there a better way?

    If your making it Privately, then it won't visible in Thimble.
    Dropbox, Box, Skydrive are the best way for External files right now.
    Thimble is always public only, it won't be private. It won't be public until you share the link.

  • When an iPad is connected to the MacBook And the option says it will make a full back of the iPad to the computer does that mean ALL the files associated with apps on the iPad? If so where is the backup located on the computer?

    When an iPad is connected to the MacBook and the option in iTunes says it will make a full back of the iPad to the computer does that mean ALL the files associated with ALL apps on the iPad? If so where is the backup located on the computer?

    Yes.  http://support.apple.com/kb/ht4946

  • If i restore a user folder from time machine. is it just restoring all files associated with the user or programs also?

    If i restore a user folder from time machine, is it just restoring the files associated with the user or programs as well? Im asking because Apple Store just reset my system and said to restore files i needed and not to do a full restore. to try and determine if it was a software issue causing the problems.

    Just the user's folder. Nothing else. See Pondini's TM FAQs, for details.

  • Fresh Leopard install gone Wrong - PKG Files Associated with Safari

    I just purchased a used Macbook Core 2 Duo 2.0ghz that came with Tiger installed. I upgraded to Leopard by zeroing the hard drive and reinstalling Leopard and all updates.
    The problem I am running into is that for some reason, and PKG files downloaded to install programs (i.e. Skype) will not install because the PKG file is associated with Safari. I check on my Mac Pro, and it has PKG files associated with "Installer". I tried to find "Installer" as a program on the Macbook but had no luck. Any ideas? With this being a fresh install I have NO idea how this happened. Any help is most appreciated. Thanks.

    Hmm, I tried to associate a file with the Installer, but wasn't able to get the system to tell me where it is. There is a command line version of the installer in /usr/sbin/, and that may be what the system uses under the hood, but I couldn't find a way to get to that either (I was trying to do this in the Get Info pane, under Open With).
    I don't know why pkg is associated with Safari. It could be that your launch services database got hosed somehow during your upgrade. If you're willing try something, it might be that rebuilding your launch services database will help. From the command line, run this command:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    (the above should all be on one line). This will reset, then rebuild the database. Although I don't think it's strictly necessary, restarting your machine after this command has run successfully would probably be a good idea.

  • How make file association with a sgd application

    hi!
    I need to know, how i make file association from a sgd client.
    I need open file .doc with a sgd application just make doble click in the file .doc
    in the client
    SO: rhel5u1
    i have word.desktop file
    [Desktop Entry]
    Version=1.0
    Encoding=UTF-8
    Name=word2003
    Icon=/home/ssa01/.tarantella/icon-cache/srsgd.sunssa.com/windows.gif
    Categories=Application;SGD;
    Type=Application
    Exec="/home/ssa01/.tarantella/tcc/4.50.907/ttatcc" -profile "srsgd.sunssa.com::Default" -application ".../_ens/o=applications/cn=word2003"
    Terminal=false
    please help me!!

    guinn8181
    it showed up as a ProTools (an audio editing application I have installed) plug-in … How can a firmware update meant for a specific hardware but tied to a third party softwareThen this is a bug in ProTools. The "Open with" should show "<None>".
    You need not concern yourself too much with this, since the system will run this updater as and when necessary—you don't need to run it yourself.

Maybe you are looking for

  • Best practice for implementing Manufacturing Cost Planning ( MCP)

    is there any best practice for implementing Manufacturing Cost Planning ( MCP) using BI-IP?

  • Simulation model which call functions in an other dll...

    I have a C simulation model that I implement like NI Model Framework template (NI_VStand_Model_Framework_Guide.pdf ). If I use this simple model I can deploy on my PXI. But I must call functions which are in an other dll. When I call functions in oth

  • Problem with Bytes

    i've recently started learning java, and i am having a few problems with writeing to files. for example:      FileWriter outWriter = new FileWriter("file.txt");      char i = 1; char z = '1'      outWriter.write(i);      outWriter.write(z);      outW

  • Why is my MB Pro trying to do setup - security issue?

    My MB Pro with OSX Lion was working fine after the most recent software update.   I have it set to require a login at startup but I don't get a login screen.  Instead, I get a setup prompt.  It's as if it's been reset to factory default. I was out of

  • Monitoring via external TV monitor

    hey, i know i've done this before but I cannot for the life of me remember how to monitor my editing through an external TV connected through a deck to my computer via firewire. i.e. I am trying to get the TV to function as the 'canvas' window in FCP