Skip to main content

Posts

Showing posts from October, 2013

Hard Disk Recovery

My WD external hard disk wasn't getting detected by windows. Upon looking up at Disk Management in Computer Management, I found out that the disk was made unallocated. This was troublesome since it was working fine a day ago. After a few hits on Google, I came across a utility named TestDisk . It's an open source application which diagnoses hard-disks, recover data and correct disk errors. The official website describes the software as this -- TestDisk is powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software , certain types of viruses or human error (such as accidentally deleting a Partition Table). Partition table recovery using TestDisk is really easy. TestDisk can Fix partition table, recover deleted partition Recover FAT32 boot sector from its backup Rebuild FAT12/FAT16/FAT32 boot sector Fix FAT tables Rebuild ...

Jar and Classpath

Ever tried doing this? java -cp "." -jar Sample.jar Doesn't work, does it! I found out it the hard way. I actually had to debug all the way down to logging all the classpath in the program. Java(1) 'does' spell this out. -jar Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname . Here, classname identifies the class having the public static void main(String[] args) method that serves as your application’s starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial for information about working with Jar files and Jar-file manifests. When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. Note that JAR files that can be run with the “java -jar” option can ...