Questions tagged [jenv]

jEnv is a command line tool to help you forget how to set the JAVA_HOME environment variable

jEnv is a command line tool to help you forget how to set the JAVA_HOME environment variable

29 questions
474
votes
21 answers

Mac OS X and multiple Java versions

How can I install an additional java on MacOS? I installed jdk8 and that works fine. But now I need a jdk7 installation for development purposes. When trying to install the old version via DMG file, i get a warning, that there is already a newer…
Dakkar
  • 5,682
  • 5
  • 22
  • 28
81
votes
6 answers

maven ignoring jenv settings

I had OSX with Java 1.6 installed, and I just installed jenv along with Java 1.7: $ jenv local '1.7' $ jenv versions system 1.6 1.6.0.65 * 1.7 (set by /Users/me/workspace/.java-version) 1.7.0.79 oracle64-1.6.0.65 oracle64-1.7.0.79 jenv…
inanutshellus
  • 9,683
  • 9
  • 53
  • 71
45
votes
3 answers

SET JAVA_HOME to reflect jenv java version

I just started to use jenv, I followed a blog post that was explaining how to use jenv and setup multiple java version on MacOSX. But the problem now I am running into is setting up the JAVA_HOME. As I switch java environment using jenv I want to…
add-semi-colons
  • 18,094
  • 55
  • 145
  • 232
18
votes
1 answer

jenv can't find java 17 installed through the brew on MacOS

I'm trying to install JDK 17 to macOS BigSur (11.5.2) using brew install openjdk@17 > brew install openjdk@17 Running `brew update --preinstall`... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae Updated 3…
lazylead
  • 1,453
  • 1
  • 14
  • 26
11
votes
3 answers

Jenv - same java version added multiple times

I am using Jenv to manage multiple java version on My MacBook(OS X Yosemite). jenv add /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home oracle64-1.6.0.65 added 1.6.0.65 added 1.6 added and while adding Java 1.8 jenv add…
Sasi Kathimanda
  • 1,788
  • 3
  • 25
  • 47
6
votes
3 answers

Not able to change the JDK in Mac OS using Jenv

I am using Amazon corretto JDK and earlier had only 1.8 installed in my Mac OS, yesterday I installed Amazon corretto JDK 11 using the Mac OS package installer and after that it changed my default java version to 11. I followed highly rated medium…
user12056260
5
votes
0 answers

Maven has problem with JAVA_HOME when 'system' version set with jenv

I'm on MacOS, zsh. I've installed jenv, added several java versions. I've ran jenv enable-plugin maven and jenv enable-plugin export jenv doctor returns: [OK] JAVA_HOME variable probably set by jenv PROMPT [OK] Java binaries in path are jenv…
Manolo
  • 1,597
  • 4
  • 21
  • 35
5
votes
1 answer

How to upgrade AdoptOpenJDK8 and Java11 with Homebrew

I have searched a little bit, but im a little bit confused. I have installed Java8 and Java11 by homebrew. Java8 is installed with adoptopenjdk/openjdk tap and Java11 is from homebrew/cask tap. When i see the version for AdoptOpenJDK i see this…
user9883549
5
votes
3 answers

I install java7 and java8 using Jenv. Then, run "jenv global oracle64-1.8.0.121", I get error saying that it's not installed

On my Mac-pro OS-X Yosemite, I install java7 and java8 using Jenv. $ brew cask install java8 $ brew cask install java7 Then execute the "jenv add" commands as followed for each java: $ sudo jenv add…
Saigon7
  • 51
  • 1
  • 3
4
votes
0 answers

How do I compile multi module Maven project where modules have different Java versions? Possibly using Jenv?

Suppose I have a multi-module Maven project, with two modules: foo; requires Java 1.8 to compile bar; requires Java 11 to compile I'd like to be able to build these by running mvn clean install from the parent directory and have them compile using…
Mark
  • 4,970
  • 5
  • 42
  • 66
4
votes
2 answers

Jenv is not picking up the system installed java

I have jenv installed. The output of which java was initially /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java. I issues the following commands: jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home eval…
dknight
  • 1,243
  • 10
  • 23
4
votes
1 answer

jenv: is there a command that indicates which plugins are enabled?

The jenv plugins command will, I believe, show you all available plugins. Is there a jenv command that indicates which plugins are actually enabled?
Les Hazlewood
  • 18,480
  • 13
  • 68
  • 76
3
votes
1 answer

How do I get rid of jenv in Ubuntu?

I think I need to undo some commands I entered when trying to get jenv on my ubuntu instance and I am not sure how to do that. Here's what I did: brew install jenv echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(jenv init…
3
votes
0 answers

Endless trouble setting JAVA_HOME via jenv for use in IntelliJ

I have a seemingly-common problem, but after scouring through the many posts (here and otherwise) of people experiencing the problem of not being able to properly set the JAVA_HOME path, no proposed solutions are solving my problem. I recently…
ZwiTrader
  • 195
  • 1
  • 2
  • 12
3
votes
3 answers

.zshrc: command not found: jenv

I recently followed the steps to install jENV and Corretto-8. Unfortunately now whenever I open a new terminal I see the following: Last login: XXXXXXX /Users/username/.zshrc: command not found: jenv /Users/username/.zshrc: command not found:…
user
  • 651
  • 10
  • 22
1
2