james
Name: james
Score: 6,934.77
Last Seen: 542 days, 19 hours, 56 minutes ago
Member Since: 13 August, 2011
JavaPins
atom rss
3
Pins

A better java shell script wrapper

published 614 days, 23 hours, 48 minutes ago posted by jamesjames 616 days, 20 hours, 27 minutes ago
Monday, August 13, 2012 11:04:13 AM GMT Saturday, August 11, 2012 2:25:24 PM GMT
In many Java projects, you often see wrapper shell script to invoke the java command with its custom application parameters. For example, $ANTHOME/bin/ant, $GROOVYHOME/bin/groovy, or even in our TimeMachine Scheduler you will see $TIMEMACHINE_HOME/bin/scheduler.sh. Writing these wrapper script is boring and error prone. Most of the problems come from setting the correct classpath for the application. If you're working on an in-house project for a company, then you can get away with hardcoding paths an... (more)
category: JAVA | clicked: 6 | comment | | source: saltnlight5.blogspot.com
tags: Java, Shell Script, wrapper
1
Pins

Analyzing Java Heap problems Part 1: Basic actions and tools

published 616 days, 15 hours, 38 minutes ago posted by jamesjames 616 days, 20 hours, 33 minutes ago
Saturday, August 11, 2012 7:14:13 PM GMT Saturday, August 11, 2012 2:18:35 PM GMT
You think that your shiny Java app has some memory issues but how do you find out if that is true and what is taking up all that memory? Knowing the potential problems is fine. Nevertheless you still have to find out your actual problems. There are several instruments available to help you analyse your Java application regarding its memory usage. I will tell you about increasing your maximum heap (most of you surely know  about that), looking at the memory of a running app, making heap dumps (on demand o... (more)
category: JAVA | clicked: 4 | comment | | source: schneide.wordpress.com
tags: Heap, Java
2
Pins

Testing antipatterns

published 608 days, 5 hours, 20 minutes ago posted by jamesjames 616 days, 20 hours, 34 minutes ago
Monday, August 20, 2012 5:31:33 AM GMT Saturday, August 11, 2012 2:17:35 PM GMT
When you look at the test code you cannot see which type of exception is thrown. First it is better for clarity to document which type is thrown and second any bugs in the called code who throw unintended exceptions are swallowed here. Better: try { callFailingMethod() fail() } catch (ParseException e) { } Problems: If it fails you don’t see why: so always use a message for fail. Better: ... (more)
category: JAVA | clicked: 12 | comment | | source: schneide.wordpress.com
tags: Antipattern, Testing
1
Pins

Cross-Domain AJAX versus JSONP

published 615 days, 23 hours, 32 minutes ago posted by jamesjames 616 days, 20 hours, 41 minutes ago
Sunday, August 12, 2012 11:19:35 AM GMT Saturday, August 11, 2012 2:10:54 PM GMT
Introduction to Cross-Domain AJAX Whenever I need to load JavaScript application components from the Web server, I usually insert a JavaScript tag in the Web page document and used some "dirty" tricks to execute it. Cross-Domain AJAX uses this approach to implement a cleaner solution wrapped as a jQuery plug-in. (more)
category: Ajax | clicked: 4 | comment | | source: www.jsclasses.org
tags: Ajax, JSON
1
Pins

Top 10 Struts Interview Question And Answer - J2EE

posted by jamesjames 642 days, 7 hours, 52 minutes ago
Tuesday, July 17, 2012 2:59:42 AM GMT
This time its Struts interview questions, After writing Spring interview questions few weeks back I was thinking what to pick for my interview series and than I thought about any web framework, and on that struts is my favorite. Struts are open source framework used for web application. These Struts interview questions are based on my experience as well as collected by friends and colleague and they are not only good for interview practice but also shows a new direction of learning for any one who is not... (more)
category: JAVA | clicked: 0 | comment | | source: javarevisited.blogspot.com
tags: interview, Struts
1
Pins

How to loop ArrayList in Java - Code Example

posted by jamesjames 642 days, 7 hours, 55 minutes ago
Tuesday, July 17, 2012 2:56:38 AM GMT
Looping ArrayList in Java or Iteration over ArrayList is very similar to looping Map in Java. In order to loop ArrayList in Java we can use either foreach loop, simple for loop or Java Iterator from ArrayList. We have already touched iterating ArrayList in 10 Example of ArrayList in Java and we will see here in detail. We are going to see examples of all three approaches in this ArrayList tutorial and find out which one is clean and best method of looping arraylist in Java. Before start writing an exampl... (more)
category: JAVA | clicked: 0 | comment | | source: javarevisited.blogspot.com
tags: ArrayList, Java
1
Pins

10 points on interface in Java with Example - Tutorial

posted by jamesjames 642 days, 7 hours, 56 minutes ago
Tuesday, July 17, 2012 2:55:28 AM GMT
Interface in java is core part of its programming language despite that many programmers thinks Java Interface as an advanced concept and refrain using interfaces from early in programming career. At very basic level  interface  in java is a keyword  but same time it is an object oriented term to define contracts andabstraction , This contract is followed by any implementation of Interface in Java. Since multiple inheritance is not allowed in Java,  interfaceis only way to implement multiple inheritance ... (more)
category: JAVA | clicked: 0 | comment | | source: javarevisited.blogspot.com
tags: Interface, Java
1
Pins

What is Daemon thread in Java and Difference to Non daemon thread - Tutorial Example

posted by jamesjames 642 days, 7 hours, 58 minutes ago
Tuesday, July 17, 2012 2:53:54 AM GMT
Daemon thread in Java are those thread which runs in background and mostly created by JVM for performing background task like Garbage collection and other house keeping tasks. Difference between Daemon and Non Daemon(User Threads)  is also an interesting multi-threading interview question, which asked mostly on fresher level java interviews. In one line main difference between daemon thread and user thread is that as soon as all user thread finish execuction java program or JVM terminates itself, JVM doe... (more)
category: JAVA | clicked: 0 | comment | | source: javarevisited.blogspot.com
tags: Deamon Thread, Java
1
Pins

Difference between start and run method in Thread – Java Tutorial

posted by jamesjames 642 days, 7 hours, 59 minutes ago
Tuesday, July 17, 2012 2:52:38 AM GMT
Why do one call start method of thread if start() calls run() in turn" or "What is difference by calling start() over run()method in java thread" are two widely popular beginner level multi-threading interview question. When a Java programmer start learning Thread, first thing he learns is to implement thread either overriding run() method of Thread class or implementing Runnable interface and than calling start() method on thread, but with some experience he finds that start() method calls run() method ... (more)
category: JAVA | clicked: 0 | comment | | source: javarevisited.blogspot.com
tags: Java, Run, Start
1
Pins

String vs StringBuffer vs StringBuilder in Java

posted by jamesjames 642 days, 8 hours ago
Tuesday, July 17, 2012 2:51:48 AM GMT
String is one of the most important classes in Java and anyone who starts with java programming uses string to print something on console by using. No matter which kind of application you are working you will find heavy usage of java String class but if you do profiling of your application you will find that String is the one class which creates lots of garbage because of many temporary Strings created in program. In this article we will see What is String, some important properties of String in Java, Wh... (more)
category: JAVA | clicked: 0 | comment | | source: javarevisited.blogspot.com
tags: Java, String, StringBuffer
1
Pins

Java Generics Tutorial: How Generics in Java works with Example

posted by jamesjames 642 days, 8 hours, 1 minute ago
Tuesday, July 17, 2012 2:50:53 AM GMT
I have read many articles on generics in java some of them are quite good and detailed but I still felt that those are either too much technical or exhaustively detailed, so I thought to write a simple yet informative article on generics in Java to give a head start to beginners without bothering there head too much. In this java generics tutorial I will cover How Generics works in Java, Mysterious wild-cards in Generics and some important points about generics in Java. I won't go in too much detail inst... (more)
category: JAVA | clicked: 1 | comment | | source: javarevisited.blogspot.sg
tags: Generic, Java
1
Pins

Java debugging tutorial - 10 tips on debugging in java with example

posted by jamesjames 642 days, 8 hours, 3 minutes ago
Tuesday, July 17, 2012 2:48:31 AM GMT
How to debug java program in Eclipse Debugging is a must have skill for any java developer. Having ability to debug java program enables to find you any subtle bug which is not visible during code review or comes when a particular condition offer, This becomes even more important if you are working in high frequency trading or electronic trading system project where time to fix a bug is very less and bug usually comes on production environment and doesn't appear in your Windows XP machine. in my experien... (more)
category: JAVA | clicked: 0 | comment | | source: javarevisited.blogspot.com
tags: Debugging, Java
1
Pins

How to setup java remote debugging in eclipse

posted by jamesjames 642 days, 8 hours, 5 minutes ago
Tuesday, July 17, 2012 2:47:11 AM GMT
How to remote debug java application in Eclipse IDERemote debugging is not a new concept and many of you are aware of this just for who don’t know what is remote debugging? It’s a way of debugging any process could be Java or C++ running on some other location from your development machine.  Since debugging is essential part of development and ability to debug your application not only saves time but also increase productivity. Local debugging is the best way in my opinion and should always be preferred ... (more)
category: JAVA | clicked: 1 | comment | | source: javarevisited.blogspot.com
tags: Eclipse, Java, Remote Debugging
2
Pins

What is Static and Dynamic binding in Java with Example

published 637 days, 21 hours, 14 minutes ago posted by jamesjames 642 days, 8 hours, 6 minutes ago
Saturday, July 21, 2012 1:38:24 PM GMT Tuesday, July 17, 2012 2:46:16 AM GMT
Static and dynamic binding  in Java are two important concept which Java programmer should be aware of. this is directly related to execution of code. If you have more than one method of same name (method overriding) or two variable of same name in same class hierarchy it gets tricky to find out which one is used during runtime as a result of there reference in code. This problem is resolved using static and dynamic binding in Java. For those who are not familiar with binding operation, its process used ... (more)
category: JAVA | clicked: 16 | comment | | source: javarevisited.blogspot.com
tags: Binding, Dynamic, static
2
Pins

Difference between Thread vs Runnable interface in Java

published 639 days, 1 hour, 22 minutes ago posted by jamesjames 642 days, 8 hours, 6 minutes ago
Friday, July 20, 2012 9:29:38 AM GMT Tuesday, July 17, 2012 2:45:35 AM GMT
Thread vs Runnable in Java is always been a confusing decision for beginners in java. Thread in Java seems easy in comparison of Runnable because you just deal with one class java.lang.Thread while in case of using Runnable to implement Thread you need to deal with both Thread and Runnable two classes. though decision of using Runnable or Thread should be taken considering differences between Runnable and Thread and pros and cons of both approaches. This is also a very popular thread interview questions ... (more)
category: JAVA | clicked: 9 | comment | | source: javarevisited.blogspot.com
tags: Interface, Runnable, thread
2
Pins

Best Practices while dealing with Password in Java

published 639 days, 1 hour, 22 minutes ago posted by jamesjames 642 days, 8 hours, 9 minutes ago
Friday, July 20, 2012 9:29:38 AM GMT Tuesday, July 17, 2012 2:43:06 AM GMT
While working in core Java application or enterprise web application there is always a need of working with passwords in order to authenticate user. Passwords are very sensitive information like Social Security Number(SSN) and if you are working with real human data like in online banking portal or online health portal its important to follow best practices to deal with passwords or Social security numbers. here I will list down some of the points I learned and take care while doing authentication and au... (more)
category: JAVA | clicked: 10 | comment | | source: javarevisited.blogspot.com
tags: Java, password
1
Pins

HashSet in Java – 10 Examples Programs Tutorial

published 640 days, 22 hours, 46 minutes ago posted by jamesjames 642 days, 8 hours, 10 minutes ago
Wednesday, July 18, 2012 12:05:46 PM GMT Tuesday, July 17, 2012 2:41:47 AM GMT
HashSet in Java is a collection which implements Set interface and backed by an HashMap. Since HashSet uses HashMap internally it provides constant time performance for operations like add, remove, contains and size give HashMap has distributed elements properly among the buckets. Java HashSet does not guarantee any insertion orders of the set but it allows null elements. HashSet can be used in place of ArrayList to store the object if you require no duplicate and don't care about insertion order. Iterat... (more)
category: JAVA | clicked: 6 | comment | | source: javarevisited.blogspot.com
tags: HashSet, Java
1
Pins

JDBC: creating tables and inserting values to tables dynamically sample code

posted by jamesjames 644 days, 19 hours, 12 minutes ago
Saturday, July 14, 2012 3:40:16 PM GMT
I believe my previously written "JDBC" post has given you a basic idea to start JDBC in a windows environment. So here I go again under the same topic but this time the post will be limited to a code. In previous post I have given codes to create a database dynamically and connecting to a database. This code shows how to create tables inside that database and inserting values dynamically into that newly created table. import java.io.BufferedReader; import java.io.InputStreamReader; import java.sql.*; im... (more)
category: SQL | clicked: 1 | comment | | source: blog.eviac.com
tags: JDBC, Tables
1
Pins

JDBC with mysql

posted by jamesjames 644 days, 19 hours, 13 minutes ago
Saturday, July 14, 2012 3:39:04 PM GMT
What are the pre-requirements for starting JDBC? Download and install my sql community server http://www.mysql.com/downloads/mysql/Download Connector/J http://www.mysql.com/downloads/connector/j/ Mysql server can be started on windows using following command NET START mysql Mysql server can be stopped on windows using following command NET STOP mysql There is another way to start stop mysql on windows,right-click MyComputer manage-->Services and Applications-->Services find MySQL and tog... (more)
category: SQL | clicked: 0 | comment | | source: blog.eviac.com
tags: JDBC, MySql
1
Pins

java RMI

posted by jamesjames 644 days, 19 hours, 14 minutes ago
Saturday, July 14, 2012 3:37:59 PM GMT
Step one: Make a Remote interface Remote interface should extend java.rmi.Remote interface Declare that all methods throw a RemoteException as every remote call is considered risky Arguments and return values of remote methods must be either primitive or serializable(Strings, arrays, collections etc), if passing self defined types be sure to implement serializable interface to the class. (more)
category: JAVA | clicked: 0 | comment | | source: blog.eviac.com
tags: Java, rmi
Previous 1 2 3 4 5 6 7 8 9 10 ... 13 14 Next