How to use a custum permission in the .policy file

Hi,
I am stuck with the problem of having a custum permission that extands java.security.BasicPermission.
I really want this permission to be checked from my .policy file, but when I try to include its location : c:\java_project\server\SpecialPolicy.class
it pops a message that file is not found. I have tried dots, different slashes (back and forward) and still have no luck. I need this custum permission to be checked so that I can allow special access from a certain codebase so that say if I try a dangerous method I can just simply check in the code;
this.getSecurityManager.checkPermission(new SpecialPermission("lol"));
Also I need a paramater option, but I cant think of any since its not a FilePermission that takes a name and attributes (read, write..) what does BasicPermission take and if I extend it what attribute should I pass in. I dont really care about how this permission works, i just use it to restrict access to a certain functions in code that are ran from specific codeBAse.
Please dont ask why I need this :)
Thanks in advance, the documentation on how to add custum policies is simply NOT THERE. thus I have to bug people around.

Hi
If you just have to add another permission it is easy.
Create a class extending the BasicPermission. Have an entry into
the policy file like
grant <Principal> {
permission <CumstomPermission> "lol"
}that should be all. If you do have a specific Principal, please
do not forget to add the Principal to the relevant Subject after login.
cheers
Projyal

Similar Messages

  • How to use runtime.exe to activate the native file coping commands

    How to use runtime.exe to activate the native file coping commands.(It might include using process(), and such.. but how?

    Why would you want to do this? It's harder than copying the file in Java (by reading the file and writing it to a new file) and you'll need to write new code each time you want to port your code to a new OS.

  • How to use Add Query Criteria for the MySQL data Base in Netbeans ?

    How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
    When the Query Criteria is add like
    SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
    FROM counselors WHERE counselors.counselors_id = ?
    when i run this Query in the Query Window
    i get a error message Box saying
    Query Processing Error Parameter metadata not available for the given statement
    if i run the Query with out Query Criteria its working fine.

    *I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
    Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
    The Java codes are:
    public void dropDown1_processValueChange(ValueChangeEvent event) {
    Object s = this.dropDown1.getSelected();
    try {
    this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
    this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
    this.Trip_tabDataProvider1.refresh();
    } catch (Exception e) {
    this.log("Error: ", e);
    this.error("Error: Cannot select user"+e.getMessage());
    SQL statement for Trip_tabRowSet:
    SELECT ALL Trip_Tab.Trip_Date,
    Trip_Tab.User_ID,
    Trip_Tab.Destination
    FROM Trip_Tab
    WHERE Trip_Tab.User_ID = ?
    Error messages are shown below:
    phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.sql.SQLException: No value specified for parameter 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
    at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
    at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
    at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
    at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
    at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
    at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
    Could anybody look into this issue.
    Many thanks
    Edited by: linqing on Nov 22, 2007 4:48 AM

  • How to use one report column into the another report in obiee

    How to use one report column into the another report in obiee

    i dont want to use column as a filter for another report it should be report column for another report
    Thanks,
    Vivek

  • How to use on my new iMac the Acrobat X Pro I downloaded 2 years ago on my MacBook Pro?

    How to use on my new iMac the Acrobat X Pro I downloaded 2 years ago on my MacBook Pro?

    You can use the same installer, if you kept it, and the same serial number, if you still have it, and the old serial number, if it was an upgrade.

  • How to use custome tag lib in the JSP page?

    How to use custome tag lib in the JSP page?...with JDeveloper

    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.working_with_jsp_pages%7Cjsp_ptagsregistering~html/

  • How to Use an Image to Customize the Static Button Widget

    Can I just get someone to help me figure out how to use an image to customize the static button widget, please?
    I have tried using several different types of images, but none of them seem to actually change the appearance of the button.
    Thanks!
    Laura
    Captivate 5.5

    I tried to use the tools within the widget itself - it offers you the opportunity to use an image (see screenshot below).
    I also opened it in Flash and tried to replace the images for one of the button styles there w/ my own, but in re-publishing the SWF from there I broke the widget.  When I attempted to use the edited widget, there were no customization controls available after I inserted it (see screenshot two below).

  • SSHR reskin AKA 'How to Use Adobe Flash to Transform the Look and Feel...

    There was a presentation at the OHUG 2011 Conference titled 'How to Use Adobe Flash to Transform the Look and Feel of Oracle HR Self Service'. It presented a method of 're-skinning' SSHR to present a different UI to the user.
    Looking for anyone out there that has attempted to apply this to their Oracle HRSS pages. I know this company has developed (is developing?) a product based on this approach. I want to see if anyone has done it on their own and would be willing to share some details.
    Follow-up question. Has anyone availed themselves of the bespoke UI Development based on this approach from Applaud Solutions (as mentioned on their website), and care to comment on your experience?

    Any update on this please? Even we are looking for some pointers in this area.

  • How to use JavaScript Zoom in on the layer

    How to use JavaScript Zoom in on the layer

    yeah, i talking about zooming in on a 3D object,do you have a solution

  • Hi. I wanted to know how to use my macbook retina to the best of its potential.

    This is what the system is currently showing:
    EtreCheck version: 1.9.12 (48)
    Report generated 21 June 2014 18:32:04 GMT-3
    Hardware Information:
      MacBook Pro (Retina, 15-inch, Late 2013) (Verified)
      MacBook Pro - model: MacBookPro11,3
      1 2.3 GHz Intel Core i7 CPU: 4 cores
      16 GB RAM
    Video Information:
      Intel Iris Pro - VRAM: (null)
      NVIDIA GeForce GT 750M - VRAM: 2048 MB
      Color LCD 2880 x 1800
    System Software:
      OS X 10.9.3 (13D65) - Uptime: 3 days 9:47:47
    Disk Information:
      APPLE SSD SM0512F disk0 : (500.28 GB)
      EFI (disk0s1) <not mounted>: 209.7 MB
      Macintosh HD (disk0s2) / [Startup]: 499.42 GB (266.59 GB free)
      Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information:
      Apple Internal Memory Card Reader
      Apple Inc. iPhone
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
    Thunderbolt Information:
      Apple Inc. thunderbolt_bus
    Gatekeeper:
      Anywhere
    Kernel Extensions:
      [not loaded] net.kromtech.kext.AVKauth (2.3.6 - SDK 10.8) Support
      [not loaded] net.kromtech.kext.Firewall (2.3.6 - SDK 10.8) Support
    Launch Daemons:
      [loaded] com.adobe.fpsaud.plist Support
      [loaded] com.adobe.SwitchBoard.plist Support
      [loaded] com.tunnelbear.mac.tbeard.plist Support
      [running] com.zeobit.MacKeeper.AntiVirus.plist Support
      [running] com.zeobit.MacKeeper.plugin.AntiTheft.daemon.plist Support
    Launch Agents:
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [running] com.kodak.BonjourAgent.plist Support
    User Launch Agents:
      [loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.adobe.ARM.[...].plist Support
      [loaded] com.google.keystone.agent.plist Support
      [loaded] com.kodak.KODAK AiO Annual Opt.plist Support
      [loaded] com.kodak.KODAK AiO Firmware Updater.plist Support
      [loaded] com.kodak.KODAK AiO Software Updater.plist Support
      [running] com.kodak.StatisticCollection.plist Support
      [running] com.spotify.webhelper.plist Support
      [running] com.zeobit.MacKeeper.Helper.plist Support
    User Login Items:
      iTunesHelper
      Music Manager
      Spotify
      Google Chrome
    Internet Plug-ins:
      FlashPlayer-10.6: Version: 13.0.0.214 - SDK 10.6 Support
      QuickTime Plugin: Version: 7.7.3
      AdobePDFViewerNPAPI: Version: 10.1.10 Support
      AdobePDFViewer: Version: 10.1.10 Support
      Flash Player: Version: 13.0.0.214 - SDK 10.6 Outdated! Update
      Default Browser: Version: 537 - SDK 10.9
      Silverlight: Version: 5.1.20913.0 - SDK 10.6 Support
      JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
    Safari Extensions:
      Searchme: Version: 1.3
      Amazon Shopping Assistant: Version: 1.1
      Slick Savings: Version: 2.0
      Ebay Shopping Assistant: Version: 1.1
    Audio Plug-ins:
      BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
      AirPlay: Version: 2.0 - SDK 10.9
      AppleAVBAudio: Version: 203.2 - SDK 10.9
      iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins:
      Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User Internet Plug-ins:
      npsf_uni: Version: sf 3.3.2.1 Support
    3rd Party Preference Panes:
      Flash Player  Support
    Time Machine:
      Skip System Files: NO
      Auto backup: YES
      Volumes being backed up:
      Macintosh HD: Disk size: 465.12 GB Disk used: 216.84 GB
      Destinations:
      ZU UK 2013-14 [Local] (Last used)
      Total size: 931.51 GB
      Total number of backups: 8
      Oldest backup: 2014-03-16 03:19:04 +0000
      Last backup: 2014-06-07 16:39:22 +0000
      Size of backup disk: Adequate
      Backup size 931.51 GB > (Disk used 216.84 GB X 3)
      Time Machine details may not be accurate.
      All volumes being backed up may not be listed.
    Top Processes by CPU:
          2% WindowServer
          2% fontd
          1% Google Chrome
          0% mds_stores
          0% com.apple.WebKit.Networking
    Top Processes by Memory:
      262 MB WindowServer
      147 MB softwareupdated
      147 MB Google Chrome
      131 MB com.apple.MediaLibraryService
      131 MB iTunes
    Virtual Memory Information:
      9.41 GB Free RAM
      3.67 GB Active RAM
      447 MB Inactive RAM
      1.58 GB Wired RAM
      78.53 GB Page-ins
      0 B Page-outs

    Follow these instructions to uninstall MacKeeper. They have been tested with the most recent version of MacKeeper. Earlier versions than the one released in 2012 require more extensive work to uninstall all its components. Never install such junk on a Mac.
    If you actually used MacKeeper to alter your system, e.g. "remove excess binaries" or such, you will need to reinstall OS X as well as all your additional software. Uninstalling MacKeeper is insufficient to reverse the corruption it is capable of - once again, that is if you used it.
    If you merely installed MacKeeper but did not use it to perform any particular action, the following instructions will suffice.
    If you used MacKeeper to encrypt any files or folders, use MacKeeper to un-encrypt them first.
    Quit the MacKeeper app if it is running.
    Open your Applications folder: Using the Finder's Go menu, select Applications.
    Drag the MacKeeper icon from your Applications folder (not the Dock) to the Trash.
    You will be asked to authenticate (twice):
    You do not need to provide a reason for uninstalling it:
    Just click the Uninstall MacKeeper button. You will be asked to authenticate again.
    After it uninstalls you may empty the Trash and restart your Mac. All that will remain is an inert log file that does nothing but occupy space on your hard disk.
    May I suggest that you review the following setting in System Preferences?
    Although you may easily override that setting, it will serve to protect you from inadvertently installing garbage. The overwhelming majority of Macs I come across have the MacKeeper installer file already present in their Downloads folder, often multiple copies of it. The downloaded file itself can do nothing until it is opened and installed, and the above setting (known as Gatekeeper - not to be confused with MacKeeper) will prevent that from occurring.
    I wanted to know how to use my macbook retina to the best of its potential.
    Never install any product that claims to "speed up", "clean up", "optimize", or "accelerate" your Mac. Without exception, they will do the opposite.
    Never install pirated or "cracked" software, software obtained from dubious websites, or other questionable sources. Illegally obtained software is almost certain to contain malware.
    Don’t supply your password in response to a popup window requesting it, unless you know what it is and the reason your credentials are required.
    Don’t open email attachments from email addresses that you do not recognize, or click links contained in an email:
    Most of these are scams that direct you to fraudulent sites that attempt to convince you to disclose personal information.
    Such "phishing" attempts are the 21st century equivalent of a social exploit that has existed since the dawn of civilization. Don’t fall for it.
    Apple will never ask you to reveal personal information in an email. If you receive an unexpected email from Apple saying your account will be closed unless you take immediate action, just ignore it. If your iTunes or App Store account becomes disabled for valid reasons, you will know when you try to buy something or log in to this support site, and are unable to.
    Don’t install browser extensions unless you understand their purpose. Go to the Safari menu > Preferences > Extensions. If you see any extensions that you do not recognize or understand, simply click the Uninstall button and they will be gone.
    Don’t install Java unless you are certain that you need it:
    Java, a non-Apple product, is a potential vector for malware. If you are required to use Java, be mindful of that possibility.
    Java can be disabled in System Preferences.
    Despite its name JavaScript is unrelated to Java. No malware can infect your Mac through JavaScript. It’s OK to leave it enabled.
    Block browser popups: Safari menu > Preferences > Security > and check "Block popup windows":
    Popup windows are useful and required for some websites, but popups have devolved to become a common means to deliver targeted advertising that you probably do not want.
    Popups themselves cannot infect your Mac, but many contain resource-hungry code that will slow down Internet browsing.
    If you ever see a popup indicating it detected registry errors, that your Mac is infected with some ick, or that you won some prize, it is 100% fraudulent. Ignore it.
    Ignore hyperventilating popular media outlets that thrive by promoting fear and discord with entertainment products arrogantly presented as "news". Learn what real threats actually exist and how to arm yourself against them:
    The most serious threat to your data security is phishing. To date, most of these attempts have been pathetic and are easily recognized, but that is likely to change in the future as criminals become more clever.
    OS X viruses do not exist, but intentionally malicious or poorly written code, created by either nefarious or inept individuals, is nothing new.
    Never install something without first knowing what it is, what it does, how it works, and how to get rid of it when you don’t want it any more.
    If you elect to use "anti-virus" software, familiarize yourself with its limitations and potential to cause adverse effects, and apply the principle immediately preceding this one.
    Most such utilities will only slow down and destabilize your Mac while they look for viruses that do not exist, conveying no benefit whatsoever - other than to make you "feel good" about security, when you should actually be exercising sound judgment, derived from accurate knowledge, based on verifiable facts.
    Do install updates from Apple as they become available. No one knows more about Macs and how to protect them than the company that builds them.
    Summary: Use common sense and caution when you use your Mac, just like you would in any social context. There is no product, utility, or magic talisman that can protect you from all the evils of mankind.

  • In Windows 8, how can I see an image of the psd file instead of the Photoshop icon?

    In Windows 8, how can I see an image of the psd file instead of the Photoshop icon?

    There are a number of third party solutions for this.  I just use Bridge, so can't recommend one in particular.

  • Error - Logical file is not part of database. Use RESTORE FILELISTONLY to list the logical file names

    I made a script to restore .bak or backup files. It works for some databases, but not for one. How do I make it work for any type of .bak file ? This is in sql server 2008. The error message is -
    Msg 3234, Level 16, State 1, Line 1
    Logical file 'Northwind_Data' is not part of database 'Northwind'.
    Use RESTORE FILELISTONLY to list the logical file names.
    Msg 3013, Level 16, State 1, Line 1
    RESTORE DATABASE is terminating abnormally.
    Script -
    IF DB_ID('Northwind') IS NULL
    BEGIN
    RESTORE DATABASE [Northwind]
    FILE = N'Northwind_Data'
    FROM
    DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SS2008\MSSQL\Backup\Northwind.bak'
    WITH FILE = 1,
    MOVE N'Northwind_Data'
    TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SS2008\MSSQL\DATA\Northwind.mdf',
    MOVE N'Northwind_Log'
    TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SS2008\MSSQL\DATA\Northwind_0.LDF',
    NOUNLOAD, STATS = 10
    END

    Hello,
    The issue you are facing might be related to below link
    http://support.microsoft.com/kb/2487231/en-us
    As per link this is known issue.Can you please check service pack level of SQL Server 2008 .It should be SP3.Please apply SP3 and see if the error subsides.
    Also error suggests  logical file name 1 which you are giving is not part of the backup set from which you are trying to restore.You should first use below query to determine right file then proceed with restoration of the same.
    restore filelistonly from disk='C:\Program Files\Microsoft SQL Server\MSSQL10_50.SS2008\MSSQL\Backup\Northwind.bak'
    if file ID is 3 may be your restore script would be like below
    F DB_ID('Northwind') IS NULL
    BEGIN
    RESTORE DATABASE [Northwind]
    FILE = N'Northwind_Data'
    FROM
    DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SS2008\MSSQL\Backup\Northwind.bak'
    WITH FILE = 3,
    MOVE N'Northwind_Data'
    TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SS2008\MSSQL\DATA\Northwind.mdf',
    MOVE N'Northwind_Log'
    TO N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SS2008\MSSQL\DATA\Northwind_0.LDF',
    NOUNLOAD, STATS = 10
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How do we add trap-recipients to the acl file?

    How do we add trap-recipients to the acl file?
    Any examples.

    Here's some documentation I am working on for my place of work - hope this helps:
    There are two Sun-provided configuration files of note that must be maintained and provided to the SNMP agent program as command line arguments when it runs. They are:
    X.acl (subagent access control file, where X is your agent name)
    X.reg (subagent registration file, where X is your agent name)
    Note: For more information on either of these files, read the Solstice Enterprise Agents User Guide found on the Sun website, but don't expect too much.
    The reg file specifies the subagent name and OID tree it is responsible for, among other things.
    The acl file contains a list of communities that will be sent traps. This file will need to be periodically updated with the IP addresses of any entity that wants to receive traps from the X subagent. The file looks in part like this:
    acl = {
    communities = public, private
    access = read-write
    managers = dv, localhost
    trap = {                                                             
    trap-community = SNMP-trap
    hosts = dv, localhost
    enterprise="Xenterprise"
    trap-num = 1-5
    Where "dv" and "localhost" are configured in the /etc/hosts file as IP addresses to send traps to and "Xenterprise" is an enterprise that must be registered EXACTLY as is shown in the /etc/snmp/conf/enterprises.oid file. (Note: Some of the enterprises in this file have spaces within their name. This WILL NOT WORK. So if for some reason, an enterprise you were going to use is "MY Enterprise" you must changes this file because your MIB will not compile with an enterprise with spaces in the TRAP-TYPE declaration.
    So, to add a new community, add an argument to the "managers" and "hosts" line in the .acl file and ensure that this reference has its IP address listed in the /etc/hosts file.
    Furthermore, in /etc/snmp/conf/snmpdx.acl a comparable entry needs to be added as well. The snmpdx executable is the master agent that the subagent communicates with. It also has an entry in its .acl file as follows:
    trap = {                                                            
    trap-community = SNMP-trap
    hosts = dv, localhost
    enterprise="Xenterprise"
    trap-num = 1-5

  • How can I change the policy file?

    I have designed an applet to read a file from the local Machine.
    This applet thro a servlet reads the contents of the file specified.
    I use Tomcat 4.1.12 server and this is an client-server application.
    To read the file in the local machine, I set the permission as follows in the .java.policy file in the Local Machine.
    grant codeBase "http://MyMachine:8080/Example" {
    permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete, execute";
    as the applet file is in the Example of the server "MyMachine".
    Its working and my applet is able to read the file from the local machine it runs.
    Now my problem is I cannot set/change the policy file in every machine where my applet runs.
    Instead if there is a way to change the policy when the applet downloads,that'll be effective.
    That is I donot want to go and change the policy file manually in each and every machine where my applet runs(I donot even know which are the machines going to run the applet).
    Is there any means to acheieve my need?
    Please explain me in detail or direct me to the relevent web sites or links.
    Thank you

    Hi Hosuke,
    I had the same problem, thanks for the advise.
    Still I have a remark to make.
    The thing is that, in order for the applet to have the permission granted (for whatever), you need to have a policy file which you can include in the JAR file (like you explained before) AND also you need to add an entry in the java.security file (located for me: "C:\Program Files\Java\j2re1.4.1_01\lib\security\java.security") that tells the applet where to find all the .policy files.
    Something like: policy.url.4=file:/c:/java.policy
    But since we are talking about an applet we are not able to make changes to this file.
    Maybe you or anyone else knows a workaround for this problem.
    Thanks in advance,
    Ronald Vromans.

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

Maybe you are looking for

  • How to find which are the user exits that updating z table.

    There was a question posted by someone else which said: I have a z table. my requirement is to find the user exits that update the value to this table? but my requirement is to get only those user exits that update my z table. Before that question wa

  • Saving a pdf without a "save" icon in the toolbar.

    I'm using Adobe Reader and Windows XP.  Most times I locate a pdf document on the web, I can save it by clicking the save icon (the one that looks like a floppy disc).  But, sometimes, I'm presented with a version of a pdf that allows me to print it,

  • RegEx Lazy mode bug in CS5

    Hello, it seems that sometimes, lazy mode regex doesn't work in CS5. Following this discussion: http://forums.adobe.com/message/4007138 I would like to understand how can I create a regex code for the following cases: 1 0,1 0,10 0,100 1,0 10,0 100,0

  • Chinese Characters Printing as Boxes in SAPscript

    Issue...why would a Chinese standard text print fine using the "INCLUDE" method, but output as boxes when that same Chinese standard text is retrieved successfully using the "PERFORM" method? Summary...I am currently experiencing problems printing Ch

  • Very annoying connection failed message

    Hello. This question was actually asked by another member and it was never answered. I keep receiving a connection failed message after startup. This message is the one where it states; "Connection failed. Server may not exist or is not operational a