Extracting .java from .jar and .class

Steps to be followed,  1. Type Hello world program. 2. Convert .java to .class file. 3. Convert .class to .jar file. 4. Convert .jar to .class 5. Convert .class to .java Step 1: Consider the below program, (hello world program) package mygod; public class Hello { public static void main(String[] args) { System.out.println(“God is there…!!”); } }  Step 2: Converting […]

585 total views, 2 views today

» Read more

Tips to Clear OCJP 6 (SCJP) certification

scjp

Tips to Clear OCJP 6 (SCJP) certification: Amazon.in Widgets Introduction about OCJP 6: OCJP (oracle certified Java Programmer) well known as SCJP (sun certified java programmer). SCJP 6 – 310-065 has now changed to OCJP 6 -1Z0-851. Only exam code has been changed, no changes in the syllabus rather than that drag and drop questions cancelled in the OCJP 6. […]

3,769 total views, 2 views today

» Read more

HashMap with Entryset Example

package cool; import java.util.HashMap; import java.util.Map; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class hashmap { /** * @param args */ public static void main(String[] args) { HashMap<String, String> myMap = new HashMap<String, String>(); myMap.put("ind", "india"); myMap.put("tn", "tamilnadu"); myMap.put("blr","bangalore"); Set<Entry<String,String>> set = myMap.entrySet(); for (Map.Entry<String, String> me : set) { if(me.getKey().equalsIgnoreCase("tn")){ System.out.println(me.getValue()); } } } } 444 total views, 1 views today

444 total views, 1 views today

» Read more

Tomcat-Java Path Setting

Step 1: Right click on computer – > properties – > Advanced system settings – > Advanced – > Environment Variables – > User variables. Step 2: Create New and type as follows, variable: JAVA_HOME value : C:\Program Files\Java\jdk1.6.0 variable: JRE_HOME value : C:\Program Files\Java\jre1.6.0 variable: PATH value : C:\Program Files\Java\jre1.6.0;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Java\jre1.6.0\bin;C:\apache-tomcat-6.0.14\bin; variable: CLASSPATH value : c:\Program Files\Java\jdk1.6.0\jre\lib Step 3: If tomcat […]

926 total views, 2 views today

» Read more

Ant (configuration and My First Ant)

Step 1: Set the environment variables as follows, Start -> My Computer -> Rightclick on it and click properties -> Advanced System Settings-> Advanced -> Environmental variables -> create new on the user variables and type, 1. Variable Name: JAVA_HOME Variable value: jdk path.(say C:\Program Files\Java\jdk1.7.0) 2. Variable Name: ANT_HOME Variable Value: Ant path (say C:\Apache Ant 1.7.1) 3. Variable Name: Path Variable Value: Ant path;Jdk path (say C:\Apache Ant 1.7.1\bin;C:\Program Files\Java\jdk1.7.0\bin;) Note: […]

916 total views, no views today

» Read more

Replace function in java

In the below program we are replacing “\\” (2 backslash) with (4 backslashes). Actually \(backslash) is used for escaping characters. Here we have to escape backslash only. so only 8 backslashes are used to get 4 backslashes. Program: package god; public class ReplaceFunction { public static void main(String[] args) { String naveen = "javadomain\\naveendra\\eversoftindia"; System.out.println(naveen); String cool="\\\\\\\\\\\\\\\\"; System.out.println("after replacements using […]

507 total views, no views today

» Read more

Hudson project build

Step 1: Download the hudson war file from the below link, http://hudson-ci.org/download/war/ Step 2: Open the command prompt and go to the location of hudson war file that you have downloaded and type “java -jar hudson.war”. hudson.war is the exact name of the file in your system or location. It may be hudson-2.2.war or hudson-2.0.war etc…….. After you run you […]

567 total views, 1 views today

» Read more

Perl path setting in windows 7

Step 1: Before path setting you can see the command prompt window like this, Step 2: setting path through system properties Right click on computer -> Properties -> Advanced system settings -> Advanced tab -> Environment variables -> System variables -> edit the path and add this, “C:\xampp\perl\bin” (location of perl bin) Step 3: Setting path through command prompt, Difference […]

523 total views, no views today

» Read more
1 18 19 20 21