Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Is there any command to set classpath in Apache Nifi

avatar
Rising Star

Can we set classpath using "java -classpath " command in Nifi like we do in other CLI hadoop component. If not than Is it possible to set this in bootstrap.conf file or Nifi.sh script. I have seen a way in this post https://issues.apache.org/jira/browse/NIFI-416

however not sure this is possible or not.

1 ACCEPTED SOLUTION

avatar
Master Guru

Can you give some background on why you want to set the classpath?

NiFi has a very specific class-loader isolation model and generally you don't add JARs to NiFi's classpath like you do with other projects.

View solution in original post

10 REPLIES 10

avatar
New Contributor

Hi,

 

Can you explain how can I use config files inside code which are defined under src/main/resources folder ?

 

I tried using standard Java approach via getResourceAsStream() or getResource() methods to access resources under classpath. But in Ni-fi, while execution it outputs IllegalArgumentException.