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 7571933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:47:38+00:00 2026-05-30T15:47:38+00:00

by default ubuntu comes with openjdk. I installed jdk from sun, and removed openjdk,

  • 0

by default ubuntu comes with openjdk. I installed jdk from sun, and removed openjdk, but with openjdk I had to remove maven2. How can I reinstall it without installing openjdk?

~$ java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode)

~$ sudo apt-get install maven2
(...)
The following extra packages will be installed:
(...)
openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless
  openjdk-6-jre-lib
(...)
The following NEW packages will be installed:
(...)
openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless
  openjdk-6-jre-lib

Any help appreciated, I have googled a lot and I haven’t found any solution :/

  • 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-05-30T15:47:39+00:00Added an answer on May 30, 2026 at 3:47 pm

    You can simply download tar.gz archive from Maven web-site and unpack it to some directory like this (will unpack it to /opt):

    tar -xzvf apache-maven-3.0.4-bin.tar.gz -C /opt
    

    After it you need to set $M2_HOME variable:

    export M2_HOME=<path_to_maven>
    

    And add it to PATH:

    export PATH=$PATH:$M2_HOME/bin
    

    To check you can launch:

    mvn -version
    

    Note:
    If it does not work for all the terminals.
    Performed the below steps.
    Become superuser.

    Fire below commands.

    nano /etc/profile.d/maven.sh
    

    Paste the below lines.

    export M2_HOME=<path_to_maven>

    export PATH=$PATH:$M2_HOME/bin

    ctrl +O to save and ctrl +X to exit.

    Fire the below commands.

    chmod +x /etc/profile.d/maven.sh
    
    source /etc/profile.d/maven.sh
    
    mvn -version
    
    • 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
How can i extend default lib search path in ubuntu(in a way that it
On an almost default install of Ubuntu 11.04 I installed clang. I am trying
UPDATE 1: I am using Ubuntu 10.04 and installed the default LAMP stack. ORIGINAL
I installed python3.2 in ubuntu (the default edition is not deleted), and I follow
I'm wondering if mono.net is included in the default installation of Ubuntu, Kubuntu, and
I'm accessing an Ubuntu machine using PuTTY, and using gcc. The default LANG environment
I'd like to how to upgrade the default python installation(2.5.2) supplied with ubuntu 8.04
I previously used bash on ubuntu 10.04 LTS as my default shell environment. Recently
I came from a Windows background whern it comes to development environments. I'm used

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.