DirectoryTechnologyBlog Details for "Java Interview Questions"

Java Interview Questions

Java Interview Questions
Java interview, J2EE interview , Core Java interview , Adv Java interview, J2ME interview , Struts interview, SERVLETS interview, JSP interview, CORBA interview, RMI interview, EJB interview , HIBERNATE
Articles: 1, 2

Articles

Where to put persistence.xml in web app?
2007-06-15 18:01:00
In all cases, persistence.xml always resides in {root-of-persistence-unit}/META-INF/ directory. For example, foo.war: WEB-INF/classes/META-INF/persistence.xml //good WEB-INF/classes/com/foo123/jpa/Project.cl ass WEB-INF/web.xml index.jsp You may also package entity classes and persistence.xml inside a library jar, which is packaged inside the war:WEB-INF/lib foo.war: WEB-INF/lib/my-entities.jar
More About: Home , Persistence , Where
Use ant NoBannerLogger and -emacs options for better output (2)
2007-06-13 18:46:00
In my previous post, I wrote about using ant options -emacs -logger org.apache.tools.ant.NoBannerLogger to strip out empty targets and task names. Here are more tips to save some typing: 1. define an shell-level alias to include these options. In bash, add to $HOME/.bashrc: alias ant=’ant -emacs -logger org.apache.tools.ant.NoBannerLogger’ ; In tcsh, add to $HOME/.tcshrc: alias ant ‘ant -emacs
More About: Home , Options , Opti
Use ant NoBannerLogger and -emacs options for better output (2)
2007-06-13 18:46:00
In my previous post, I wrote about using ant options -emacs -logger org.apache.tools.ant.NoBannerLogger to strip out empty targets and task names. Here are more tips to save some typing: 1. define an shell-level alias to include these options. In bash, add to $HOME/.bashrc: alias ant=’ant -emacs -logger org.apache.tools.ant.NoBannerLogger’ ; In tcsh, add to $HOME/.tcshrc: alias ant ‘ant -emacs
More About: Home , Options
Centralize exception handling in java methods
2007-06-12 20:54:00
Oftentimes we need to handle a series of java exceptions in one method in a similar manner. So it’s desirable to centralize the exception logic to avoid duplication. For example, the following method looks up UserTransaction and then performs the transaction. You will need to handle at least 6 exceptions. I ...
More About: Java , Home , Exception , Methods , Method
Centralize exception handling in java methods
2007-06-12 20:54:00
Oftentimes we need to handle a series of java exceptions in one method in a similar manner. So it’s desirable to centralize the exception logic to avoid duplication. For example, the following method looks up UserTransaction and then performs the transaction. You will need to handle at least 6 exceptions. I ...
More About: Java , Home , Exception , Methods , Method
How to set prompt in tcsh and bash
2007-06-12 00:27:00
Wherever I go, I like to set prompt to display the current directory. I mean the complete path of current directory, not just the last element, and they all must be in one single line. This is good:/usr/bin/X11 > Avoid this: bash-3.2$ cd /usr/bin/X11 bash-3.2$ For tcsh, I have this in my $HOME/.tcshrc: set prompt=”%/ > ” For bash, include this ...
More About: Home , Bash , Prompt
Use ant NoBannerLogger and -emacs options for better output
2007-06-06 18:57:00
It can be hard to get useful data from a huge ant output file. So I like to use two options when running ant: 1. -logger org.apache.tools.ant.NoBannerLogger to strip out any empty targets. 2. -emacs to strip out [taskname] Here is a comparison of running a simple build.xml target:
More About: Home , Options , Opti
Start java web start app from command line
2007-06-01 16:59:00
When I need to start a Java webstart app, I usually do it from command line, instead of opening a browser. There are 2 slightly different ways to do that: 1. Run javaws with the url to jnlp file: %JAVA_HOME%injavaws http://www.foo123.com/bar/buz.jnlp2. Save the jnlp file locally and run javaws with the local copy. If you ...
More About: Home , Start , Line , Command
More articles from this author:
1, 2
111753 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2012 - Supported by Web Catalog - SEO by FeWorks
eXTReMe Tracker