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

  • Home
  • SEARCH
  • 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 9139835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:26:20+00:00 2026-06-17T09:26:20+00:00

Cannot set JAVA_HOME in /etc/enviroment with JAVA_HOME=/home/syncsys/bin/jdk1.7.0_10/ The command echo $JAVA_HOME gives me /home/syncsys/bin/jdk1.7.0_10/

  • 0

Cannot set JAVA_HOME in /etc/enviroment with JAVA_HOME="/home/syncsys/bin/jdk1.7.0_10/"

The command echo $JAVA_HOME gives me /home/syncsys/bin/jdk1.7.0_10/ but it’s not a correct Java HOME or I need something else?

I dont want bashrc or profile (some issues). Only /etc/enviroment and a way to eliminate the need of reboot after /etc/enviroment updates.

My /etc/envirment :

JAVA_HOME="/home/syncsys/bin/jdk1.7.0_10"
PATH=$JAVA_HOME:$PATH
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

some commands to test :

syncsys@sync-pc:~$ JAVA_HOME=/home/syncsys/bin/jdk1.7.0_10
syncsys@sync-pc:~$ export JAVA_HOME
syncsys@sync-pc:~$ PATH=$JAVA_HOME:$PATH
syncsys@sync-pc:~$ export PATH
syncsys@sync-pc:~$ java -version
The program 'java' can be found in the following packages:
 * default-jre
 * gcj-4.6-jre-headless
 * gcj-4.7-jre-headless
 * openjdk-7-jre-headless
 * openjdk-6-jre-headless

update :

$ cat /etc/environment 
JAVA_HOME="/home/syncsys/bin/jdk1.7.0_10"
PATH="$JAVA_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
syncsys@sync-pc:~$ java -version
The program 'java' can be found in the following packages:

——–(solved) ——– Working sample that is now ok for me.

 $ cat /etc/environment JAVA_HOME="/home/syncsys/bin/jdk1.7.0_10" PATH="/home/syncsys/bin/jdk1.7.0_10/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin‌​:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" 

I have read a lot of tutorials and similar forum posts for this but it’s not working.

  • 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-17T09:26:21+00:00Added an answer on June 17, 2026 at 9:26 am

    aha! I see the problem…

    your JAVA_HOME is correct (if the path is pointing to your JDK, I hope so). The problem is you should change

    PATH=$JAVA_HOME:$PATH
    

    into

    PATH=$JAVA_HOME/bin:$PATH
    

    because the executable file “java” is not in your JAVA_HOME, it sits in JAVA_HOME/bin

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

Sidebar

Related Questions

I know that you cannot simply set DocumentRoot in htaccess but it's all I
My question is the same, but I do not know how to set another
i cannot set my theme's language to my language.. i've translated the needed field
I cannot set title_for_layout in the PagesController that comes by default with CakePHP 1.3.
I see there are several posts regarding Cannot set Property and I'm still struggling
I cannot get/set a static variable inside a method. How can I do it?
I cannot get the DropDownHeight of the ComboBox set properly to display all the
I cannot figure out how to set an estimated maximum price for a collection
I cannot figure out how to set an array to one of two sets
I cannot for the life of me find where to set the delete rules

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.