Unable to add libraries under Spark /usr/spark2.2.1/jars/ due to permissions restrictions

Hi,

I am unable to add Spark libraries (spark-cassandra-connector and jsr166e-1.1.0.jar) under
/usr/spark2.2.1/jars/ due to permissions restrictions.
Can anyone please help me on this issue?

error:
jsr166e-1.1.0.jar: Permission denied
Cannot write to ‘jsr166e-1.1.0.jar’ (Permission denied).

Regards,
Guru

You can use the --jars option of the spark-submit or spark-shell to specify the java libraries.