Archive

Author Archive

How to Compile and Run Java Program in Linux using JDK

August 28th, 2008

Normally most the linux distros comes with gcj, which is a Java compiler for gnome. Most of the java programmers prefer only jdk. So how to compile and run a java program in linux. Download the latest jdk from the sun website. (jdk-1_5_0_16-linux-i586.bin  for a x86 system)

http://java.sun.com/javase/downloads/index_jdk5.jsp

And then to install jdk use the following

rosarioarun@ros-lap:~$ ./jdk-1_5_0_16-linux-i586.bin

This will extract the jdk and give an folder in current path as, jdk-1_5_0_16, this folder will have all bin, lib directories required by the javac compilation and execution.
All the contents inside this directory will be same as the conents when you install the jdk in the windows. You will have a question that, why not i use the extracted jdk folder in windows, in linux to compile the java program in linux.
Both the extracted jdk folders in windows and linux are not the same, the difference is the extracted contents in windows will have all exe file, where as in linux it will be binary files.
That is javac in windows will be javac.exe and in linux it will be javac.bin
Now to set the path proceed as below

rosarioarun@ros-lap:~$ PATH=$PATH:/home/rosarioarun/jdk1.5.0_16/bin/

this is just a single line script to set the path, you can view the PATH variable using echo

rosarioarun@ros-lap:~$ echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/rosarioarun/jdk1.5.0_16/bin/

Now you can compile the java programs using javac and run them using java commands.

  1. Compiling: $javac filename.java
  2. Executing: $java filename

Applications, Ubuntu ,

Voice chat in Linux with GTalk

August 17th, 2008

The most used IM client in Linux is Pidgin. But the problem with Pidgin is that doesnt support voice chat. Also the gtalk software is not available for linux. Its only available as exe that is supported only by Windows.

When i was chatting with my friend using pidgin and he was in gtalk, he called me for voice chat. But i couldnt. Googling this problem i found a solution. the solution is Empathy. Use Synaptic package manager, go to Settings->Repositories->Third Party Software and then click Add and add the following line

deb http://ppa.launchpad.net/telepathy/ubuntu hardy main

Then, Install the following packages using Synaptic Pagakage manager.

  1. Empathy
  2. telepathy-gabble
  3. telepathy-mission-control
  4. telepathy-stream-engine

After successful installation, open the Empathy application and use the menu, Edit->Accouts to add your gtalk account. Enjoy using voice chat with your favorite gtalk account using Empathy in Linux.

empathy

Empathy With my Gtalk account

Applications, Internet, Ubuntu ,

One Special day with Special Persons

August 9th, 2008

I had a chance of spending a day with 10 persons from Tanzania. An unforgettable day 25th July 2008. Had a wonderful time spending with them and taking them all around my native Kanyakumari.A day was not enough with them.

greatday1

A special day

And In that team, Father Maina, Eric, And Frank were more interested in the way i was using Ubuntu(Hardy). Frank was more interested and wanted to intall Hardy in his New laptop(HP), which was preloaded with Vista. So i used a Hardy dvd, and booted the laptop in Live cd mode and used gparted(Gnome Partition Editor) to partion the hard drive into four partions…

He had a thought that its not possible to install other OS, with out complete formatting and partitioning the hard drive. (As there was no partition at all and Only C drive and it has Vista). He was worried that his Vista and Recovery part to go off… I took of all his worries about hin his lap…  I partitioned, Installed Ubuntu with no loss in Vista or recovery part… Hardy Live CD is more power ful, also gparted is fantastic. Partion your new laptops with out loss of any data with Ubuntu Live CDs. Happy that i imported the Power of ubuntu and linux to few people.

Ubuntu ,

Accessing my Dataone with my Laptop Wireless

August 9th, 2008

Me accessing my DataOne broad band wireless in my hardy(ubuntu 8.04). For the post two year Iam using Dataone.. But I was not sure whether the wireless port in my modem was Input port or Output port. I tried connecting my Lap after purching my Lap.  I didnt know exactly what mode to use in my admin setup page for accessing… I was randomly trying one after the other.. And got it at last.

My Interface Setup in my admin page is in PPoA/PPoE mode, with the username and pasword defined in the router setup page itself. And my Cute hardy scans for the Wireless Lan and connects automatically leaving me no work now a days. My Hardy is always cute, When my boot process is over Iam ready to surf my Net, provided my Dataone modem is ON.

Connecting Internet, Ubuntu , ,

Changing Other CD Images to Standard ISO Image with IAT

July 28th, 2008

I was creating a photo slideshow VCD in my windows XP using Nero. My Writer drive was not working fine, so i decided to creat the cd image (.nrg) and write it using my Lap installed with Hardy(Ubuntu 8.04) using K3B. K3B didnt accept the nrg file… So going through how to convert the nrg to ISO, I came accross IAT.

IAT is nothing but ISo9660 Analyser Tool. In windows we use many CD Image manipulation softwares
Eg. Alcohol(.mdf), Clone CD(.cdi), Nero (.nrg) and many more. But the standart Image format accepted my all platforms are ISO(.iso).  iat   (Iso9660  Analyzer Tool) is a tool for detecting the structure of many types of CD-ROM image file formats, such as BIN,  MDF,  PDI,  CDI, NRG, and B5I, and  converting them into ISO-9660. Even many Operating System CDs are downloaded in Internet in the same file format. AS it is widely accepted standard. You can install IAT like

~$sudo apt-get install iat

provided your repositories are configured well. Also for the developers the source files can be downloaded in

http://prdownload.berlios.de/iat/

Usage is like

~$iat input_file.nrg output_file.iso

Applications, Ubuntu

Wireless Lan Switch Problem in Laptops with Ubuntu 8.04

July 28th, 2008

Many laptops, that uses Intel board faces problems with Wlan. That is, most of the time when booted with Ubuntu 8.04 the Wlan will not be enabled and the WirelessLan switch in the laptops will not be of any use… More over the Wireless Lan leds will also be of no use. I faced the same problem and i happened to reboot my ubuntu severall times to get my wlan enabled.

I googled and had a chat in IRC and found it a bug with Ubuntu. Also found the solution as i was surfing. The solution to the above problem is making the WLAN led glow and making the WLAN switch work. For that install the package below using Synaptic or atp-get

linux-backports-modules-hardy

that is install like

~$ sudo apt-get install linux-backports-modules-hardy

Even if it doesnt work after this, install the Latest stable version of ndiswrapper from the link,

http://downloads.sourceforge.net/ndiswrapper

Iam right now using my Dataone connection, in my Lap via wlan as my modem is Wireless enabled. I never reboot now a day to enable my Wlan enabled in my Ubuntu.

Linux Networking, Ubuntu , ,

D4X Rocks – Download Manager

July 22nd, 2008

D4X is a very cute Webdownloader or Download manager for Linux. Its More equivalent to Free Download Manager that is used for Window. The feature of D4x is quite interesting than many other Download manager that is ever used.

D4X means Downloader for X. X may denote Linux. It was developed in gtk+ programming. D4X is quite simple that any new users can use the software with no knowledge. You can install D4X using Synapic Package manager in you Debian or Ubuntu, as there repositories have D4X. To download it the softpedia link is

http://www.softpedia.com/get/UNIX/Networking/Client-Applications/Downloader-for-X.shtml

Using the D4X is very simple, copy the url to the file to be downloaded, Click the + icon in the software and paste the URL and click OK. Quite interesting features in D4X are sound effets on completion, ftp access, simple usage, logs, setting limits on download size etc… Use D4X for your downloads and Enjoy…

Applications, Internet

My Art using KolourPaint

July 9th, 2008

KolourPaint is an Opensource Painting tool. I sat with it, felt to draw something, and something came out…

carrot1

Art using KolourPaint

Write your comments about my painting…..

Applications, Ubuntu ,

Copying File across Between two systems in a Lan

July 9th, 2008

If in a Lan, Ping between two system to check the availability of the connection. If peer to peer, connect the lan cable. Assign the IP addresses for the two systems (Like 172.16.25.1 and 172.16.25.2 for both the systems, with subnet mask 255.255.255.0). That is the subnet addresses should be same for both the systems.

scp is the command that can be used for transfering files across the systems. Secure Copy(scp) uses Open SSH protocol for the file transfer. ftp can also be used for the file transfer. For using the scp command you must follow a rule. The rule is, the system you invoke this command should have the ssh client and the target system should have the ssh server(sshd). For copying the files from the source to the destination system, this command can be invoked in both source system or the destination system, but should follow the above rule.

The usage is the scp command is,

#scp username@<source-ip> :/path/to/the/source/file username@<destination-ip> :/path/to/the/destination/file

To copy a folder from the source system to the destination use the recursive the option,

#scp -r username@<source-ip> :/path/to/the/source/folder username@<destination-ip> :/path/to/the/destination/folder

The first user name is the user in the source system and the second username is the user in the destination system. The access privileges to the files or folder to copied or to be used as the destination folder depends on the user privileges used in the command.

Linux Networking , ,

Retriving Back Ubuntu After Reinstalling Windows in a Dual Boot System

July 6th, 2008

When you reinstall your windows in a dual boot system having you windows and ubuntu. Probably you will get a thought that your ubuntu got removed from your hard drive, and you may reinstall you ubuntu also. Thats a waste of time… Your ubuntu will be safe in your Hard drive but the thing is the boot loader doesnt know there is Ubutu in the  hard drive and its location. This is because

This is because, Windows in not more friendly. When you install the Windows it over writes other Boot loaders with its own. Also doesnot identify other Operating systems in the hard drive. Where are opend source boot loaders such as GRUB that come with most of the linus distros are more friendly and detects amost all operating systems.

So to get back your Ubuntu. Just install GRUB (Boot Loader) alone with the help of a Ubuntu cd or dvd, that will take few second than wasting you precious time. Also will give you back the same Ubuntu that you were using before and all softwares install as before….

To install GRUB alone follow the steps:

1. Boot your system with a Ubuntu Bootable Cd and Choose Live CD mode

2. After the Ubuntu boots in the Live-CD mode, press Alt-F2 and type gnome-terminal, and press Enter

3. Now follow the commands below

    sudo grub
    find /boot/grub/stage1
    root (x,y)
    setup (x)
    quit
    sudo shutdown “now” -r

    The resulting “find” command will display something like (hd0,1). In this example, you would then type root (hd0,1) and then setup (hd0) in the above area. These numbers might be different; that’s why I included the “find” command. So that find command will locate the partition where linux wass installed previously. That is Ubuntu partitions located either in front or behind their Windows installation or on a completely separate internal/external hard

    Ubuntu ,