Coder Social home page Coder Social logo

Comments (7)

noelmcloughlin avatar noelmcloughlin commented on August 11, 2024

Also noting both sqlplus and sqldeveloper salt formulas set prefix to /usr/lib/oracle/ as default.

from sun-java-formula.

sroegner avatar sroegner commented on August 11, 2024

The formula was conceived to help on older platforms that didn't have any reasonable native way of installing java. Trying to make it work "right" on newer distributions that have multiple java installation paths built-in we'd have to decide whether to incorporate the native stack(s) or work around and aside them.

The former approach probably means an implementation per distribution with a potentially large number of dependencies pulled by those packages - the latter will not work as soon as you install other tools that either directly depend on or implicitly expect the native installation.
@noelmcloughlin I see you doing a lot of tool-related work - I personally am more interested in server environments - do you maybe have a solution already in mind that would work for you?

from sun-java-formula.

noelmcloughlin avatar noelmcloughlin commented on August 11, 2024

Enterprise Linux default installation typically will exclude JDK so options are less muddy, but as desktop linux default installation likely include JDK we must assume /usr/lib/java/ symlink cannot work going forward - unless someone has nice solution.

The Oracle documentation is unhelpful, but the official jdk-8u131-linux-x64.RPM does install to /usr/java/ so this location, being unofficially owned by Oracle, seems best candidate. Otherwise /usr/lib/oracle/java/ should work for everyone - and alternatives system makes this transparent.

from sun-java-formula.

noelmcloughlin avatar noelmcloughlin commented on August 11, 2024

[ERROR ] Directory exists where the symlink /usr/lib/java should be

from sun-java-formula.

noelmcloughlin avatar noelmcloughlin commented on August 11, 2024

known workaround:
$ sudo rpm -e javapackages-tools --nodeps
$ ... run formula ...
$ sudo yum install -y javapackages-tools

from sun-java-formula.

noelmcloughlin avatar noelmcloughlin commented on August 11, 2024

Hi @vutny, do you have any ideas regarding best workaround? Something like the following maybe?
`
{%- if salt'grains.get' == 'RedHat' %}
sun-java-usr-lib-backup:
cmd.run: mv {{ java.java_home }} {{ java.java_home }}_java_backup 2>/dev/null || echo ok
{% endif %}

update-javahome-symlink:
file.symlink:
- name: {{ java.java_home }}
- require:
- archive: unpack-jdk-archive

{%- if salt'grains.get' == 'RedHat' %}
sun-java-usr-lib-restore:
cmd.run: mv {{ java.java_home }}_java_backup/* {{ java.java_home }} 2>/dev/null || echo ok
file.absent:
- name: {{ java.java_home }}_java_backup
{% endif %}
`

from sun-java-formula.

noelmcloughlin avatar noelmcloughlin commented on August 11, 2024

Guys the Issue is open few weeks now #33 and analysed by two community members.

from sun-java-formula.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.