compile java apps directly from notepad++

I have just started learning java. If you are the one like me who believe that IDE s like netbeans ,eclipse are only for coding experts and beginners should stick to  text editors to  learn so many new things without errors in code,  then you can use    notepad ++  which is an advanced text editor and  syntax aware .

But by default you can not compile and run a java application directly from notepad ++ since it is just a text editor and not IDE .

To compile and run java application directly from notepad ++ , we can execute a  saved commands sequence from notepad ++ . For this , we will install NppExec plugin .

Just download the  nppexec plugin and copy it to plugins directory of notepad++ ( or we can just import from notepad++ settings–> Import —>Import Plugin(s) ).

Now within notepad++  main window ,click on plugins–>NppExec—>Execute . Assuming that java bin directory location is C:\Program Files\Java\jdk1.7.0_02\bin , we will paste the following command sequence in the blank window  and save it with some name.

C:\Program Files\Java\jdk1.7.0_02\bin\javac $(FILE_NAME)
C:\Program Files\Java\jdk1.7.0_02\bin\java $(NAME_PART)





Done ! , now we can execute any java code with one click ( plugins—->NppsExec–>Execute–>ok) . You can find any coding errors in the console window .

Installing htop on centOS

Htop is a linux processes viewing utility which is similar to built in ps –aux commands.

Isntalling htop is simple if we have  gcc c++ ,ncurses-devel  ready on the mechain.

cd /
# wget-c
# tar-xvf htop-0.8.3.tar.gz
# cd htop-0.8.3
# yum install gcc c + +
# yum install ncurses-devel
#. / configure
# make
# make install


#htop  command will print the running processes information something like below.

Save yum packages for later offline installation



Sometimes we may need to save installation packages which are installed by using  yum.

This is useful if we want to reinstall the rpm packages when  internet is not available .


# vi /etc/yum.conf













Now we have all packages saved in /var/cache/yum directory  and we can install all packages including dependencies with the command rpm -ivh *.rpm

# cd /var/cache/yum

#rpm -ivh *.rpm


If any dependencies are missing , we can insert the OS installation disk and type the command ‘ yum localinstall *.rpm’.

#yum localinstall *.rpm

Changing default passwords of elastix

Elastix , which is a free forked version of asterisk pbx product comes with integrated ready to use add-ons like a2billing  ( billing module for voip/telephony ) , vtigercrm  etc.,


After installing we must change default passwords for elastix admin , a2billing and vitigercrm admin .

This can be done easily while installation time ( with new versions ) , or after logging into the panel with default passwords( older versions).


But  there was serious security bug ( i think it is patched now ) with elastix , where somebody can hack  the elastix box with the default password of built in user ‘asteriskuser’  and  able to make calls.


Here are the steps i followed to change astersikuser password


Step1 :

changing  password in database

-ssh to elastixbox with root privileges

-connect to sql  console  by typing  # mysql -u root -p

-now enter the mysql root password ( you can find this in /etc/elastix.conf  and you can even change it by typing #mysqladmin -u root -p’oldpassword‘ password ‘newpassword‘)


mysql> show databases;
| Database           |
| information_schema |
| asterisk           |
| asteriskcdrdb      |
| meetme             |
| mya2billing        |
| mysql              |
| roundcubedb        |
| test               |
| vtigercrm510       |
9 rows in set (0.00 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> set password for ‘asteriskuser’@’localhost’ = PASSWORD(‘newpassword‘);


change asteriskuser password in /etc/amportal.conf

now run command  # /usr/src/AMP/ to apply the changes


type #grep -r “asteriskuser” /etc/asterisk/*   to find files with asteriskuser entries and change the password to newpassword


[root@vm2 ]# grep -r “asteriskuser” /etc/asterisk/*
/etc/asterisk/cdr_mysql.conf:user = asteriskuser
/etc/asterisk/res_mysql.conf:dbuser = asteriskuser




*replace newpassword with your own password