Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8033331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:40:02+00:00 2026-06-05T01:40:02+00:00

On ubuntu 11.10, with maven2, here’s the error code: Unable to locate the Javac

  • 0

On ubuntu 11.10, with maven2, here’s the error code:

Unable to locate the Javac Compiler in:

/usr/lib/jvm/java-6-sun-1.6.0.26/../lib/tools.jar

Not sure why it’s adding the “..” in the path?

My tools.jar is at /usr/lib/jvm/java-6-sun-1.6.0.26/lib/tools.jar

I have done:
sudo apt-get install sun-java6*
sudo update-alternatives –config java , and chosen sun-java-6

uncommented the deb-src /etc/apt/sources.list

/home/raymond/.bashrc

JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26
export JAVA_HOME

~/.profile

JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26
export JAVA_HOME

/usr/lib/mvn

exec "$JAVACMD" \
  $MAVEN_OPTS \
  -classpath "${M2_HOME}"/boot/classworlds.jar \
  "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
  "-Dmaven.home=${M2_HOME}"  \
  "-Djava.home=${JAVA_HOME}" \
  ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS

pom.xml, I have this in my builds, plugins

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>

java -version

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

javac -version

javac 1.6.0_26

mvn -version

Apache Maven 2.2.1 (rdebian-6)
Java version: 1.6.0_26
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26
Default locale: en_CA, platform encoding: UTF-8
OS name: "linux" version: "3.0.0-14-generic-pae" arch: "i386" Family: "unix"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:40:05+00:00Added an answer on June 5, 2026 at 1:40 am

    It seems I needed to remove this line: “-Djava.home=${JAVA_HOME}” \ from /usr/lib/mvn that I posted in the question. I had added that line following a suggestion from googling. I guess setting the extra java_home had some conflicts.

    I think for ubuntu, it’s easier to just install all sun-java6 packages. I only installed -jdk earlier and ran into all sorts of problems trying to get mvn install to work. I think it started to work since I installed everything, I just had a bogus fix in there that prevented it from installing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Environment: hudson/sonar/maven2 in ubuntu locally with default parameters And I got the log from
Ubuntu Server 9.10, Here is my file, test.py import commands blkid = commands.getoutput('blkid') print
by default ubuntu comes with openjdk. I installed jdk from sun, and removed openjdk,
NOTE: This appears to be a limit in the javac program. I have Java
Ubuntu 11.04, G++, freeglut and GLUT. I don't understand this at all. Here's the
I am entering some code into a Hudson Server run on a Ubuntu box
Ubuntu 11.04 64-bit [Tried on SuSE 32-bit, and got same error], I have gcc,
As a Java developer who switches between *NIX systems (OS X, Ubuntu, ...), although
Ubuntu 11.10 ADT 16.01 Java 6 Eclipse Java EE Indigo SR1 - All latest
I have Maven on Ubuntu server. It seems to try lots and lots of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.