title: Error: Could not find or load main class weblogic.security.Encrypt
body: <p>I am trying to encrypt a database password for my <code>Java EE Application</code> in the terminal. according to this <a href="http://www.techpaste.com/2013/09/steps-encrypt-clear-text-passwords-weblogic-server/" rel="nofollow">tutorial</a></p>
  
  <p>The steps are as follows:</p>
  
  <ol>
  <li>Change directory to your domain’s bin folder (For Eg. cd WLS_home\user_projects\domains\mydomain\bin)</li>
  <li>Use <code>setDomainEnv.cmd/sh</code> script to setup the environment</li>
  <li>Run <code>java weblogic.security.Encrypt</code> which will prompt for the password and will print the encrypted value in stdout.</li>
  </ol>
  
  <p>However, when I execute 'java weblogic.security.Encrypt', I am presented with the following:</p>
  
  <blockquote>
    <p>Error: Could not find or load main class weblogic.security.Encrypt</p>
  </blockquote>
  
  <p>I am developing my project in Eclipse and have configured my <code>Weblogic-12.1.3</code> server in Eclipse. I am not sure why this error is happening, but I expect its because my java version is 1.8, and maybe it expects me to use java 1.6 which I think comes with Weblogic installation.</p>
  
  <pre><code>java -version
  java version "1.8.0_45"
  Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
  Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
  </code></pre>