<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question java compile problem for HadoopDFSFileReadWrite.java in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171376#M133673</link>
    <description>&lt;P&gt;I set up HDP 2.4 Sandbox on Virtualbox on my windows machine.&lt;/P&gt;&lt;P&gt;The pi program works. So, I guess the installation was OK.&lt;/P&gt;&lt;P&gt;Then, I tried to compile a java program from wiki (http://wiki.apache.org/hadoop/HadoopDFSReadWrite.java), but it did not work.&lt;/P&gt;&lt;P&gt;The following shows the compile command and error messages. Basically it does not recognize the org.apache.hadoop.conf package. &lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;P&gt;javac -cp 'hadoop classpath' HadoopDFSFileReadWrite.java                                                               
HadoopDFSFileReadWrite.java:22: error: package org.apache.hadoop.conf does not exist                                   
import org.apache.hadoop.conf.Configuration;                                                                           
                             ^                                                                                         
HadoopDFSFileReadWrite.java:23: error: package org.apache.hadoop.fs does not exist                                     
import org.apache.hadoop.fs.FileSystem;                                                                                
                           ^                   
&lt;/P&gt;...

               
                      
&lt;P&gt;Is this package recognized by HortowonWorks sandbox distribution?&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;</description>
    <pubDate>Sun, 12 Feb 2017 10:12:55 GMT</pubDate>
    <dc:creator>ilh_cho</dc:creator>
    <dc:date>2017-02-12T10:12:55Z</dc:date>
    <item>
      <title>java compile problem for HadoopDFSFileReadWrite.java</title>
      <link>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171376#M133673</link>
      <description>&lt;P&gt;I set up HDP 2.4 Sandbox on Virtualbox on my windows machine.&lt;/P&gt;&lt;P&gt;The pi program works. So, I guess the installation was OK.&lt;/P&gt;&lt;P&gt;Then, I tried to compile a java program from wiki (http://wiki.apache.org/hadoop/HadoopDFSReadWrite.java), but it did not work.&lt;/P&gt;&lt;P&gt;The following shows the compile command and error messages. Basically it does not recognize the org.apache.hadoop.conf package. &lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;P&gt;javac -cp 'hadoop classpath' HadoopDFSFileReadWrite.java                                                               
HadoopDFSFileReadWrite.java:22: error: package org.apache.hadoop.conf does not exist                                   
import org.apache.hadoop.conf.Configuration;                                                                           
                             ^                                                                                         
HadoopDFSFileReadWrite.java:23: error: package org.apache.hadoop.fs does not exist                                     
import org.apache.hadoop.fs.FileSystem;                                                                                
                           ^                   
&lt;/P&gt;...

               
                      
&lt;P&gt;Is this package recognized by HortowonWorks sandbox distribution?&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 10:12:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171376#M133673</guid>
      <dc:creator>ilh_cho</dc:creator>
      <dc:date>2017-02-12T10:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: java compile problem for HadoopDFSFileReadWrite.java</title>
      <link>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171377#M133674</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15970/ilhcho.html" nodeid="15970"&gt;@ilhyung cho&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in your command you are not using the correct Quotation marks.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Incorrect:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;javac -cp 'hadoop classpath' HadoopDFSFileReadWrite.java &lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Correct: 
&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;javac -cp `hadoop classpath` HadoopDFSFileReadWrite.java &lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Everything you type between &lt;STRONG&gt;backticks&lt;/STRONG&gt; is evaluated (executed) by the shell before the main command,  Whereas the same is not the case with single &lt;STRONG&gt;quotation marks&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;For Example:&lt;/P&gt;&lt;PRE&gt;[root@sandbox ~]# echo 'hadoop classpath'
hadoop classpath


[root@sandbox ~]# echo `hadoop classpath`
/usr/hdp/2.5.0.0-1245/hadoop/conf:/usr/hdp/2.5.0.0-1245/hadoop/lib/*:/usr/hdp/2.5.0.0-1245/hadoop/.//*:/usr/hdp/2.5.0.0-1245/hadoop-hdfs/./:/usr/hdp/2.5.0.0-1245/hadoop-hdfs/lib/*:/usr/hdp/2.5.0.0-1245/hadoop-hdfs/.//*:/usr/hdp/2.5.0.0-1245/hadoop-yarn/lib/*:/usr/hdp/2.5.0.0-1245/hadoop-yarn/.//*:/usr/hdp/2.5.0.0-1245/hadoop-mapreduce/lib/*:/usr/hdp/2.5.0.0-1245/hadoop-mapreduce/.//*::jdbc-mysql.jar:mysql-connector-java-5.1.17.jar:mysql-connector-java-5.1.37.jar:mysql-connector-java.jar:/usr/hdp/2.5.0.0-1245/tez/*:/usr/hdp/2.5.0.0-1245/tez/lib/*:/usr/hdp/2.5.0.0-1245/tez/conf
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 11:09:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171377#M133674</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-02-12T11:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: java compile problem for HadoopDFSFileReadWrite.java</title>
      <link>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171378#M133675</link>
      <description>&lt;P&gt;Thanks for quick reply.
The book I follow does not show them as backticks. Now I remember those Unix shell stuff. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It works.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 11:51:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171378#M133675</guid>
      <dc:creator>ilh_cho</dc:creator>
      <dc:date>2017-02-12T11:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: java compile problem for HadoopDFSFileReadWrite.java</title>
      <link>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171379#M133676</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15970/ilhcho.html" nodeid="15970"&gt;@ilhyung cho&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Good to know that it works now. It will be great if you mark this thread/answer as accepted (by clicking the accept link)&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 12:14:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/java-compile-problem-for-HadoopDFSFileReadWrite-java/m-p/171379#M133676</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-02-12T12:14:21Z</dc:date>
    </item>
  </channel>
</rss>

