Friday, 30 December 2016

cp command in unix

cp sourcefile  destinationfile

Disk space check in UNIX


df - h Human Readable formats by using ‘-h’
df -k Display info in File System in Bytes

How to Remove the Files Forcefully in Unix

How to Remove the Files Forcefully in Unix

/ Deleting all file from folder.

rm -rf directoryname

for example if we have "bin/logfile" directory and it have 10 log files and we want to delete then we can use this command to delete this entire folder.

rm -rf bin

Monday, 30 November 2015

java junit4

@Ignore("ignore this test")
@AfterClass
@BeforeClass
@After
@Before
@Test (expected =ArithmeticException.class)
@Test

Sunday, 29 November 2015

How get BigdecimalEnum value in java

package com.org.vipul;

import java.math.BigDecimal;

public class BigdecimalEnum {

public static void main(String[] args) {
System.out.println(Vat.FIVE.getValue());

}

public enum Vat {
ONE(new BigDecimal("1")), TWO(new BigDecimal("2")), THREE(
new BigDecimal("3")), FIVE(new BigDecimal("5"));

private final BigDecimal value;

Vat(BigDecimal val) {
value = val;
}

public BigDecimal getValue() {
return value;
}
}
}

Sunday, 16 August 2015

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

To fix this use this jar

http://commons.apache.org/logging/download_logging.cgi

Add to class path