Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to to configure java sdk on ubuntu 12.04. I ha/ve copied the jdk folder to /usr/lib/java and made a link as "sudo ln -s -b /usr/lib/java/jdk1.7.0_45/bin/javac /etc/alternatives/javac" and "sudo ln -s -b /usr/lib/java/jdk1.7.0_45/bin/javac /bin/bin/javac"

but when i try to run command "javac" it doesn't run. however it runs as "sudo javac" correctly. how can i make it run without sudo

share|improve this question
up vote 0 down vote accepted

found the solution. Just need to change the permission of the /java and its sub folders to allow access to the inner-files.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.