Java Tutorials

1. Update contents of a file within a jar file

By: Naren : 2015-04-24

Description: Recently there was a change of IPs in my servers. Therefore some of the applications stopped working. For example, there was an application that was running as an executable jar file. The access to other resources from that application was using IP Addresses and there was a config file named bcconfig.xml that had all the IP addresses of various resources the application needs to access.


2. Tomcat and httpd configured in port 8080 and 80

By: Emiley J : 2013-07-21

Description: When you install Tomcat in your server, by default it uses port 8080. Typically in a linux system, you can install apache2 or httpd as a web server that handles the default port 80 and then uses mod_proxy to send requests to Tomcat at port 8080 for sites hosted in Tomcat.


3. Java String

By: Emiley J : 2012-11-27

Description: The literal meaning of the word String means 'something that is twisted together to form a thin length'. The verbr String means 'hang something so that it streches in a long line'. In computer programming languages, String means a datatype that is used to store some characters. A Java String is a stream of characters grouped together serially. An example String is a word "Hello" or a phrase "Hello World".


4. Java File

By: Emiley J : 2012-11-27

Description: What do you normally do with a File? A file is used to store your documents. Right? In Java, a file is treated as a stream of characters, objects or any primitive data types and saved in a computer file such as myexpenses.txt. Java has a basic package java.io that contains all File related classes to handle file reading, writing and manipulating the contents.


5. Draw a bar chart in Java

By: Paawan Chaudhary : 2012-09-19

Description: This is a Java program to draw a bar chart for the table given below which shows annual result analysis of a school from period 2001-2005.these values may be placed in a HTML file as param attributes and then used in Applet for dislaying bar-chart.


6. Java program to display numbers from 1 to 10 on Applet

By: Paawan Chaudhary : 2012-09-19

Description: This is a Java program to display numbers from 1 to 10 on Applet such that each number will be displayed after delay of 100ms.


7. Java program to calculate volume of a Box

By: Paawan Chaudhary : 2012-09-19

Description: This is a Java program to Create a user-defined package box which has a class definition. For box having data member and disp( )method and calculate volume from a source file.


8. Java program to print prime numbers using Thread

By: Paawan Chaudhary : 2012-09-19

Description: This is a Java program to implement two threads such that one thread prints prime numbers from 1 to 10 and other thread prints non-prime numbers from 1 to 10 (use Thread class ).


9. Java program to check if user input is an even number

By: Paawan Chaudhary : 2012-09-19

Description: This is a java program to accept a number from the user and throw an exception if the number is not an even number.


10. Java program using Method Overriding

By: Paawan Chaudhary : 2012-09-19

Description: This Java program implements Method Overriding for following inheritance : (Assume suitable data )