Re: Live development of custom processors and JAVA_HOME--confirm best practice

2020-08-13 Thread Mike Thomsen
> all day long like IntelliJ IDEA (and others) march on requiring later and 
> later Java versions.

All of my teammates and I are using AdoptOpenJDK 8 with IntelliJ and
in production. Not sure what issue you're running into, but we're on
8u262 as far as I know.

On Thu, Aug 13, 2020 at 1:49 PM Russell Bateman  wrote:
>
> When installing NiFi in production, Ansible can be used to set up
> JAVA_HOME. There is zero problem for users of NiFi.
>
> However, from a development host, given the now rapid cadence of Java
> releases, we sometimes run into problems launching a private
> installation of NiFi in the course of testing or debugging our custom
> processors because tools used minute-to-minute and all day long like
> IntelliJ IDEA (and others) march on requiring later and later Java versions.
>
> I found an old JIRA issue that suggests a solution for NiFi 0.1.0, that
> of working around the problem by setting java=  in /conf/bootstrap.conf/
> to point to a valid Java 1.8 JRE/JDK. This sounds good to me, but the
> version is very old.
>
> Is this still best practice?
>


Re: Live development of custom processors and JAVA_HOME--confirm best practice

2020-08-13 Thread Andy LoPresto
Russell, 

To develop and test against multiple versions of Java, I (and I’m aware other 
committers) use jenv [1] which is a version manager for Java. You can set a 
specific version for global/shell/local environments, and it allows switching 
very quickly. 

I generally run these two commands to switch:

$ jenv shell 1.8.0 # switch to JDK 8
$ jjh # alias defined below

# In my .zshrc (or whatever shell configuration file you use)
alias jjh='jenv version && jenv macos-javahome && jenv_set_java_home && jenv 
doctor’
alias jenv_set_java_home='export JAVA_HOME="$HOME/.jenv/versions/`jenv 
version-name`" && echo "JAVA_HOME=$JAVA_HOME”'

Setting the $JAVA_HOME ensures that mvn picks up the right Java version when it 
runs. 

[1] https://www.jenv.be/ 



Andy LoPresto
alopre...@apache.org
alopresto.apa...@gmail.com
He/Him
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Aug 13, 2020, at 10:48 AM, Russell Bateman  wrote:
> 
> When installing NiFi in production, Ansible can be used to set up JAVA_HOME. 
> There is zero problem for users of NiFi.
> 
> However, from a development host, given the now rapid cadence of Java 
> releases, we sometimes run into problems launching a private installation of 
> NiFi in the course of testing or debugging our custom processors because 
> tools used minute-to-minute and all day long like IntelliJ IDEA (and others) 
> march on requiring later and later Java versions.
> 
> I found an old JIRA issue that suggests a solution for NiFi 0.1.0, that of 
> working around the problem by setting java=  in /conf/bootstrap.conf/ to 
> point to a valid Java 1.8 JRE/JDK. This sounds good to me, but the version is 
> very old.
> 
> Is this still best practice?
> 



Live development of custom processors and JAVA_HOME--confirm best practice

2020-08-13 Thread Russell Bateman
When installing NiFi in production, Ansible can be used to set up 
JAVA_HOME. There is zero problem for users of NiFi.


However, from a development host, given the now rapid cadence of Java 
releases, we sometimes run into problems launching a private 
installation of NiFi in the course of testing or debugging our custom 
processors because tools used minute-to-minute and all day long like 
IntelliJ IDEA (and others) march on requiring later and later Java versions.


I found an old JIRA issue that suggests a solution for NiFi 0.1.0, that 
of working around the problem by setting java=  in /conf/bootstrap.conf/ 
to point to a valid Java 1.8 JRE/JDK. This sounds good to me, but the 
version is very old.


Is this still best practice?