Results 1 to 8 of 8

Thread: How Do You Point A Program To Look In A Specific Directory For Another Program When

  1. #1
    Join Date
    Jun 2013
    Location
    Alaska
    Beans
    67
    Distro
    Ubuntu 12.04 Precise Pangolin

    How Do You Point A Program To Look In A Specific Directory For Another Program When

    I downloaded JDK7U21 from Java and surprised myself and installed it with no problems from the terminal. I also downloaded Vuze which needs Java and looks for it when installing. Vuze readme.txt says to use a JAVA_PROGRAM_DIR option in the script, so I did and this iswhat I got, which is the same as I initially got when I tried installing Vuze the first time:

    kl7jef@Patriot-1:~/Downloads/vuze$ ./azureus JAVA_PROGRAM_DIR="/home/jdk1.7.0_21/bin"
    Starting Azureus...
    Java exec not found in PATH, starting auto-search...
    ls: cannot access /usr/java/latest: No such file or directory
    ls: cannot access /usr/java: No such file or directory
    ls: cannot access /usr/lib/jvm/latest: No such file or directory
    ls: cannot access /usr/lib/jvm: No such file or directory
    Re-checking with GCJ (Sun Java recommended)..
    Java exec not found in PATH, starting auto-search...
    ls: cannot access /usr/java/latest /usr/java /usr/lib/jvm/latest /usr/lib/jvm: No such file or directory
    OOPS, unable to locate java exec in /usr/java/latest /usr/java /usr/lib/jvm/latest /usr/lib/jvm/ hierarchy
    You need to upgrade to JRE 1.4.x or newer from http://java.sun.com

    As you can see I put Java in "/home/jdk1.7.0_21/bin"

    Am I on the right track?

    Any help is appreciated. Thanks!

  2. #2
    Join Date
    Feb 2008
    Location
    Planet earth, for now.
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How Do You Point A Program To Look In A Specific Directory For Another Program W

    Thread moved to General Help.

    No, I'm not following you around. Installation & Upgrades is, from the description of that sub-forum:

    For questions about upgrading and installation of your new Ubuntu OS.
    Last edited by Bucky Ball; June 15th, 2013 at 07:17 AM.

  3. #3
    Join Date
    Jun 2013
    Location
    Alaska
    Beans
    67
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How Do You Point A Program To Look In A Specific Directory For Another Program W

    And there I go again assuming Installation in the general sense lol!

  4. #4
    Join Date
    Apr 2012
    Beans
    5,060

    Re: How Do You Point A Program To Look In A Specific Directory For Another Program W

    Code:
    ./progname VAR=value
    runs progname and then sets the value of VAR; what you want to do probably is the other way around i.e.

    Code:
    VAR=value ./progname
    Alternatively, you could export VAR with its new value

    Code:
    export VAR=value
    then

    Code:
    ./progname

  5. #5
    Join Date
    Jun 2013
    Location
    Alaska
    Beans
    67
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How Do You Point A Program To Look In A Specific Directory For Another Program W

    I might be over my head, but I'm trying lol! I understand the use of ./ to execute file in current directory. I don't understand VAR. When I try and look it up, I keep getting sent to the enviromental variable Path=. What about using Path= and add it in the .bashrc? I tried, but it wouldn't let me type, so it was a no go. if you could explain a little more what the VAR represents and how and where it would be used, i would prefer that over messing with the .bashrc at my days old skill level!

  6. #6
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: How Do You Point A Program To Look In A Specific Directory For Another Program W

    PATH has to be all uppercase, as most other system variables
    notice the difference between
    Code:
    echo $path
    echo $Path
    echo $PATH

  7. #7
    Join Date
    Apr 2012
    Beans
    5,060

    Re: How Do You Point A Program To Look In A Specific Directory For Another Program W

    sorry I just used VAR to mean a generic environment variable - in your case that would be

    Code:
    JAVA_PROGRAM_DIR="/home/jdk1.7.0_21/bin" ./azureus
    or

    Code:
    export JAVA_PROGRAM_DIR="/home/jdk1.7.0_21/bin" 
    
    ./azureus

  8. #8
    Join Date
    Jun 2013
    Location
    Alaska
    Beans
    67
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How Do You Point A Program To Look In A Specific Directory For Another Program W

    Thank you Sir.
    Last edited by FMFCorpsman; June 15th, 2013 at 06:14 AM. Reason: Just looking to see how to mark it solved

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •