Working with Google’s Youtube API

From last few hours I was working on a simple Google’s Youtube API application, which can show the highest rated 5 videos from the Youtube.com. Instruction on the API is given on http://code.google.com guide. The instruction guide is for different language like php,.net and java. Being a java geek, I developed my application in Java.

You can find a small example on Youtube API in www.javacodegeeks.com. This example will clear the concept on Youtube API, then with http://code.google.com guide you can do lot with Youtube videos.

You can view my application here.

Advertisements

After Building First Application in Google App Engine

As Google provide biggest gift Google.com for the programmer, without which we can’t imagine programmers world, here as Google App Engine is another facility to the open source web programmer by providing platform which supports Java, Python, Ruby and JavaScript. In Google Application, we can run and upload our application free of cost using Google’s infrastructure.

I have uploaded a simple login application, here. Its was quite easy t develop, and publish. All I used is Eclipse and a Google plugin.

If you where new to Google App Engine, following question’s link may be useful for you.

What is Google App Engine?

Where to begin?

How to install Google App Engine in Eclipse?

Where can i get tutorial to build Google App Engine Application?

Google App Engine

Configuring JDK in Eclipse

While building Google application, when I was adding JSP file in war directory, I was getting JDK configuration error. After lots of googling , solution found in this youtube video.

Java Documents in CHM format

For studying from the  soft-copy format, I like CHM(Windows Help format) format to be more user-friendly.  And here (http://www.allimant.org/javadoc/) is some chm java document which is given for free-download. The contents are as similar as in the sun website. I found it very much useful while working with Java; I hope it will help you too. As mention in website, It is in Windows Help format. But it can be open in Ubuntu also, if you install chm plugin. You can get the the installation steps here.

James Gosling’s new home page

As gosling left oracle/sun, now he is with new blog address, http://nighthacks.com. Here he had transferred all his previous blog from sun. There he mention that some of his previous post in blog.sun.com are under some restriction. Then I realize, what might be the reason behind resignation.

He is living legend for Java Programmer. My very best wishes to James Gosling for his New Road.

What might be the future of JAVA, when it’s father left Oracle/Sun?

This question is really hitting my brain every time I am writing code. After the resignation of James Gosling, and specially after reading his blogged sentence,

As to why I left, it’s difficult to answer: just about anything I could say that would be accurate and honest would do more harm than good.”

I think there are lots of words behind this sentence.

After reading news about Gosling resignation, I felt very bad as well as scared. Any way It is sure that Gosling will support java one or another way. But, is java very much secure for future? Or Oracle bought it just for their product? Really big question.

Executing System .exe File of Windows from Core Java

One of my friend was trying to open system calculator and notepad from core Java coding, in windows XP. As he was not getting the solution, after some browsing I found the solution which works very well with xp as well as notepad. I found the trick to be very useful. If we are buliding application for windows, why should we crack our head to build application like calculator and notepad for our system?, which is already very well there in windows.

We have an exec method in Runtime class, which can be used to execute the windows executable file.

For Notepad:

Runtime.getRuntime().exec("C:/WINDOWS/system32/notepad.exe");

For Calculator:

Runtime.getRuntime().exec("C:/WINDOWS/system32/calc.exe");

These command should be in try block

try {
     Runtime.getRuntime().exec("C:/WINDOWS/system32/calc.exe");
 } catch (Exception ex) {
     ex.printStackTrace();
 }

I hope in some kind of project it may help you.

Introduction To Nanotechnology

Till day before yesterday, I had only heard the name of nanotechnology. As one of my friend tell some introduction of it, I was very much curious to know about this technology. So last few hours I spend for searching some information about it, and finally I got some idea as an introduction. After gaining some idea about the small but large technology called nanotechnology, I design a presentation so that it might be helpful for those who want to get some introduction knowledge about it.

Click Here To Download.

Rules for Variable Argument List (var-args)

As Java alows to create methods that can take variable no of arguments, we do have some rules to be followed such as:

  • Var-arg Type: While declaring var-arg parameters, we shoud specify the argument type which can be either primitive type or object type.

void example1(int… x){}

void example2(ClassA… obj){}

  • Basic Syntax: For the declaration of var-arg parameter, we will provide ellipsis(…) followed by type then a space and then a name of thee array that will holds the received parameter.

void example(int… x){}

  • Other Parameter : We can even provide other parameters in a method that is not var-arg.

void example(int x, char y,char… z){}

  • Var-arg limits: The var-arg mustbe the last parameter in the method’s signature, and we can have only one var-arg in a method.

void example(int x, char y,char… z){}

Some Useful Rules For Interface

As I found some Rules for Java Interfaces, which is very useful for any java programmer, I am publishing it here. If you have some more idea please do send me.

The rules go like this:

  • The entire interface is implicitly public and abstract. That means, we do not need to type public or abstract modifier in the member methods.
  • All variable defined in a interface must be public, static, and final. That means, interface can define only constant not instance variable.
  • Interface method must not be static.
  • As interface methods are abstract, they cannot be marked final, strictfp, or native.
  • An interface can extend one or more other interfaces.
  • An interface cannot extend anything but another interface.
  • An interface cannot implement another interface or class.
  • An interface must be declared with the keyword interface.
  • Interface types can be used polymorphically