Java Tutorials

121. CharSequence Interface in Java

By: Riktesh Srivastava : 2008-03-24

Description: In the example above, we create a StringBuilder object with the initial value of "Hello, World!". We then assign the StringBuilder object to a CharSequence variable named cs. We can then use the CharSequence methods to access the characters in the sequence, get the length of the sequence, get a subsequence of the sequence, and get the sequence as a String.


122. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

By: Emiley J. : 2008-02-11

Description: As always the NoClassDefFoundError is caused due to classpath problems or missing jar files. In this case, This is caused when the commons-logging-1.1.1.jar file is not in your path.


123. What is Java?

By: Emiley J. : 2007-12-06

Description: A search on 'What is Java' in google returns roughly about a trillion pages. That is the popularity of Java on the web. If you haven't read the history of Java please read it first here. Java was just meant to be a portable, platform independent programming language. But over the years it has transformed into a complex platform for computing portable software across different devices and systems.


124. History of Java

By: Emiley J. : 2007-12-06

Description: It is always a good practice to know a little bit of history and background of any technology before starting to actually use it. In fact Java has nothing to do with the 'Island Java' in Indonesia. It all started at Sun Microsystems when they were developing an application for the 'set-top box'.


125. Getting Started with Java

By: Emiley J. : 2007-12-06

Description: If you are familiar with C then Java should be very familiar to you in terms of syntax. If you are a C++ programmer the Java will be easier still since Java is also purely an Object Oriented Programming without some of the features like Pointers in C++.


126. How Java is Organized?

By: Emiley J. : 2007-12-06

Description: Java has changed tremendously and included more features over the years. The first basic version of Java comprised of just six packages. A package is a collection of Java classes. Sun grouped six different packages with classes doing specific jobs. For example the 'java.io' package consists of all classes that do input output such as reading files, writing to files etc. where as the 'java.net' package consists of classes that do networking such as making a HTTP connection etc..


127. Applet Notinited : Applet xxxxxxxxxxxx notinited

By: Emiley J : 2007-12-03

Description: Applet notinited is a message that appears on the status bar of your IE whenever there is a mismatch in the JRE versions in your PC compared to the applet's java version that you are trying to access. This can be fixed by changing back to your previous version of Java


128. Compiling multiple source files and specifying classpath using javac

By: Baski : 2007-10-14

Description: Assuming you have a folder named greetings and you have copied all your java source files in that folder, you can compile all of these files with a single command rather than compiling each of them separtely.


129. How to compile a Java program - javac

By: Abinaya : 2007-10-14

Description: One source file, Hello.java, defines a class called greetings.Hello. The greetings directory is the package directory both for the source file and the class file and is off the current directory. This allows us to use the default user class path. It also makes it unnecessary to specify a separate destination directory with -d.


130. Importing Keystore example using keytool in Java

By: Manoj Kumar : 2007-10-14

Description: The command importkeystore is used to import an entire keystore into another keystore, which means all entries from the source keystore, including keys and certificates, are all imported to the destination keystore within a single command. You can use this command to import entries from a different type of keystore. During the import, all new entries in the destination keystore will have the same alias names and protection passwords (for secret keys and private keys). If keytool has difficulties recover the private keys or secret keys from the source keystore, it will prompt you for a password. If it detects alias duplication, it will ask you for a new one, you can specify a new alias or simply allow keytool to overwrite the existing one.