Archive

Archive for September, 2013

Tomcat Installation & Configuration

September 23, 2013 Leave a comment

 

 

At the time of this post, the latest stable version available form Apache Tomcat is 6.0.x. Older releases of Tomcat can be found on download section of http://tomcat.apache.org/. Apache Tomcat version 6.0 implements the Servlet 2.5 and JavaServer Pages 2.1 specifications from the Java Community Process, and includes many additional features that make it a useful platform for developing and deploying web applications and web services.

 

Different versions of Apache Tomcat are available for different versions of the Servlet and JSP specifications. The following table shows the dependancies:

 

Servlet/JSP Spec Apache Tomcat version
2.5/2.1 6.0.x
2.4/2.0 5.5.x
2.3/1.2 4.1.x
2.2/1.1 3.3.x (archived)

 

  

Before downloading Tomcat, you might want to know about the different releases available from Apache:

  • Alpha releases may contain large amounts of untested/missing functionality required by the specification and/or significant bugs and are not expected to run stably for any length of time.
  • Beta releases may contain some untested functionality and/or a number of relatively minor bugs. Beta releases are not expected to run stably.
  • Stable releases may contain a small number of relatively minor bugs. Stable releases are intended for production use and are expected to run stably for extended periods of time.

 

Pre-requisites:

Tomcat requires Java to be installed on your computer to run. Make sure you have a recent Java version installed and JAVA_HOME variable to be set. Note: Refer to Java Installation and configuration post for details. After setting the JAVA_HOME environment variable, you can install tomcat.

 

Download Instructions: Read more…

Advertisements

MySQL Tips for Java Developers With Mark Matthews.

September 20, 2013 Leave a comment

  

MySQL Server is available as free software under the GNU General Public License (GPL). Its most often the first choice for small scale projects. Even established free software projects which require a full-featured database management system use MySql, such as WordPress, hence establishing the reliability of the server.

Lot of us here have our share of experiences with Java & MySql. Database transactions are always the most expensive processes (in terms of resource consumption) in any industry application. Its beneficial to dish out tips and tricks about database connectivity for any java developer. The following interview throws some more light on this significant subject. Read more…

Disable EditPlus backup .bak files

September 15, 2013 35 comments

I have been using Editplus as a high-end alternative to notepad,  and ofcourse it is meant for much more. When you install a fresh copy of Editplus, you will find (.bak) files saved along with the actual file that you may edit. It is supposed to be helpful, and well may be, but at most times its a pesky task to remove them, as chances of using them are highly unlikely.

EditPlus is a text editorHTML editorPHP editor and Java editor for Windows. While it can serve as a good Notepad replacement, it also offers many powerful features for Web page authors and programmers.

To disable creation of the backup files (*.bak) while editing in EditPlus, follow this step:

  • Go to Tools -> Preferences -> ‘Files’ category and turn off  ‘Create backup file when saving’ option. You can also opt to save all the back up files in a chosen destination if you wish to, by clicking on ‘backup options’.

The Sixth Sense Project – Minority Report Reality Check?

September 12, 2013 Leave a comment

 

How cool can AI get? Or, how real can AI get? As we speak, there are thousands of AI and robotics experiments conducted around the world. But can they be used by you and me in real time? Well, may be. And here’s definetly one worth a try for curious AI freaks, referred to me by one of the co-authors of this blog.

A handy gadget hanging around your neck, displaying all the information you want to know about anything or any person on it or him/her? Check this ‘Sixth Sense’ out.

 

Ted Quotes:

This demo — from Pattie Maes’ lab at MIT, spearheaded by Pranav Mistry — was the buzz of TED. It’s a wearable device with a projector that paves the way for profound interaction with our environment. Imagine “Minority Report” and then some.

 

Vodpod videos no longer available.

 

 

Pranav Mistry Quotes:

‘SixthSense’ is a wearable gestural interface that augments the physical world around us with digital information and lets us use natural hand gestures to interact with that information.

 

Links:

http://www.pranavmistry.com/projects/sixthsense/

Java Installation & Configuration

September 10, 2013 9 comments

 

 

Java is freely downloadable from Sun’s website (http://developers.sun.com/downloads/) . What’s to decide is which version to chose? At the time of this post, recommended Java versions are 1.4 , 1.5 and 1.6. While Java 1.4 has been in the field for quiet few years and personified as a de-facto across wide range of applications and industry choice, Java 1.5 has made its advent to an extent that many Java applications across the globe are now migrating to 1.5. Reason being simple, Java is backward compatible and richer features of Java 1.5. While Java 1.4 has persisted to demonstrate reliability, Java 1.5 has proved to be more plenteous. Relatively recent arrival of Java 1.6 has its share of the buzz with more features in the kit. Now, we have a sneak peak into Java 1.7 available as well. With every new release, new features in Java will be explored. As this post’s focus is on the installation/configuration facet, we shall keep the discussion of java versions, features, pros & cons as an open topic.

Many times, there’s confusion about PATH / CLASSPATH/ JAVA_HOME variables. What they actually are and how they matter? Or if its really necessary to set them, if so how to set them? Below we try to answer all the questions that matter.

The following sections describe:-

  • Downloading Instructions – Describes where and what to to download.
  • Installing Instructions – Describes how to install Java into a location in the computer.
  • Configuration Instructions – Describes how to set up a computer to write java programs and also execute them.

 

In brief:

  • Download Java (JDK – if you want to write and run your own java programs / JRE – if you only want to run java programs) from Sun’s website. (Chose your java version)
  • Once downloaded, install Java to any location on your computer
  • Set environment variables (PATH / CLASSPATH / JAVA_HOME – all optional and set for convinience) in your computer.
  • Set PATH to (java installed location)/JDK_verstion/bin (optional)
  • Set CLASSPATH to (java installed location)/JDK_verstion/lib/tools.jar (optional)
  • Set JAVA_HOME to (java installed location)/JDK_verstion (optional)

If you are using any IDE for working on java, you dont even have to set the environment variables, as the IDE itself ships with a support for a Java version. You have to set the environment variables most likely in situations like:

  • You want to work with simple text editors like notepad
  • You want to work with certain java dependant softwares like Ant, Glassfish, Tomcat etc which need java environment variables to be set.

Refer below detailed description for more information.

 

 

Downloading Instructions: Read more…

Java Primer

September 7, 2013 Leave a comment

 

 

 

Java Logo

 

 

Java Origin:

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995. The language derives much of its syntax from C and C++ but has a simpler object model. Java applications are typically compiled to bytecode (class files) that can run on any Java virtual machine (JVM) regardless of computer architecture or operating system. As of May 2007, in compliance with the specifications of the Java Community Process, Sun made available most of their Java technologies as free software under the GNU General Public License (GNU GPL or simply GPL is a widely used free software license).

It was originally designed for use on digital mobile devices, such as cell phones. However, when Java 1.0 was released to the public in 1996, its main focus had shifted to use on the Internet. It provided more interactivity with users by giving developers a way to produce animated webpages . Over the years it has evolved as a successful language for use both on and off the Internet. A decade later, it’s still an extremely popular language with over 6.5million developers worldwide.

There were five primary goals in the creation of the Java language:

  • It should be “simple, object oriented, and familiar”.
  • It should be “robust and secure”.
  • It should be “architecture neutral and portable”.
  • It should execute with “high performance”.
  • It should be “interpreted, threaded, and dynamic”.

 

Java Introduction:

 “Java” generally refers to a combination of three things: the Java programming language (a high-level, object-oriented programming language); the Java Virtual Machine (a high-performance virtual machine that executes bytecodes on a specific computing platform, typically abbreviated JVM); and the Java platform, a JVM running compiled Java bytecodes, usually calling on a set of standard libraries such as those provided by Java Standard Edition (SE) or Enterprise Edition (EE).

For every dusty definition that speaks of applets and Just-In-Time compilers, there are new directions and new realities that have settled in, understood by many, yet not always completely documented. Java used to mean:

  • Applets
  • Bytecode interpretation
  • Slow performance
  • A “cargo cult” awaiting drops from Sun

Today, it means:

  • Web applications, web services, SOAs, etc.
  • Hotspot dynamic compilation
  • High-performance
  • An open source community, increasingly independent of Sun

The old slogan “Write Once, Run Anywhere” still holds true–but what’s being written and where and how it’s being run are changing.

  

Implementations: Read more…

Why Java?

September 1, 2013 Leave a comment

 

 

Java owned by Sun Microsystems, Inc. is just another object oriented language which is easy to learn and easy to use. C and C++ have thier share of uses and users deservingly and Java takes it all to another level. It is not difficult for any C/C++ developer, or any object oriented/non-objected oriented developer to get hands on with Java. Various tutorials, crash courses are available all over the internet space for starting up with Java or migrating to Java from any other technology.

Java has lot to offer and that can be inferred by its wide use. It might be one of the reasons for many in trying to know “what is this Java all about anyway?”. It can be used from simple applications to enterprise business applications. Apart from the featurs that we discuss below, other reason is also that Java being free and an open-source software, many third party organizations have used / based Java to develop robust frameworks and high-end solutions for today’s real-time applications. From Sun’s own enterprise solution J2EE to various other server-side solutions, Java has been in the heart of many business applications today. Let’s try to explore why Java is what it is today.

Traditionally, software programs were being written in source code and then compiled into machine code that talks directly to the operating system on a computer. This means that traditional programs depend on, and are bound to, a particular platform. Porting from one platform, or operating system, to other, is traditionally time-consuming and prone to errors. The Java platform is a virtual platform that mitigates this dependency by providing a model in which software is written and compiled, and can then be transmitted over a network and run anywhere by a fully compliant virtual machine. This model provides the additional benefit of heightened security, both because programs can be verified by the client’s virtual machine after they have been transmitted over a network, and because the client’s virtual machine can run programs in a secure “sandbox” that prevents certain destructive behaviors.

Software programmers have embraced the Java platform because it reduces the cost and time required to write and support software code. They are no longer required to rewrite software to function on different computers with different operating systems. Companies and organizations deploying applications, favor Java technology because it minimizes the cost of purchasing or modifying different versions of software applications for the various types of computers and servers within their networks.

 

Sun Quotes:

To date, the Java platform has attracted more than 6.5 million software developers. It’s used in every major industry segment and has a presence in a wide range of devices, computers, and networks.

 

Few of the reasons for Java’s popularity: Read more…