Dealing with DLC’s in Playstation Network


Are you a casual gamer or a hardcore gamer? Your criteria or purpose doesn’t matter in gaming you do it to entertain yourself. There’s a point that you always want so badly to extend your gaming experience and that’s where you want to deal with DLC’s (downloadable contents).

PS3 DLC’s and region free games

Playstation 3 games are region free in fact there’s no region restrictions like in Xbox 360.  Games made for Europe (EU) playable in both Asia or North America (NTSC) but when it comes to DLC’s there’s a region restriction based game’s region. Lets think if you have a game made for EU and you downloaded some DLC’s from your NTSC account  and there’s a restriction that you cannot use it with your game. So it’s always good to follow a one direction either you buy games matching to your PSN (Playstation Network) accounts region or keep a separate PSN account for buying DLC’s that matches your game’s region.

Non-supported Playstation Network countries

When you are creating a PSN account you have to select a country in order to complete the registrations process, but what if your country not listed as a selection. Some countries  (most of Asian countries) are not supported by PSN it self but do not worry you can still create an account. As mentioned above you have to create an account(s) according to one of the two options. Here’s a step-by-step guide of how you can create a PSN account

I recommend creating a PSN account selecting USA as the country if you are country is not listed. Because most DLC’s and game merchandise are releases early in North America also it’s kind of easy to handle payments in US currencies.

Payment options and PSN wallet

Now you know the restrictions and the complications that you may have face when dealing with DLC’s. Lets look in to payment options that PSN provides for adding funds to your wallet in order to purchase DLC’s and game merchandise. PlayStation Network provides two options of payment methods :-

  • Pyastation Network card (PSN card)
  • Credit/Debit (International Visa) card


to be contained  …

Managing two Java versions (Windows)

Ever had a problem of working with two Java versions ? Well this post will explain the basic steps of switching between two or more Java versions that is currently installed on your Windows machine.

When installing Java on your Windows machine it will

  • Add/overwrite specific registry keys
  • Add/overwrite relevant exe’s to system (system32)
  • Environment variables (sometimes this we have to manually if we are installing the second Java version on same machine that has another version of Java already installed)

These approaches will change/modify both Java run-time and JDK on a machine. So when we are switching between different Java versions we have to change these locations by manually or using an automated way. In this post I will only explain the manual approach.

Now I assume you may have already installed a one Java version on your machine so go to the below link and download the latest Java version (current latest version is Java 7)

When you visit the above link you will see they have listed different versions of Java on the table titled as Java Platform, Standard Edition. Download the JDK version (it will also provides the JRE) relevant to your system arch type either 64bit version on 32 bit version. After downloading JDK (ie:  jdk-7-windows-i586.exe) you can now install the Java on your machine. Likewise you can download and install many Java versions on a single machine. Now lets see how you can switch or change a Java version.

First go to the installation location of you all Java versions.


F:\Softwares\Java\jdk1.6.0  – for Java 6                                                                                                                                                  F:\Softwares\Java\jdk1.7.0 – for Java 7

Before you do any changes lets check the current Java version. Open your command line (or cmd) and type java -version.It will give you a output similar to this.

java version “1.6.0_20”
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

of so it’s Java 6 now we want to switch to Java 7

go to bin folder of your Java installation which you are going to switch (Java 7)

F:\Softwares\Java\jdk1.7.0\jdk1.7.0\bin ——– now location three exe files mentioned below.

  1. java.exe
  2. javaw.exe
  3. javaws.exe

copy these three exe files to your Windows system32 folder.


if it asks to overwrite go ahead and do it. Ok now the Java 7 run-time is successfully inserted in to our system but before we proceed we need to another small change to our Windows registry. That change will tell system to use Java 7 as the current system run-time (which is located in system32).

To change the relevant registry key you need an Administrative privileges so make sure you log in as an Administrator of a system. Now go to the registry editor simply type regedit on you run program application. Now location the key

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\CurrentVersion

You may see current version as 1.6 modify it to 1.7. That’s it now you are almost done you can now check the Java version again now it says.

java version “1.7.0”
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

Yes, it has changed to Java 7 the hard part is over now. You can now change the Windows environment variables to use JDK on your machine just like you did before with your previous Java version. Now if you want to switch back again to Java 6 you can follow the same steps mentioned above.

As you can see there’s a bit of hassle when you have to change the Windows registry and copying exe files all by yourself. So you can always go ahead and write a Windows batch process or a simple C/C++ script to automate these steps.

Introduction to Python


python logo

After a long time I haven’t post any blog entries,Ahhh I was too lazy and kind of busy with my studies,recently I got a chance to look in to a technically enhanced language,which is Python.It’s adoption is now drastically expanding among most of the corporate IT sectors, for example Google.Google’s new innovation,Google wave,it’s server (Pygowave) is entirely developed using Python + the Python web framework called Django.So at this point I’m going to step in to Python and briefly describe how to setup python in various platforms and will perform a small hello world example.

Special qualities of Python language
Platform independent.
Can be use as a scripting language.
Open source.
Easy to use.
Can be easily manipulated with various web freamworks.
Special interaction with the Java platform (Jython).
Moreover it’s really fun.

Lets do this (Installing Python)

So if you want Python installed on your platform and need to play with it you need a special software called Python interceptor which is bundled with the Python installer.You can get the most recent Python installation from
Visit there and download it.

OK, when you visit,you’ll see several different links in there such as Python 2.6.x and Python 3.1.x, click on a windows installer link and you’ll start the downloading process
Note:If you’re running on an AMD machine you need to select appropriate link.After downloading the installation bundle run the file by double-clicking.Follow the installation steps on the Python installation wizard don’t be afraid just select the default settings.OK now you’re done.I will continue with some code examples after explaining how to setup Python on Linux and Unix.

Linux and Unix:
Most Linux and Unix distributors included the Python interceptor.You can give it a try straight away,start the terminal/command prompt and use the command $python,by running this command will start the python interceptor and will out put the following information on to your terminal.
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

if it not you’ll get a command error
python: command not found
(Which means python is not already percent)
I’m not go in to details about how you can install Python on Linux or Unix platforms,you can get the complete guid from here

OK, assume that you have successfully installed Python on your system.Now it’s time to do some coding.Here I’m using Python interceptor on windows because currently I’m on windows,and my Python version is 2.6.

Starting the interceptor(Windows)
Programs ➤ Python 2.6 ➤ IDLE (Python GUI), you should see a window
like above, this is the Python shell inside that the Python interceptor is running.

Lets try a small code “Hello World”,
>>> print "Hello, world!"
Press enter,and the python interceptor will out puts the following.
Hello, world!

Note:You see on the screen cast I have used a semicolon “;”, but don’t worry it’s not needed it’s optional if you’re a so called Java enthusiastic person you’ll probably use a semicolon,but the Python interceptor simply doesn’t care about the semicolon.

OK,that’s it for now I’m tired.I know this is so little and you want more,Well you’ll find out more exiting things that Python can do in the near future. Keep in touch.

How to setup Glassfish on ubuntu

glassfish logo

NOTE: It has come to my attention that this starts glassfish with root privileges which wouldn’t be good if this wasn’t a test server! A alternative (and better method) can be found at link cheers Jasper.

First you need to download the installer file from the glassfish website

which was glassfish-installer-v2-b58g.jar

Next you need to decide where you want to install it… For example /usr/local/appname. So you will need to copy the install.jar to /usr/local (the jar will extract files into a glassfish folder).

Next you follow the steps on the web page above… so basically…

sudo -s
ENTER PASSWORD (Root Password)
java -Xmx256m -jar glassfish-installer-v2-b58g.jar
cd glassfish
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup.xml

Next you can either start it with the command
/usr/local/glassfish/bin/asadmin start-domain domain1

Or better create a init.d file to start and stop it…

gedit /etc/init.d/glassfish

case ”$1” in
${GLASSFISHPATH}/asadmin start-domain domain1
${GLASSFISHPATH}/asadmin stop-domain domain1
${GLASSFISHPATH}/asadmin stop-domain domain1
${GLASSFISHPATH}/asadmin start-domain domain1
echo $”usage: $0 {start|stop|restart}”
exit 1

save and exit

chmod a+x /etc/init.d/glassfish

to have glassfish start during boot (and stop during halt)

ln -s /etc/init.d/glassfish /etc/rc1.d/K99glassfish
ln -s /etc/init.d/glassfish /etc/rc2.d/S99glassfish

Voila that’s it…


Examples on GWT

Extends popupPanel to create Tooltip

package com.javagwt.gwt.client;
(This can be vary according to your package structure.)


public class GWTClient implements EntryPoint{
public void onModuleLoad() {
Label label = new Label();
label.setText(“label with tooltip”);

label.addMouseListener(new MouseListenerAdapter() {
public void onMouseEnter(Widget sender) {
ToolTip tip = new ToolTip(“this is a tooltip.”,0,0);

public void onMouseLeave(Widget sender) {
public void onMouseDown(Widget sender, int x, int y) {
public void onMouseUp(Widget sender, int x, int y) {

class ToolTip extends PopupPanel{

final int VISIBLE_DELAY = 2000;

Timer removeDelay;

public ToolTip(String message, int x, int y){
this.setPopupPosition(x, y);
this.add(new Label(message));

removeDelay = new Timer(){
public void run() {
this.addPopupListener(new PopupListener(){
public void onPopupClosed(PopupPanel sender, boolean autoClosed) {

public boolean onEventPreview(Event event){
int type = DOM.eventGetType(event);
case Event.ONCLICK:{
return true;
return false;

NetBeans + Java Web Start

This tutorial also works for NetBeans 6.0 and 6.1

Downloading and Installing Netbeans Module for Java Web Start

  1. Open Netbeans IDE 5.0 and connect to the internet.
  2. Inside NetBeans IDE choose Tools > Update Center.
  3. In the Update Center, make sure the checkbox for the NetBeans Update Center Beta is checked. If you are using a development build, choose Development Update Center. Click the Next button to access the Update Center.
  4. After a few moments, the list of available modules comes up. Select the Netbeans Module for Java Web Start from the list as shown below and click the Add button to add the components.update center with java web start module selected
  5. Click Next. The Update Wizard asks you to accept the necessary licenses. Read them and click Agree to start downloading the module.
  6. After the download is done, click Next. The Update Wizard shows you an overview of the new module to be installed. Click Finish to complete the installation.
  7. After the module has finished loading, you can use the Java Web Start plugin in your IDE. Congratulations!

To reinstall the plugin to NetBeans IDE, you may need to remove the user directory of NetBeans IDE (it’ ilocated at %USER_HOME%/.netbeans/) and restart NetBeans IDE to install.

Creating a New Java Application

In this section, you create a copy of the GUI Form Sample application which is bundled with the IDE. You will add Java Web Start functionality to the application in the later steps.

  1. Inside the IDE, choose File > New Project to open the New Project wizard.
  2. Under Categories, select Samples > General. Under Projects, select GUI Form Examples and click Next.creating a MyApp project
  3. In the New Java Application Wizard, leave the name the project as the default GUIFormExamples and place it anywhere on your system. Details about wizard properties can be found here
  4. Click Finish, the application is created.The IDE creates the MyProjects/GUIFormExamples folder on your system. This folder contains all of your sources and project metadata, such as the project Ant script. The GUIFormExamples project is opened in both the Projects window and the Files window.

Enabling Java Web Start

You can activate the Java Web Start function at any time with the Enable Java Web Start command. This is a “one-time action “. After you have enabled Java Web Start for a project, the project can be debugged, deployed, and run with Java Web Start.

  1. Right-click the GUIFormExamples project node in the Projects window.
  2. Choose Java Web Start > Enable Java Web Start.enabling Java Web Start in the projectThe IDE creates a JNLP config file for the Java application and a web directory for deployment, and adds support for the JNLP serivces API. The JNLP config file is opened in the Source Editor.

Browsing Project Elements

You can view the application’s logical structure in the Projects window and its file structure in the Files window.

Browsing in the Logical View

If the Projects window is closed, open it by choosing Window > Projects (Ctrl+1). The Projects window shows a logical view of important project contents, such as Source packages. You can right-click any project node to access a contextual menu of commands for building, running, and debugging the project, as well as opening the Project Properties dialog box.

Browsing in the Physical View

Open the Files window by choosing Window > Files (Ctrl+2). It shows a directory-based view of your projects, including files and folders that are not displayed in the Projects window. From the Files window, you can open and edit your project configuration files, like the project build script and properties file. You can also view build outputs like compiled classes, JAR files, WAR files, and the generated Javadoc documentation.

Editing the JNLP Config File

The JNLP config file describes how to download and launch a particular application. By default, a new JNLP file is created at <ExamplesPath>/ with the necessary elements. You can view and edit the JNLP config file as necessary in the JNLP Editor.

You can open the JNLP file in the Source Editor by double-clicking the JNLP file in the Files window, or by choosing Java Web Start > Edit JNLP from the project’s contextural menu. You can edit the JNLP file using JNLP Visual Editor or edit the XML code by hand.

By default, all sections in the Visual Editor are expanded. You can close any section as you want by clicking the section title in the General or Resources tab. The section that you are working on is highlighted.

Defining the JAR Resource

Since the GUI forms were created with Matisse, the program needs the swing-layout-1.0.jar file in order to run. You can see that this JAR file is on the project’s classpath by expanding the Libraries node in the Projects window. You have to configure the JNLP file to make this JAR file available when the project is run with Java Web Start.

  1. Open GUIFormExamples.jnlp, if it is not already opened.
  2. In the Resources tab of the visual editor, expand JAR Resources and click Add.
  3. Type dist/lib/swing-layout-1.0.jar in the Href field and eager in the Download field, as shown below.Adding a JAR resourceNote: If you changed the name of the project from the default GUIFormExamples, the IDE normally names the JAR file for the project accordingly to match the project name. In this Matisse sample example, however, the JAR file name is static (in this case, GUIFormExamples.jar) and doesn’t change to match the name of the project. In this case, you need to modify the JAR file name in the JNLP file through the visual editor. Under JAR Resources, make sure that the JAR file name for the project is dist/GUIFormExamples.jar.

JNLP Visual Editor: General

The General tab of the Visual Editor is used to edit information specific to the JNLP file itself, the information about the application, and the application descriptor. It includes several sections:

  1. General
    This is the root JNLP element. It has a set of attributes that are used to specify information that is specific to the JNLP file itself. Edit the content in the textfield as necessary.

    • Codebase
      The codebase attribute of the jnlp element. It specifies the codebase for the application.
    • Href
      The href attribute of the jnlp element. It contains the location of the JNLP file as an URL.
  2. Information
    This is the information element. It contains information intended to be consumed by the JNLP client to integrate the application into the desktop, provide user feedback, and etc. Edit the content in the tex tfield or check the checkbox as necessary.

    • Title
      Title element (the name of the application).
    • Vendor
      Vendor element (the name of the vendor of the application).
    • Homepage
      Homepage element (the URL locating the home page for the application).
    • Description
      Description element (a short statement about the application).
    • Icon
      Icon element (Optional). The icon can be used by a JNLP client to identify the application to the user.
    • Start Menu Shortcut
      Menu element (Optional). It is used to indicate an application’s preference for putting a menu item in the users
      start menus.
    • Create Desktop Shortcut
      Desktop element (Optional). It is used to indicate an application’s preference for putting a shortcut on the users desktop.
    • Run Online
      offline-allowed element (Optional). It indicates if the application can be launched offline.
  3. Application Description
    This application-desc element gives description of the application.

    • Main-class
      main-class attribute of the application-desc element. It describes the main class of an applicaion.
    • Argument
      argument elements. It describe an ordered set of arguments to the application.

JNLP Visual Editor: Resources

The Resources tab of the Visual Editor is used to edit The resources element that used to specify all the resources, such as Java class files, native libraries,and system properties that are part of an application.

  • To add a resource: Multiple resources can be added by clicking the Add button on any resource section and filling in the necessary information for that kind of resource.
  • To delete a resource: Select the target resource in the resource table, then click the Remove button in that section
  • To edit a resource: Select the target resource in the resource table, click the Edit button in that section. This will pop-up the resource detail information dialog. Edit the content as necessary.
  1. Java Run Time Requirement
    The j2se element (sub-element of resources) specifies what Java 2 SE Runtime Environment (JRE)
    versions an application is supported on, as well as standard parameters to the Java Virtual Machine. Several JREs can be specified.
  2. Jar Resources
    The Jar element describes a jar file resource.
  3. Library
    The nativelib element describes a resource containing native files.
  4. System Properties
    The property element describes a name/value pair that is available to the launched application as a system property.

Deploying a Java Application

The Java Project can be deployed to a registered server. The bundled Tomcat Web Server is registered with the IDE automatically.

Setting the Project Main Class

  1. Right-click the project and choose Properties.
  2. Click Run in the left pane of the properties dialog box and type examples.ContactEditor in the Main Class field.
  3. Click OK.

Deploying the Application

  1. Right-click the GUIFormExamples project node in the Projects window.
  2. Choose Java Web Start > Deploy with Java Web Start from the contextural menu.The IDE deploys the application to the registered server, starts the server, and opens the default index page. The application can then be launched by clicking the “Click me!” link on that page.

Running the Java Application with Java Web Start

The Java Project can be run either as a standalone Java Application or run with Java Web Start.

Running as a Java Application

Choose Run > Run Main Project or right-click on the project node in the Projects window and choose Run Project. All other runtime settings are the same as for a regular Java project.

Running with Java Web Start

  1. Right-click the GUIFormExamples project node in the Projects window.
  2. Choose Java Web Start > Run with Java Web Start from the contextural menu. The application is launched by Java Web Start, as shown below.application deployed with Java Web Start

Debuging a Java Application with Java Web Start

You can use the Sun Microsystems JPDA debugger from the IDE to debug a Java application using Java Web Start.

  1. Set breakpoints and watches in the Java files.
  2. Right-click the GUIFormExamples project node in the Projects window.
  3. Choose Java Web Start > Debug with Java Web Start from the contextural menu.

The application is launched by Java Web Start and debugged into the breakpoints.

XAMPP on Ubuntu

This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.

This guide is aimed at a development environment only and should not be used as a public webserver. To setup a public webserver follow the directions on the Ubuntu wiki

As this is Ubuntu, all the major parts of a typical web server are included (in the main repo, or on the Ubuntu Server CD) and this is a great way to setup a server. The ubuntu developers have prepared a great web server and have made the process as seemless as possible.

But what if even the official way is still to complicated? What if you just want a quick web server for development?

Fortunately there is the XAMPP project: The XAMPP project bundles Apache, PHP4 & 5, Perl, mySQL, and a bunch of other utilities/applications into an simple package for Mac OSX, Windows, Solaris, and Linux. Obviously this HOWTO only deals with the linux version.

For those of you with already existing Apache/mySQL/php installations it installs everything into /opt so it doesn’t conflict with any other installation, and it is completely setup and ready to run.

Install XAMPP

Two easy steps:

  1. Download the most recent version of XAMPP: (at time of writing 1.5.3a)…ar.gz?download
    (Source URL:
  2. Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
    sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


To start it up, open a terminal and type this:

sudo /opt/lampp/lampp start


To stop it, open a terminal and type this:

sudo /opt/lampp/lampp stop

Additional XAMPP commands

To see additional commands, open a terminal and type this:

sudo /opt/lampp/lampp

Sweet XAMPP Control Panel

To use the sweet gtk/python control panel:

Run in a terminal:

gedit ~/.local/share/applications/xampp-control-panel.desktop

Paste the following into the open file and save and exit.

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/"
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP

“XAMPP Control Panel” will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn’t a index.php/html/etc file)
To set this up, run in a terminal:

  1. Make public_html directory in home directory:
    mkdir ~/public_html
  2. Link to /opt/lampp/htdocs
    sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

Open holes:

  1. The MySQL administrator (root) has no password.
  2. The MySQL daemon is accessible via network.
  3. ProFTPD uses the password “lampp” for user “nobody”.
  4. PhpMyAdmin is accessible via network.
  5. Examples are accessible via network.
  6. MySQL and Apache running under the same user (nobody).

This doesn’t leave your whole system wide open, but someone could hack your XAMPP installation, so be wary.
To fix most of the security weaknesses open a terminal and run:

sudo /opt/lampp/lampp security