Could not find or load main class TestHBase
<p>I'm trying to compile and run my simple test HBase code in java using terminal Ubuntu 14.04, I've install Hadoop and HBase correctlly and are running. 
The code is :</p>

<pre><code>/*
 * Compile and run with:
 * javac -cp `hbase classpath` TestHBase.java 
 * java -cp `hbase classpath` TestHBase
 */
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.*;
import org.apache.hadoop.hbase.util.*;

public class TestHBase {
    public static void main(String[] args) throws Exception {
        Configuration conf = HBaseConfiguration.create();
        HBaseAdmin admin = new HBaseAdmin(conf);
        try {
            HTable table = new HTable(conf, "test-table");
            Put put = new Put(Bytes.toBytes("test-key"));
            put.add(Bytes.toBytes("cf"), Bytes.toBytes("q"), Bytes.toBytes("value"));
            table.put(put);
        } finally {
            admin.close();
        }
    }
}
</code></pre>

<p>I've got the long string 'hbase classpath' and the command </p>

<pre><code>javac -cp 'hbase classpath' TestHBase.java
</code></pre>

<p>run correctly giving TestHBase.class file, but when I run the command </p>

<pre><code>java -cp 'hbase classpath' TestHBase
</code></pre>

<p>it gives this error :</p>

<pre><code>Error: Could not find or load main class
</code></pre>

<p>How could I solve this ?</p>

<p>Here is my terminal screenshot
<a href="http://i.stack.imgur.com/M46mJ.png" rel="nofollow">1</a>
<a href="http://i.stack.imgur.com/lImbY.png" rel="nofollow">2</a></p>