While running the application pass following as JVM argument -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8765 This will start listening on port 8765, now you may attach remote debugger from any machine giving the IP/hostname and port.
Class loaders are hierarchical. Classes are introduced into the JVM as they are referenced by name in a class that is already running in the JVM. So how is the very first class loaded? The very first class is specially loaded with the help of static main() method declared in your class. All the subsequently […]
1. Export the certificate for the exchange server from Internet explorer Certificate export wizard e.g. after opening https://webmail.hostname.com, (View certificate >Details > Copy to File). Say the exported file name is certificate.cer 2. Create keystore from the certificate using java keytool (which will create keystore file in current directory). It will ask for a password, […]
How to get Number of processors on a machine in java
Sample java code to read mails from your gmail account
You cannot have two methods in the same class with signatures that only differ by return type. Until the J2SE 5.0 release, it was also true that a class could not override the return type of the methods it inherits from a superclass. In this tip you will learn about a new feature in J2SE […]
Q. How to create Immutable class? Immutable objects are simply objects whose state (the object’s data) does not change after construction. Always construct an object completely, instead of using a no-argument constructor combined with subsequent calls to setXXX methods. Do not provide any methods which can change the state of the object in any way […]