title: How to fix Hadoop WARNING: An illegal reflective access operation has occurred error on Ubuntu
body: <p>I have installed Java <code>openjdk version "10.0.2"</code>and <code>Hadoop 2.9.0</code> successfully. All processes  are running well </p>
  
  <pre><code>hadoopusr@amalendu:~$ jps
  19888 NameNode
  20388 DataNode
  20898 NodeManager
  20343 SecondaryNameNode
  20539 ResourceManager
  21118 Jps
  </code></pre>
  
  <p>But when ever i am trying to execute any command like <code>hdfs dfs -ls /</code> getting this warnings</p>
  
  <pre><code>hadoopusr@amalendu:~$ hdfs dfs -ls /
  WARNING: An illegal reflective access operation has occurred
  WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/usr/local/hadoop/share/hadoop/common/lib/hadoop-auth-2.9.0.jar) to method sun.security.krb5.Config.getInstance()
  WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
  WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
  WARNING: All illegal access operations will be denied in a future release
  18/09/04 00:29:24 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  </code></pre>
  
  <p>Please help how to fix this.
  This is my ~/.bashrc file configuration </p>
  
  <pre><code>export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
  export HADOOP_HOME=/usr/local/hadoop
  export PATH=$PATH:$HADOOP_HOME/bin
  export PATH=$PATH:$HADOOP_HOME/sbin
  export HADOOP_MAPRED_HOME=$HADOOP_HOME
  export HADOOP_COMMON_HOME=$HADOOP_HOME
  export HADOOP_HDFS_HOME=$HADOOP_HOME
  export YARN_HOME=$HADOOP_HOME
  export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
  export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
  </code></pre>