Question: `/System/Library/Framework/JavaVM.framework` and `/System/Library/Java` have been deleted from my disk. I thought of making things back to normal by running the last Apple Java update ([Java for OS X Lion 2012-003 as of this writing](http://support.apple.com/kb/DL1515)) but unfortunately I'm facing the following error message:

```
A newer version of this package is already installed.

```

I still have java from oracle but I'd like to have the official one as well.

Any idea how I could get over this error message and proceed the install?

Answer: 
You can't close the application by clicking on the red button, as you said it is meant to close the window...

Using cmd-q is not a bypass but the shortcut to close the application. And the windows are not instances of the application, they are in the same instance...

What bothers you is the "resume" functionality that restores the state of an application -- e.g. all open windows -- when you restart it.

Look [here](http://osxdaily.com/2011/07/17/delete-specific-application-saved-states-from-mac-os-x-10-7-lion-resume/) or [here](http://osxdaily.com/2011/07/18/disable-mac-os-x-lion-resume-window-restore/) to see how you can tune or disable this "resume" feature.
Do u want to say 'cmd+Q'instead of ctrl-q. 

& are u sure about your stmt "When I press all the instances of that program opens up the next time I open that application". 

As far as i know, if you quit application it will not open your last opened docs. It will just remain in "Open recent" option from File menu