Ant unable to find javac, JAVA_HOME won't set on Ubuntu

前端 未结 4 1746
滥情空心
滥情空心 2020-12-23 13:56

I have an Android Project called Hello on my Ubuntu 10.04 i386 Server (headless). It contains all things an Android project folder should have. I first build the project in

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-23 14:11

    As Edwin Buck stated, check your $PATH for softlinks to /etc/alternatives/java in the /usr/bin/ directory. They are being read before your appended JAVA_HOME variable.

    That was my problem:

    ls -al /usr/bin/j* 
    lrwxrwxrwx 1 root root    22 2012-05-07 13:26 /usr/bin/java -> /etc/alternatives/java
    lrwxrwxrwx 1 root root    25 2011-05-12 19:45 /usr/bin/java_vm -> /etc/alternatives/java_vm
    lrwxrwxrwx 1 root root    24 2011-05-01 05:22 /usr/bin/javaws -> /etc/alternatives/javaws
    lrwxrwxrwx 1 root root    26 2011-05-12 19:45 /usr/bin/jcontrol -> /etc/alternatives/jcontrol
    lrwxrwxrwx 1 root root    23 2011-04-26 02:24 /usr/bin/jexec -> /etc/alternatives/jexec
    

提交回复
热议问题