Thursday, November 15, 2012

How to FTP

  • In a terminal type below and get gftp installed.
             apt-get install gftp
  • Once it is installed, type gftp and press enter and you will get below window. 

  • Mention the host u want to transfer the file in to, user name and password you will use to log in to that server.Then from left side select the file you need to transfer by giving location and selecting file.Then click arrow to transfer it.

Monday, October 15, 2012

How to Debug In Eclipse

neststat -a |grep http

eg:netstat - nap|grep ""

Any port which is not used above, can be set at debug port.

In Tomcat -> bin , we have the file. Paste the below lines to that file.Port specified should be the debug port.

# Debug settings
export JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5013 $JAVA_OPTS"

Then in eclipse, right click on project and then go to Debug As -> Debug Configurations --> Remote Java Application --> (Rightclick on this) --> New and we get the below wizard.

 Port in above window should be the debug port we have mentioned earlier.

We can hav below in build.xml file.This is a task which will help start tomcat in debug mode.

<target name="tomcat-start-debug">
      <echo message="##############################################################" />
      <echo message="#                      Debugging Tomcat                     #" />
      <echo message="##############################################################" />
      <java jar="/home/ishara/Development/Tomcat/apache-tomcat-6.0.35/bin/bootstrap.jar" fork="true">
       <jvmarg value="-Dcatalina.home=/home/ishara/Development/Tomcat/apache-tomcat-6.0.35"/>
       <jvmarg value="-Xdebug"/>
       <jvmarg value="-Xrunjdwp:transport=dt_socket,address=5013,server=y,suspend=n"/>

run the task as below.

ant tomcat-start-debug

once tomcat is up, go to eclipse and debug --> debug configuration --> select saved remote java application and click on 'Debug' button.

Keep a breakpoint where necessary.

Then start your app, and it will stop at where break point is kept.

Thursday, June 21, 2012

MySQL Issues In Ubuntu

1) To install MySQL, run the following command from a terminal prompt.
sudo apt-get install mysql-server

2) If you need to check whether the MySQL server is running in your machine,  run the following command from a terminal prompt.
sudo netstat -tap | grep mysql

If you get the following reply, it is running.
tcp    0        0     localhost.localdomain:mysql    *:*     LISTEN -

To start the server type below.
sudo /etc/init.d/mysql restart

3) To stop the server type below.
sudo /etc/init.d/mysql stop

4) How to log in to MySQL
mysql -u root -p;

5) How to retrieve users list in mysql
select User from mysql.user;

6) How to create new user account

7) How to check existing databases
show databases;

8) How to grant all privileges to a user
GRANT ALL ON TEST.* TO 'Ish'@'localhost';

8) How to grant specific privileges to a user

9) How to log in as a different user
mysql -u USERNAME -p;
(here it will prompt for the password)

Monday, June 4, 2012

Alt+Tab Switcher effect Not Working In Ubuntu

Recently I was met with an issue after taking usual updates in Ubuntu.Normal Alt+Tab behavior would not work as it used to and that made my laptop completely unusable.
After looking through so many forums, I realized many people have faced the same issue.

If you face the same issue, below is how to get rid of it, temporarily.

1)Install Gnome shell in ubuntu 11.10 as below.

sudo apt-get install gnome-shell 

2) Logout from the existing session & select GNOME from the login Screen as below.

3) Once you log in you will get below desktop.

4) It will have some nice user friendly environments as below.

Thursday, May 31, 2012

How To Install NS2 On Ubuntu

1. Download a copy of ns-allinone-2.31.tar.gz and paste on your home directory (eg,
2. Then from the command prompt there, execute the following:
  •  tar -xzf ns-allinone-2.31.tar.gz
  •  cd ns-allinone-2.31
  •  ./install
After a long wait and a whole lot of text, you should see the installation finish up with text like the following:

Wednesday, April 25, 2012

How To Debug In Eclipse

1) change the '' file as below which is in 'bin' folder of your tomcat directory.Add below lines.

# Debug settings
export JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5013 $JAVA_OPTS"

2) Start your tomcat server.You can see now server is listening on port 5013.

3) Open debug perspective in eclipse. It will be shown like below in right side corner of eclipse.

4) In Eclipse Run -> Debug Configurations -> Remote Java Application (double click on this option to get below window) and you will get below window.Specify a name & debug port you have set in tomcat.(In above image you can see, it is set to 5013).The debug profile will be added under remote java application.

Click 'Apply' & click 'Debug'.

5) Once you click 'debug', in above window, it will open the debug perspective.You can see how we have kept a break point in one method.After creating the break point, log in to app and execute search or whatever the operation.But as we have the break point, operation will stop in the immediate previous line without executing line with break point.But in variables window, we can see all variable values of that line with break point as shown below.

6) following shortcut keys can be used as well.

F5 - step into (inspect within method)
F6 - step over (go to next line)

Wednesday, March 14, 2012

Ubuntu 12.04 (Precise Pangolin) BETA 2 is to be released on March 29th, 2012.

  • The first beta version that will become Ubuntu 12.04 LTS with codename "precise pangolin”, has been released by Ubuntu Development Team. the stable version will be released at the end of April 2012.

    I have listed down some new features in 12.04 which I thought would be interesting.

    • A Fresh Kernel - Finally, upgrading from the second alpha release of Precise Pangolin, this new beta version includes the 3.2.0-17.27 Ubuntu kernel, which is based on version 3.2.6 of the upstream stable Linux kernel.
    • Privacy Settings -Although this is not a huge breakthrough of system security, but will help improve account privacy. In earlier searches, every file and folder appears in desktop search, so if anyone has access to your account they can easily browser your personal content.But in 12.04 we can specify what files & folders would not be included in a search, so that they will remain private.

    • Ubuntu Software Center gained software recommendations. 


    • Goodbye Banshee, Welcome Back Rhythm box!  - Rhythmbox has just replaced Banshee in Ubuntu 12.04.                                                                                                                                                                                   
    • The HUD   - HUD means 'Head-Up-Dispaly', a new way to quickly search and access any desktop application’s and indicator’s menu.This is the Ubuntu 12.04 prime feature. Just hit the Alt key to reveal it.                                                                                                                                                                           
    • Brand New Video LenseWhen you open up the Unity Dash you can select from specific Lenses, specifying what you want to view. Previous iterations of Unity already included an Audio Lens, and now Video Lens have been added to that ever-expanding Dash. This new Lens will allow you to easily search Youtube, Amazon, Shows, ABC iView, Sci-Fi London, TED Talks, and more stuff  online.                      

    Ubuntu is starting to make it’s desktop hard to resist. It won’t be long before Ubuntu creates the right mixture of features and performance to make their distribution irresistible to users.

Thursday, March 8, 2012

The software development is not a question on can you ?  but will you?

This blog is Created with intention of helping out beginners in software development industry. As a developer there are many simple issues which you may face in your day to day life.Sometimes same issue occurs again & again and if you do not keep track of the solution, you have to go through the same tedious process to find the answer again.

The blog mainly focuses on providing a help for Ubuntu initial users with relevant to different kind of installations, daily features you may acquire on Ubuntu, development issues etc.Blog will specify other issues as well with relevant to specific tools a developer may use such as Eclipse, SQL Developer, Ant, Tomcat etc.

Hope everyone will be benefited.