Sponsored Content
Operating Systems AIX Strange issue installing Java 8 Post 303020096 by MadeInGermany on Friday 13th of July 2018 06:50:05 AM
Old 07-13-2018
Either put your new java path before the inherited $PATH
Code:
PATH=/usr/sbin:/usr/localcw/sbin:/usr/lib/java8/jre/bin:/usr/java8_64/jre/bin:$PATH:/sbin:/opt/IBM/db2/V9.7/bin

Or, better, look where the $PATH comes from (/etc/profile ? /etc/environment ? /etc/default/login ? ... ?) and change it there.
As others said, it can make sense to just backout the old /usr/java14/jre/bin:/usr/java14/bin: and ensure that /usr/bin/java is a link to the desired version.
This User Gave Thanks to MadeInGermany For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Installing Java on Openserver 6

Forgive the sheer volume of verbiage: Sco Openserver 6 - how to install Java 1.42_14b: The documentation says: "Make a subdirectory and unwind the tar file into that subdirectory. mkdir JAVA142 cd JAVA142; tar -xf ../OSR6_Java2_142.VOLS.tar Run the Software Manager with the command: ... (6 Replies)
Discussion started by: LetSco
6 Replies

2. Solaris

Java Exceptions while installing Oracle

Hello. I was trying to installe oracle 10g on solaris t0 x86 and got few exception? Could you please suggest, what might be going wrong? $ ls -l total 32 drwxr-xr-x 9 oracle dba 512 Nov 21 03:50 doc drwxr-xr-x 5 oracle dba 512 Nov 21 03:50 install drwxr-xr-x 2... (5 Replies)
Discussion started by: panchpan
5 Replies

3. HP-UX

installing java 5.0 in HPUX B11.11

please help me how to install java 5.0 in HPUX ...where can i download java 5.0 for HPUX? thanks winky (6 Replies)
Discussion started by: winky
6 Replies

4. UNIX for Dummies Questions & Answers

Strange issue

I have created a server monitor program in Java that connects to servers via SSH and constantly refreshes the new server load every 3 mins. The problem is that even though it is a Java app running shell commands to get the load info, the commands still appear in 'history'. The question is.. is... (1 Reply)
Discussion started by: AndrewSH
1 Replies

5. Web Development

Strange Mysql issue

Hi all, I recently changed the name of my hostname from 'abc123' to 'abc456' (as an example). I then added a user in my mysql database with the new host and removed references to the old users and hostname. The strange thing is though, a process using the database still uses the old... (1 Reply)
Discussion started by: muay_tb
1 Replies

6. Red Hat

help with installing java EE on fedora 14

Hi Forum Im a new to fedora and was wondering ,Can anybody direct me to a site that shows me how to install Java EE 6 SDK Update 1 (with JDK 6 Update 23) for fedora 14. NOT openjdk i need oracles java to develop a web app using tomcat 7.0 Any help would be much appreciated and thank you in advance (1 Reply)
Discussion started by: ShinTec
1 Replies

7. UNIX for Dummies Questions & Answers

Installing Java Problems

Hello, When i attempt to install Java. I get this error code Can someone tell me what im doing wrong. (2 Replies)
Discussion started by: Fob Upset
2 Replies

8. Shell Programming and Scripting

Strange Issue with sendmail

more works.sh #!/bin/ksh { print "From: reportgenerator@myserver.com" print "To: randomguy@myfirm.com" print "MIME-Version: 1.0" print "Content-Type: text/html" print "Subject: Disk Report" print "<body>" print "<table border=1>" ... (3 Replies)
Discussion started by: mohtashims
3 Replies
SYSTEMD.ENVIRONMENT-GENERATOR(7)                           systemd.environment-generator                          SYSTEMD.ENVIRONMENT-GENERATOR(7)

NAME
systemd.environment-generator - systemd environment file generators SYNOPSIS
/lib/systemd/system-environment-generators/some-generator /usr/lib/systemd/user-environment-generators/some-generator /run/systemd/system-environment-generators/* /etc/systemd/system-environment-generators/* /usr/local/lib/systemd/system-environment-generators/* /lib/systemd/system-environment-generators/* /run/systemd/user-environment-generators/* /etc/systemd/user-environment-generators/* /usr/local/lib/systemd/user-environment-generators/* /usr/lib/systemd/user-environment-generators/* DESCRIPTION
Generators are small executables that live in /lib/systemd/system-environment-generators/ and other directories listed above. systemd(1) will execute those binaries very early at the startup of each manager and at configuration reload time, before running the generators described in systemd.generator(7) and before starting any units. Environment generators can override the environment that the manager exports to services and other processes. Generators are loaded from a set of paths determined during compilation, as listed above. System and user environment generators are loaded from directories with names ending in system-environment-generators/ and user-environment-generators/, respectively. Generators found in directories listed earlier override the ones with the same name in directories lower in the list. A symlink to /dev/null or an empty file can be used to mask a generator, thereby preventing it from running. Please note that the order of the two directories with the highest priority is reversed with respect to the unit load path, and generators in /run overwrite those in /etc. After installing new generators or updating the configuration, systemctl daemon-reload may be executed. This will re-run all generators, updating environment configuration. It will be used for any services that are started subsequently. Environment file generators are executed similarly to unit file generators described in systemd.generator(7), with the following differences: o Generators are executed sequentially in the alphanumerical order of the final component of their name. The output of each generator output is immediately parsed and used to update the environment for generators that run after that. Thus, later generators can use and/or modify the output of earlier generators. o Generators are run by every manager instance, their output can be different for each user. It is recommended to use numerical prefixes for generator names to simplify ordering. EXAMPLES
Example 1. A simple generator that extends an environment variable if a directory exists in the file system # 50-xdg-data-dirs.sh #!/bin/bash # set the default value XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share}" # add a directory if it exists if [[ -d /opt/foo/share ]]; then XDG_DATA_DIRS=/opt/foo/share:${XDG_DATA_DIRS} fi # write our output echo XDG_DATA_DIRS=$XDG_DATA_DIRS Example 2. A more complicated generator which reads existing configuration and mutates one variable # 90-rearrange-path.py #!/usr/bin/env python3 """ Proof-of-concept systemd environment generator that makes sure that bin dirs are always after matching sbin dirs in the path. (Changes /sbin:/bin:/foo/bar to /bin:/sbin:/foo/bar.) This generator shows how to override the configuration possibly created by earlier generators. It would be easier to write in bash, but let's have it in Python just to prove that we can, and to serve as a template for more interesting generators. """ import os import pathlib def rearrange_bin_sbin(path): """Make sure any pair of .../bin, .../sbin directories is in this order >>> rearrange_bin_sbin('/bin:/sbin:/usr/sbin:/usr/bin') '/bin:/sbin:/usr/bin:/usr/sbin' """ items = [pathlib.Path(p) for p in path.split(':')] for i in range(len(items)): if 'sbin' in items[i].parts: ind = items[i].parts.index('sbin') bin = pathlib.Path(*items[i].parts[:ind], 'bin', *items[i].parts[ind+1:]) if bin in items[i+1:]: j = i + 1 + items[i+1:].index(bin) items[i], items[j] = items[j], items[i] return ':'.join(p.as_posix() for p in items) if __name__ == '__main__': path = os.environ['PATH'] # This should be always set. # If it's not, we'll just crash, we is OK too. new = rearrange_bin_sbin(path) if new != path: print('PATH={}'.format(new)) Example 3. Debugging a generator SYSTEMD_LOG_LEVEL=debug VAR_A=something VAR_B="something else" /lib/systemd/system-environment-generators/path-to-generator SEE ALSO
systemd-environment-d-generator(8), systemd.generator(7), systemd(1), systemctl(1) systemd 237 SYSTEMD.ENVIRONMENT-GENERATOR(7)
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy