Google-fu not helping. I’m trying to install a CF2...
# box-products
j
Google-fu not helping. I’m trying to install a CF2021 package…do I set JAVA_HOME in CommandBox? And, how do I set it?! Thanks. 🙂
j
If you are using CommandBox, you don't need to set your JAVA_HOME.
j
Getting closer.
j
Why are you setting JAVA_HOME? What is the objective?
j
My objective is to install the CF2021 mail package per my original screenshot.
cfpm install mail
Errors with JAVA_HOME not set.
j
Did you do the server start command yet?
j
Yes, immediately before the cfpm command.
j
Are you on windows?
j
Yes, Windows 10.
CommandBox 5.3.1
j
Good, and did you look in your user folder for this manually to verify the presence?
Sounds like you have it. Time to reach out to both @bdw429s and perhaps @Mark Takata (Adobe)?
j
Yes, it is there. Cool, thanks! I just loaded the site on 2018 in the meantime ( though the client is using a 2021 production environment ). So, we’ll see what happens. Thanks.
b
@jakobward It would appear you're on an old version of CommandBox. The latest version automatically sets the JAVA_HOME. Stay up to date and you wouldn't have seen this 😉
cc/ @johnfarrar
👍🏼 1
Also, setting the java home in the server.json for has nothing at all to do with the JAVA_HOME environment variable that cfpm is looking for
j
Ahh, your url said cfpm requires 5.2 or later. I guess it should say latest. Thanks!
b
No, you can use cfpm in 5.2
It's just not going to default your missing java_home env var for you!
5.5 just does you a favor by creating it if you forgot 😀
The env var is a requirement of cfpm itself
And CommandBox's cfpm command is just a proxy to Adobe's cli
👍🏻 1
j
Lol. All good. I prefer to stay up-to-date. Must have overlooked my CommandBox. Sorry for the confusion and thanks for the assist.
m
Yeppers. And just a heads up, a bit out of scope for this discussion, but running the new VS Code extension will require a properly setup JAVA_HOME also, so good practice
👍🏼 1
👍 1
j
Definitely not out of scope. Still need to figure out how to set that. Ha.
I guess just copy and paste from CF Admin. Doi.