Ubuntu 9.04 released.....

25 April, 2009 | | 0 comments |

Share |
Canonical Ltd. have released their latest updated version of their Ubuntu OS version 9.04 (code-named Jaunty Jackalope) on 23rd April, 2009. Ubuntu which as per a survey by "The Computer Magazine" is one of the most sought after and used Linux OS in the user and enterprise market is surely going to receive a warm welcome by the masses. And why not, surely Ubuntu has proved to a boon to Linux, Open-Source Development and most importantly and not the least, the FOSS users/community.







Surely I can say one thing, not only can I expect this release to patch many flaws over the previous one but also more features and capabilities like Bluetooth, Wireless LAN etc will be added. The features I've listed above may already be there (I guess) in Ubuntu v8.10 (code-named 'Intrepid Ibex') but I can surely say that they've become much better in 9.04. I can quote an example to substantiate my claims here. Just a couple of hours ago I tried a wireless-Internet stick with service provided by Airtel, guess what, it worked well without requiring any driver. Infact what shocked me was that when it detected the removable device it gave me all possible options of all GSM-Internet service providers existing in India. I just had to select Airtel from the list and off I went.

But amongst all these additions and advantages put at our disposal by Ubuntu's latest release I still feel there's is a lot of scope for improvement. Here are the reasons and places where I feel where Ubuntu lacks the tang....
1] Some of the basic codecs required to run basic file-formats like mp3, mpg, avi are not installed by default. So in that case you got to find and install them from "Synaptics Package Manager" which requires an Internet connection and it's surely time-consuming. That's the same story for a lot of small utilities.

2] Also the execution and reaction/latency time for Applications is a lot too much if you compare with even Windows XP which is 7 years behind's Ubuntu's latest release.

3] Drives have to be mounted all the time when they are to be used for the first time which is sometimes a big pain.

4] Internet is just indipensable for Ubuntu. You just can't think of surviving without it. Now I know that the root problem is - a lot of Apps. are developed for Microsoft's Windows platform but the same kind of enthusiasm is not shown by developers towards Linux platform.

5] Besides the above, there are many more.....
I'm not a critic and a pessimist so I can't point out many mistakes. Can I...?

Finally, I just hope Ubuntu keeps on getting better and better and surely it will, for Ubuntu stands for "Humanity to Others" and that virtue according to me is perennial and perpetual.

DSN-less Database Connection In JAVA...

23 April, 2009 | | 4 comments |

Share |
For connecting to MS-Access in JAVA VIA JDBC, there are two options:

1] Connect it VIA DSN(Data-Source-Name) configured from ODBC Sources in Administrative Tools in Control Panel

2] Connect it without a DSN(i.e. 'DSN-less' that's the way I've named it).

The second option is a far better option from feasibility, ease-of-use and professional approach point-of-view. Also there are a lot of advantages. I'll enumerate them as follows:

1] You don't need to manually configure the DSN settings everytime from ODBC Sources in CPL in case of DSN-less type of connection. Hence in this case you are saved from the cumbersome job of setting up the connection while deploying the project.
Add to it the pain of setting up the connection back again if you have logged onto a different user account in contrast to the one in which the connection was set-up. This happens in case if you have not checked the 'System Database' option and configured the rest of the settings from ODBC Sources. Also one thing to be remembered is that by default the 'System Database' option is not checked which means that the settings made are valid only for that current user account and not for all of the accounts existing on the OS.

2] Also in case you have not configured the DSN settings and you do not have MS Access installed then this will render you impotent. In case of DSN-less connection there is obviously no need to configure the DSN like I had explained it before.

3] And here's the best of , you do not need an MS-Access driver to connect to the DB in case of DSN-less connection since JDK has an inbuilt driver through which it operates.

Here is an example which shows DSN-less type of connection. I assume that you know the default architecture, classes, methods and syntax used for JDBC connection. So here it goes...

import java.sql.*;

try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection c=DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="+"DB.mdb","Uname","Pword");

// Here 'Uname' and 'Pword' are the username and password configured for the 'DB.mdb' database file. Note that the username and password is also to be configured from within the MS-Access DB.

Statement s=c.createStatement();

//Your DB operations like retrieve/insert/select operations would come here

s.close();
c.close();

//Closing the connection stream classes is extremely important
}

catch(Exception e4)
{
e4.printStackTrace();
}

------------------------------------------------------
Guru says Lolz...

Windows 7 RC delayed to May 5, 2009

22 April, 2009 | | 0 comments |

Share |
It's sad but I can't help it and obviously I cannot since it's a decision by the BIG BROTHER Microsoft . Yes, the RC release has been delayed to May 5, 2009. Windows 7 RC (Release Candidate) which is kind of a pre-final version and an improved one over the exiting BETA is expected to have a lot of surprises and shockers for the testers. Oops, I missed out on this information but it's not just for testers but Microsoft is releasing it even for the masses. So even Home-Users, Students, Professionals etc can get their hands on it. Surely this is a good tactical and strategical move by Microsoft to ease out it's pain and the media drubbing at the time of it's OS release. This has happened at the time of VISTA so for obvious reasons to avoid it this time there are a lot of mind games being played out there and why not, when you can get thousands of testers providing feedback with a great enthusiasm (including me) and that too without any cost. So by this way Microsoft is becoming more flexible with it's customer base. You'll read more on 'Microsoft becoming flexible and amiable' in my later posts so stay tuned.

Surely it's a good move which is benefiting both the sides. Coming back to Windows 7 discussion, I've heard from my MSP Alumni senior named 'Chakkaradeep' who is also a moderator/writer on www.neowin.net forums that Windows 7 RC is going to have more features to offer than the BETA release. Also it's expected that the compatibility and security issues are bound to improve as well. Will have to wait to see it myself.

With me over-excited to get my hands on the RC release which is already delayed, I hope RC lives upto it's expectations.

Guru says Lolz....!!!

How to execute commands in JAVA....

| | 1 comments |

Share |
Java as we all know is platform-independent but there are times when we have to use some external services/commands/applications or some provided by the OS. And infact rather then calling it SOMETIMES it's very much a mundane thing in projects. So I'll teach the entire thing here.....

For executing commands, we use a class known as "Process" which is an abstract class defined in java.lang package. The command along with it's arguments should be defined in a String array. This String array should be supplied to the Process using it's requisite 'exec()' method to execute the command. Also the output(if any) generated on the console(or command window) can also be retrieved.

Here are some examples:

1] To execute a timed shutdown 120 seconds later in Windows XP:

Note: The utility used here is "shutdown.exe" which is present in the 'system32' folder of 'Windows' and since 'system32' folder is there in the environmental variable list it can be used directly.

try
{
String command1=new String[]{"shutdown.exe","-s","-t","120"};
Process ps1=Runtime.getRuntime().exec(command1);
InputStreamreader ISR=new InputStreamReader(ps1.getInputStream());
BufferedReader BR=new BufferedReader(ISR);

String s5=BR.readLine();

System.out.println(s5); //The OP of the command is printed on the console
}

catch(Exception e4)
{
e4.printStackTrace();
}

2] To display an HTML page in "Internet Explorer" in Windows XP:

Note: The utility used here is "iexplore" which is present in the 'Program Files/Internet Explorer' folder of %HOMEDRIVE% and since 'Program Files/Internet Explorer' folder is not there in the environmental variable list it cannot be used directly. Here the absolute path of the utility has to be provided.

try
{
String command1=new String[]{"%HOMEDRIVE%\\Program Files\\Internet Explorer\\iexplore.exe","abc.html"};
Process ps1=Runtime.getRuntime().exec(command1);
InputStreamreader ISR=new InputStreamReader(ps1.getInputStream());
BufferedReader BR=new BufferedReader(ISR);

String s5=BR.readLine();

System.out.println(s5); //The OP of the command is printed on the console
}

catch(Exception e4)
{
e4.printStackTrace();
}

3] To get the environmental variable %username% (which gives the current logged user) in Windows XP:

Note: The utility used here is "echo" which is present in the 'system32' folder of WINDOWS and since 'system32' folder is there in the environmental variable list it can be used directly. But 'echo' is an internal command in Windows and hence can only be used with the 'cmd /k' switch in JAVA. Other internal commands are ''del','ren','attrib' etc.

try
{
String command1=new String[]{"cmd","/k","echo","%username%"};
Process ps1=Runtime.getRuntime().exec(command1);
InputStreamreader ISR=new InputStreamReader(ps1.getInputStream());
BufferedReader BR=new BufferedReader(ISR);

String s5=BR.readLine();

System.out.println(s5); //The OP of the command is printed on the console
}

catch(Exception e4)
{
e4.printStackTrace();
}

NOTE: The other methods which can be used with Process are 'destroy()' (which can be used to terminate a runing process), 'waitFor()' (which causes the current thread to wait, if necessary, until the process represented by this Process object has terminated).

Usage:
p1.destroy(); //Where p1 is object of Process

Some of the lesser known facts about Microsoft Windows XP Professional

21 April, 2009 | | 0 comments |

Share |
I'm sure most of us have long become proficient with Microsoft Windows XP Professional. Infact, I've become nostalgic with it and hence have made a foray into Linux Ubuntu/xUbuntu/Ubuntu Server/EduUbuntu and Windows 2008 Server Enterprise Edition. But there are still many of the lesser known details/content about Windows XP Professional which are not yet known to us (Atleast not to me inpite of using it for more than 5 years).

Here's the first surprise. This is an abstract regarding Windows XP Professional which I saw on Microsoft's web-site when I tried to download an official copy of the same under the S2F(Microsoft's Student-to-Faculty) initiative. Guess what, some of the facts pointed out in the description put up there are really really feature specific but important and not known to me and I'm sure to many of us. So here it goes....

Windows XP Professional is built on the core software code used in Windows 2000 and Windows NT Workstation. This code, known as the NT kernel, makes Windows XP more powerful, secure, and stable than Windows Me, Windows 98, or Windows 95. If you’ve used those systems in the past, you’ll notice a dramatic advantage: even if a program crashes, in most cases your computer will keep running.

With the dependable new Windows architecture you get:

  • Superior operating system technology, including preemptive multitasking, fault tolerance, and system memory protection, which all work to prevent and resolve problems, and to keep your system running smoothly.
  • The ability to recover your work in many cases, if your program crashes before you can save your work.
  • System memory protection to help prevent poorly written software from making your computer unstable.
  • In addition, when you install new software, you usually won’t need to reboot Windows XP, as was often required with earlier versions of Windows.

I'm sure you've found the above abstract really interesting from knowledge point-of-view.

Here's the second surprise. Windows XP has many editions or call it versions; right from Starter/Home/Professional/Corporate and the same in 64-bit editions with Home and Professional editions being the most sought after. But ever wondered what is the actual difference between Home and Professional editions....? Surely the difference is features but which and what all....? So I thought I have to surely put some light on this question. So here it goes....


I haven't finished yet and will surely continue with some more enlightment on the same topic. So keep in touch.....

Guru says Lolita .... !!!