Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java not installing #62

Closed
N30Z3N opened this issue Sep 23, 2021 · 4 comments
Closed

java not installing #62

N30Z3N opened this issue Sep 23, 2021 · 4 comments
Assignees

Comments

@N30Z3N
Copy link

N30Z3N commented Sep 23, 2021

Step 6/14 : RUN heroku plugins:install java

 ---> Running in 57dc79ca6c15

/bin/sh: 1: heroku: not found

The command '/bin/sh -c heroku plugins:install java' returned a non-zero code: 127

I also tried sudo apt-get install openjdk-8-jre which is mainly i want even that getting error

@bpmct
Copy link
Member

bpmct commented Sep 27, 2021

What was the error with sudo apt-get install openjdk-8-jre? I believe this is the way to install Java

@bpmct bpmct self-assigned this Sep 27, 2021
@N30Z3N
Copy link
Author

N30Z3N commented Sep 28, 2021

What was the error with sudo apt-get install openjdk-8-jre? I believe this is the way to install Java

same error

@bpmct
Copy link
Member

bpmct commented Feb 13, 2022

Hi - sorry for the late response. I have not been active on this repo.

You can install Java in your project by adding this to the Dockerfile:

USER root

# Install "software-properties-common" (for the "add-apt-repository")
RUN apt-get update && apt-get install -y \
    software-properties-common

## Install Oracle's JDK
# add oracle jdk repository
RUN add-apt-repository ppa:ts.sch.gr/ppa \
# accept oracle license
  && echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \
  && echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections \
  && apt-get update \
# install oracle jdk 8 and make it default
  && apt-get -y install oracle-java8-installer \
  && apt-get -y install oracle-java8-set-default \
# clean up
  && apt-get clean all \
  && rm -rf /var/lib/apt/lists/*

USER coder

@bpmct bpmct closed this as completed Feb 13, 2022
@bpmct
Copy link
Member

bpmct commented Feb 13, 2022

Ah, it looks like Java 8 is not supported on Debian 11. You can, however, use:

RUN sudo apt-get update && sudo apt-get install -y openjdk-11-jre

see this for workarounds: https://www.itzgeek.com/how-tos/linux/debian/how-to-install-java-jdk-on-debian-11.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants