How to install Ant in Linux?
Installing ant in Ubuntu is quite easy sudo apt-get install ant
How to use a jar file in java programs? (Compilation with jar files)
You may have often come across jar files which you have procured from some website or created yourselves. But if you want to make use of it or make use of certain classes defined in the java archive (jar), you must be able to compile with the jar file. For further discussion, we will consider [...]
How to create java jar files?
You would have seen or heard about the java jar file. Java jar file corresponds to the archived form of java classes (normally with the extension .jar). jar = java archive It is not mandatory that a jar file must contain only the class (*.class) files. It can contain directories, images, class files or other [...]
How to view the contents of java jar files?
A java jar file is a java archive of class files, media, configuration files and directories. It is very easy to create a jar file. Normally the jar files have the extension .jar. The option tf is used in conjunction with the command jar is used to view the contents of a jar file The [...]
log4cpp for logging in C++
log4cpp is used for logging purposes in C++. If log4j is one of the important package for logging in Java, log4cpp can be considered as an equal competitor for logging in C++. In fact, log4cpp is a port of log4j. Logging is very important in software development. With log4cpp, you can easily perform the following [...]
How to get the current time in seconds in Java?
Java provides functions like currentTimeMillis and nanoTime to print the current time in milliseconds and nanoseconds respectively. But to get the system time in seconds, we can make use either of these functions. The following program illustrates this 1 second = 1000 milliseconds = 1000000000 nanoseconds class CurrentTimeSeconds { public static void main(String args[]){ long [...]