Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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
Frequent Visitor

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.