The Java Coffee Cup Logo

Remote Debugging of Java Applications

At work I tried to debug the Java application that we provide to our customers. A nasty performance problem had developed in the course of time. To analyze this, I can recommend using VisualVM. It’s part of Oracle’s JDK (version 6 and up) but is also available as a stand alone download.

VisualVM also allows for remote debugging an application. To this end you can use the “jstatd” application, also part of Oracle’s JDK. When I used this app for some testing, I encountered the following exception at start up:

Could not create remote object
access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)
java.security.AccessControlException: access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:536)
at java.lang.System.setProperty(System.java:699)
at sun.tools.jstatd.Jstatd.main(Jstatd.java:122)

Vinay Singla has the answer on his blog. He explains that to run the application requires some permissions before it can run:

Cause :- The “access denied” error is expected, because “jstatd” requires a security policy file specified with the “java.security.policy” system property, if there is no security manager running on the machine.

His solution (as ‘translated to a Windows environment’, by me):

  1. Inside a DOS-box/Console, change to the bin directory, inside the JDK directory. (e.g. c:\program files\java\jdk7\bin)
  2. Check if a file exists with the name “jstatd.all.policy”. If not, create it with Notepad. If so, edit it with Notepad.
  3. Add this information to the file:
    grant codebase “file:${java.home}/../lib/tools.jar” {
    permission java.security.AllPermission;
    };
  4. Run this command: jstatd -J-Djava.security.policy=jstatd.all.policy
  5. Now you can connect to this machine via VisualVM.

Via http://dbafusion.blogspot.nl/2010/05/jstad-error-could-not-create-remote.html

The Google Plus Logo

How to Downgrade from Google Plus

Chris McLeod has an interesting story regarding canceling your Google+ account, either with or without canceling your entire Google account. Here’s the (essential) text of his article:

Step 1.

Log-in to the Google Account you want to downgrade. If you have multiple accounts, make sure you have switched to the correct one. Click the dropdown menu in the upper-right corner of most Google applications (where your user picture is), and click the Account link circled in red below:

del_g_plus_dropdown

Step 2.

Click the Google+ link in the sidebar menu:

del_g_plus_menu

Step 3.

The Downgrade link is at the very bottom of the page:

del_g_plus_link

Step 4.

You will be given the choice to disable your Google+ account, or to delete it, along with any social integrations (Google BuzzYouTube, etc). Personally, as I know I don’t have any integrations I use with my old account, I went for the delete option. Pick which ever is right for you, then tick the “I Understand/Accept” box at the bottom of the page.

del_g_plus

Step 5.

Click the button at the bottom of the page. Your account will be immediately disabled or downgraded from Google Plus. If all goes well, you will see a box asking for comments about why you did this. Feedback is always good for product teams, so leave a little message for them:

 

del_g_plus_comments

 

Via How to Downgrade from Google Plus « Chris McLeod.