Monthly Archives: June 2010

Some common java problem in eclipse,ant or hibernate

There are few things which we have faced in last few days. I am finding myself short of time in writing the description as such. So I am just mentioning the subject of the error and some useful link which, if didn’t give you solution, can help you in reaching to the solution.

1)      Ant build problem in eclipse

[javac] BUILD FAILED: file:D:/JavaProject/ACS/testAnt.xml:18: Unable to find a javac compiler;

Link: http://forums.sun.com/thread.jspa?threadID=440539&messageID=2519548

2)      Error: no ‘server’ JVM at ‘C:\Program Files\Java\jre1.5.0_06\bin\server\jvm.dll’.

Link:  http://forums.sun.com/thread.jspa?threadID=735764

3)      Debugging Tools and Techniques – Source not found error in Eclipse

Source not found

Link: http://forums.sun.com/thread.jspa?threadID=5114255

4)      Hibernate and Eclipse Integration

Link: http://community.jboss.org/wiki/HibernateandEclipseIntegration

Leave a comment

Filed under Java

A scenario when ‘Brake’ and ‘Continue’ work equally

If you put a switch-case block inside a while loop, both brake and continue will work and the output will be same. E.g.

Int i=0;

while (i<6){

switch (i){

case 1:

system.out.println(“Inside case 1”);

i++;

continue;

case 2:

system.out.println(“Inside case 2”);

i++;

brake;

case 3:

system.out.println(“Inside case 3”);

i++;

continue;

case 4:

system.out.println(“Inside case 4”);

i++;

brake;

default:

system.out.println(“Inside Default”);

}

}

Any comments?

Leave a comment

Filed under Java