Error: JAVA_HOME is not defined correctly - after maven installation

629

You should add these lines to your ~/.pam_environment file instead (create it if it doesn't exist)

PATH DEFAULT=${PATH}:/opt/jdk1.7.0_40/jdk1.7.0_40/bin
JAVA_HOME DEFAULT=/opt/jdk1.7.0_40/jdk1.7.0_40

More information (read this)

Using .bashrc is not recommended at the above link.

Share:
629

Related videos on Youtube

JacoJazz
Author by

JacoJazz

Updated on September 18, 2022

Comments

  • JacoJazz
    JacoJazz over 1 year

    I've been trying to calculate a reflection velocity of a particle (Circle2D) against a platform's normal vector.

    Vector2D reflect(Vector2D vector, Vector2D normal) {
        double velocityDotProduct = Vector2D.dot(normal, vector);
        Vector2D reflectVector = new Vector2D(vector.getX() - 2 * velocityDotProduct * normal.getX(), vector.getY() - 2 * velocityDotProduct * normal.getY());
        return reflectVector;
    }
    

    This is returning the correct x velocity but is giving a tiny y velocity.

    Before: x=5.0 y=20.39999999999999
    After: x=5.000000009209657 y=-1.5040509959999993E8
    

    Thanks, Jacob

    • catch23
      catch23 over 10 years
      @minerz029 I first time here about this things. Can you explain more about this things? How do really to write this variable? Can you show one at this example?
    • juggernauthk108
      juggernauthk108 about 8 years
      try sudo ./mkdistro
  • catch23
    catch23 over 10 years
    Perfect I did this and my output is Apache Maven 3.0.4 .... Why was this happen?
  • Hakeem Wahab
    Hakeem Wahab over 10 years
    because most of java based applicatons need this variable to know the java path