SFTP command in unix

SFTP command in unix sftp –password=”PASSWORD” “USERNAME”@”SERVER_IPADDRESS_OR_NAME” Note: Username, Password and Server_Ipaddress_or_Name should not be given within double quotes. Eg: sftp –password=pass1234 jdUser@javadomain.in 145 total views, 1 views today

145 total views, 1 views today

» Read more

SFTP in Java Sample Working Program

SFTP File Upload in Java: FTP can be done with Apache Commons and commons-logging jar. If you want to do SFTP you need the below jars, Required Jars: 1. commons-logging-1.1.1.jar 2. commons-vfs2-2.0 (or) commons-vfs-1.0 (try vfs2.0 jar first, if any unexpected exception then try with vfs1.0.jar) 3. jsch-0.1.50 (First check without this jar, if any unexpected exceptions then add this

196 total views, 1 views today

» Read more

Unable to initialize threads: cannot find class java/lang/Thread

Unable to initialize threads: cannot find class java/lang/Thread: Cause: [sociallocker] 1. If you have set wrong CLASSPATH,PATH or JAVA_HOME then you will get this error. 2. Ensure only one version of jdk installed, may be sometime this issue occur if more than one jdk installed. 3. Ensure the wrong CLASSPATH, PATH and JAVA_HOME or unset. [/sociallocker] How to set PATH

258 total views, 1 views today

» Read more

String Equals in PHP with Example

PHP Program 1: $str1 = "Java"; $str2 = "JAVA"; if (strcasecmp($str1, $str2) == 0) { echo "Both are Equal"; }else{ echo "Both are Not Equal"; } Output: Both are Equal See the below program, we are giving the flipkart with space and without space so we are getting “both are not equal”. But if you equal the same to 1

316 total views, 18 views today

» Read more

Difference Between to_char and to_date with example

to_char: to_char converts a date to string. Query: Select to_char(sysdate) from dual; Output: 25-NOV-13 Query: Select to_char(sysdate,’DD-MM-YYYY’) from dual; Output: 25-11-2013 to_date: to_date converts a string to date. Query: Select to_date(sysdate) from dual; Output: 25-NOV-13 Query: Select to_date(sysdate,’DD-MM-YYYY’) from dual; Output: 25-NOV-13 182 total views, no views today

182 total views, no views today

» Read more

Palindrome in Java Example

Palindrome: Logic: Given Number/String should be equal with the Reversed of the given Number/String. Eg: 101 – Palindrome Number (Given and Reverse of the given is equal (101 and 101 only)). 100 – Not a Palindrome Number (Given is 100 and Reverse of the given is 001, both are not equal, so its not a palindrome Number). Level – Palindrome

143 total views, no views today

» Read more

Printing All Possible Combinations of a 3 Digit Number Java Program

Printing All Possible Combinations of a 3 Digit Number Java Program: Logic: We have to write 3 for loops and need to ensure all three for loops variable does not have same value. Then we can take and print the input array with the three for loop variables to get all different possibles. Program: package in.javadomain; public class PossibleCombinations {

3,564 total views, 1 views today

» Read more

Java Program to Change Case of a Character/String

Displaying Opposite Character:  Logic: First we should have to find the given case, for this you can use Character.isLowerCase(given character) or Character.isUpperCase(given character). Once you know the given character then you can change to opposite character using Character.toLowerCase(given input) or Character.toUpperCase(given input). Program: [This program converts to opposite case – Character] package in.javadomain; public class ChangeToOppositeCharacter { public static void

503 total views, no views today

» Read more

Taking only String values from ArrayList

Scenario: You are given with a arraylist with all datatype values. Eg: Integer and String values. But you want to move only string values to another arraylist. Solution you can think suddenly: ArrayList can be declared to hold only string and using addAll method we can move. Eg: ArrayList arStr = new ArrayList(); arStr.addAll(“given_arrayList”); But the above one does not

124 total views, no views today

» Read more
1 2 3