A friendly place for Java developer, beatting your heart with communication anytime

Junit Assert Example

6Apr2012 In: Junit

In Junit, All Assert methods are being listed in utility tool class Assert, In this how-to tutorial, Let us conclude and give an overview of available assert statements with example code. Read the rest of this entry »

SAX (Simple API for XML) is an event-based sequential access parser API, it is a widely-used specification that describes how XML parser can read and pass XML content efficiently from XML document to applications. SAX XML Reader is one famous and most popularity selection of current XML parser. Un-like else XML-related specifications, it does not come from a formal committee or world-class company, it only was developed by the XML-DEV mailing list, all discussions, documents and implementations around SAX were done by Dev mail list. It has being received industry-wide acceptance. In this how-to tutorial/example, it provides a quick-start tutorial for java programmers to read XML via SAX parser/reader. Read the rest of this entry »

Java map iterator example

18Mar2012 In: Core Java

Map is one important part of Java collections implementation defined in java.util package. it is designed to store with key and value pair elements. In this how-to example, let’s go over how to iterate over a map in java.

Way 1: Iterate over a map using Java map Iterator

Maps do not provide an iterator() method as do Lists and Sets, but it provide two API keySet() and values(), the two APIs return a set view of the keys or values contained in this map,  The idea is to use keyset or values() to get keys or values in collection object form and then iterate over them. here is the Java map iterator example code: Read the rest of this entry »

Top1 Java Book Recommendation: Thinking in Java

Author: Bruce Eckel, Date of publication: February 2006, Reviewer: Meera Subbarao.
Download: http://www.mindviewinc.com/Books/downloads.html
Description: Thinking in Java is a comprehensive guide to the Java programming language, it gives insight of java and covers all aspects of core technologies including OO, Thread, Concurrency, IO, GUI/Swing and so on. It has been released five editions. The awards for Thinking in Java include Software Development Magazine Jolt Award for Best Book, Java Developer’s Journal Reader’s Choice Award for Best Book, Java Developer’s Journal Editor’s Choice Award for Best Book, Software Development Magazine Productivity Award. Thinking in Java has earned raves from programmers worldwide for its extraordinary clarity, careful organization, and small, direct programming examples. Read the rest of this entry »

Download file extension software for free!

  • Comments Off

Oracle WebLogic Server is a best building and deploying enterprise applications and services. Eclipse is an open-source community that develops open platforms and products. As so far we know, developers often integrate these standard toolkits together to develop the J2ee application, in order to significantly fix a server-side Java problem appeared trivia, we need to debug java code on weblogic server with eclipse via Java Debugger(jdb). In this how-to, we will guide you how to create a remote debugging connection between weblogic and eclipse. Read the rest of this entry »

The development is kind of process with frequently writing code, testing and fixing bugs, its very common that we want the modified java classes to be effective immediately without restarting the application. In this tutorial we’ll review how java classes can be reloaded without dynamic class loaders, and show you example step by step that reloads changes to JVM on-the-fly without downtime. We provide an efficient hotswap “Java code” solution even if are now working on very complicated project. Read the rest of this entry »

The purpose of this tutorial is to write and test the first JDBC driver programs to connect PostgreSQL and manipulate the data stored in the PostgreSQL database.

Quick View PostgreSQL JDBC Driver

PostgreSQL JDBC driver allows Java programs to connect to a PostgreSQL database using standard, database independent Java code. its current version is 9.1-901. It supports both JDBC3 and JDBC4 standard implementation(If you are using 1.6 or 1.7 JVM, Advice you use JDBC4 Postgresql Driver, Version 9.1-901). Read the rest of this entry »

The purpose of this tutorial is to write and test the first JDBC driver programs to connect mysql and to manipulate the data stored in the MySQL database.

Quick View JDBC MySQL Connector/J.

MySQL provides connectivity for client applications, which allows that the Java program has ability to connect and operate MySQL through a JDBC driver, the latest official version of MySQL Connector/J is Type 4 pure Java JDBC driver. Read the rest of this entry »

How to Sort a List in Java

4Feb2012 In: Core Java

We usually have this kind of problem to sort a list into ascending order, according to the natural ordering of its elements. This article will look at how to sort list/arrarylist in java. Assuming we have created a list with few elements, added the instantiation of string as the element of the lists. please note all elements in the list must implement the Comparable interface, and all elements in the list must be mutually comparable. Read the rest of this entry »

Oracle Error :: DRG-10758

Index owner does not have the privilege to use file or URL datastore Cause

Error details:

When you tried to create an index, if the index owner does not have the privilege to use file or URL datastore, it will occur the following error stack:

IMP-00017: following statement failed with ORACLE error 29855:
"CREATE INDEX "FILES_CONTENT_IDX" ON "FILES" ("CONTENT_URL" )  INDEXTYPE IS "
""CTXSYS"."CONTEXT" PARAMETERS ('DATASTORE CTXSYS.FILES_CONTENT_PREF FILTER "
"CTXSYS.INSO_FILTER LEXER CTXSYS.ATTACHMENT_LEXER STORAGE CTXSYS.FILES_CONTE"
"NT_STORAGE ')"
IMP-00003: ORACLE error 29855 encountered
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10758: index owner does not have the privilege to use file or URL datastore

Read the rest of this entry »

Generating random number in Java

2Feb2012