Replace function in java

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 replace function "+naveen.replace("\\", cool)); } }     Output: javadomain\naveendra\eversoftindia after replacements using replace function javadomain\\\\\\\\naveendra\\\\\\\\eversoftindia 581 total views, no views…

Read More Read More

581 total views, no views today

Tomcat Started/stopped with errors, return code:1 Make sure you have java jdk or jre installed and the required ports are free

Tomcat Started/stopped with errors, return code:1 Make sure you have java jdk or jre installed and the required ports are free

Problem: Solution: [sociallocker] Configure the server in the eclipse. go to windows -> show view -> servers then add the new wizard server. Now go to xampp control panel and start the apache and try. If it does not then change the port number of tomcat server in the eclipse by double clicking it and try again [/sociallocker]   If still problem exists, then better download the new xampp and try.   Thanks for reading this post……!!! 3,927 total views, 2 views…

Read More Read More

3,927 total views, 2 views today

Unable to locate tools.jar

Unable to locate tools.jar

Reason: In the path setting, instead of jdk, jre may be set. Solution: Please ensure the ant path like below, set ANT_HOME=D:\apache-ant-1.8.4 set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0 set PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin   491 total views, 1 views today

491 total views, 1 views today

Hudson project build

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 have to get the output like below, If you see the error output like below then change the address of…

Read More Read More

688 total views, 1 views today

Txtweb php hello world

Txtweb php hello world

Step 1: Create a file called hello.php under public_html\agn folder <html> <head> <meta name=”txtweb-appkey” content=”1ac539c0-3df6-4e45-9e83-337889a858e1″> </head> <body> <?php echo “hello naveen welcome man..!!”; ?> </body> </html> location you have to store in web host is: public_html/agn/hello.php Step 2: Check this by typing your domain name/agn/hello.php Example: if your domain name is ngdeveloper.com then you have to check your ouput by typing www.ngdeveloper.com/agn/hello.php in the browser. Ouput you will get is: hello naveen welcome man..!! Step 3: Login with your credentials…

Read More Read More

868 total views, no views today

Selling a product on ebay

Selling a product on ebay

Step 1: Register or sign up for ebay account if you dont have or simply login with your account. Step 2: Create a paisapay account to receive the amount from ebay. Its mandatory. Step 3: Click the “sell” tab which is in right top. Step 4: Start selling the product by simply clicking start selling button in the next screen. Step 5: Fill all the details regarding sellers, product review, price details, shipping details etc..   Revert me if you…

Read More Read More

670 total views, no views today

Perl path setting in windows 7

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 between step2 and step3 are, 1. Setting path through system properties is one time work. But setting path through command…

Read More Read More

628 total views, no views today

Perl Hello world CGI in xampp server

Perl Hello world CGI in xampp server

Download Xampp from http://www.apachefriends.org/en/xampp-windows.html Step 1: Create a file named javadomain.cgi and paste the below code, #!”C:\xampp\perl\bin\perl.exe” print “Content-type: text/html\n\n”; print “<H1>Hello World</H1>\n”; #!”C:\xampp\perl\bin\perl.exe” is the location of perl.exe. Step 2: Save this file in C:\xampp\htdocs Step 3: Open the xampp control panel. which is in c:\xampp. Step 4: Start the servers,   Step 5: Check whether the server is on and working fine by typing localhost in the browsers, if you didn’t get the above window, then once again open…

Read More Read More

1,974 total views, 1 views today

Perl Hello World

Perl Hello World

Step 1: Create a text file named HelloJAVADOMAINdotIN.pl and copy this below single line,   print “Hello JAVADOMAINdotIN\n”;   Step 2: Save this file in your perl directory bin folder. Ex: C:\xampp\perl\bin Step 3: Open the command prompt and run the file like this, “perl HelloJAVADOMAINdotIN.pl”  then you can see the output like this,     Thanks for reading this post………!!!   539 total views, 1 views today

539 total views, 1 views today