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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:23:55+00:00 2026-06-16T04:23:55+00:00

I have an account on a Unix server. I can’t get it to point

  • 0

I have an account on a Unix server. I can’t get it to point to the version of Java I want when I am in BASH.

The version of Unix is:

SunOS 5.10 Generic January 2005 

This is what I have in my .profile:

#====================================================================
#   set the environment
#====================================================================

ANT_HOME=/apps1/apache-ant-1.8.4
export ANT_HOME

#  $PATH:/user1/acme21 needs to be included to make anything work
PATH=.:/usr/jdk/instances/jdk1.6.0_24:$ANT_HOME/bin:$PATH:/user1/acme21
export PATH

JAVA_HOME=/usr/jdk/instances/jdk1.6.0_24
export JAVA_HOME

CLASSPATH=.:/user1/sterus01/TestProgramsLib/mail.jar:/user1/sterus01/TestProgramsLib/activation.jar:/user1/sterus01/TestProgramsLib/log4j-1.2.16.jar:/user1/sterus01/TestProgramsLib/mail.jar:ojdbc14.jar
export CLASSPATH

env | grep DIS

# Use the bash shell, get many conveniences
bash

When I run echo $JAVA_HOME and echo $PATH I get

bash-3.00$ echo $JAVA_HOME
/usr/jdk/instances/jdk1.6.0_24
bash-3.00$

and

bash-3.00$ echo $PATH
.:/usr/jdk/instances/jdk1.6.0_24:/apps1/apache-ant-1.8.4/bin:/usr/bin:/usr/local/bin:/usr/ccs/bin:/usr/bin:/usr/sbin:/etc:/usr/ucb:/usr/local/sudo:/usr/local/sbin:/user1/acme21
bash-3.00$

Yet “which javac” reveals:

bash-3.00$ which javac
/usr/bin/javac
bash-3.00$

and “which java” reveals:

bash-3.00$ which java
/usr/bin/java
bash-3.00$

Is there anything I can do to get it to point to the Java version I specified in my .profile file?

Thanks in advance
Happy Holidays
Steve

  • 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-16T04:23:56+00:00Added an answer on June 16, 2026 at 4:23 am

    I suspect this:

    PATH=.:/usr/jdk/instances/jdk1.6.0_24
    

    isn’t right, and you need instead

    PATH=.:/usr/jdk/instances/jdk1.6.0_24/bin
    

    to pick up the binary directory within that Java installation.

    p.s. I wouldn’t put the current directory (.) in your PATH. Otherwise someone can substitute a trojan-like program (e.g. a substitute for ls) in a directory. You’ll pick that up when you cd into the containing directory and type ls (there’s an entertaining story relating to this in the Unix Power Tools book)

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

Sidebar

Related Questions

I have an account at a server at school, and a home computer that
I have a database where you can select articles etc, users have an account,
I can't understand general scheme using certificates. For example: I have account on the
I have an account in oracle database. I can connect it via jdbc in
I have account set up on SQL Server such that it uses my Windows
I have a table of accounts and venues where an account can have many
I have an Account entity which has all fields in UpdateCheck = Never except
I have an account on github and I am the owner of an organization.
i have an account number that is stored in as a query string. How
I have an Account model with the following : has_one :primary_user, :class_name => User,

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.