# How to add nd4j into classpath without an IDE

**URL:** <https://community.konduit.ai/t/how-to-add-nd4j-into-classpath-without-an-ide/482>\
**Category:** DL4J\
**Created:** [May 4, 2020, 9:49pm UTC](https://community.konduit.ai/t/how-to-add-nd4j-into-classpath-without-an-ide/482 "2020-05-04T21:49:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![gdelrio](https://avatars.discourse-cdn.com/v4/letter/g/7993a0/32.png) [@gdelrio](https://community.konduit.ai/u/gdelrio)\
**Post date:** [May 4, 2020, 9:49pm UTC](https://community.konduit.ai/t/how-to-add-nd4j-into-classpath-without-an-ide/482/1 "2020-05-04T21:49:54Z")

</div>

Hi,

I’m still struggling to make the MultiGpuLenetMnistExample code work using GPUs.

After compiling it using the dl4j-cuda-specific-examples-1.0.0-beta6-bin.jar and dl4j-spark-1.0.0-beta6-bin.jar as part of the CLASSPATH, I got an error about adding nd4j backend on my classpath:

14:38:23,151 WARN ~ Skipped [JCublasBackend] backend (unavailable): java.lang.UnsatisfiedLinkError: /home/dl4j/.javacpp/cache/dl4j-spark-1.0.0-beta6-bin.jar/org/bytedeco/cuda/linux-x86\_64/libjnicudart.so: libcudart.so.10.2: cannot open shared object file: No such file or directory

Exception in thread “main” java.lang.ExceptionInInitializerError

at org.deeplearning4j.nn.conf.NeuralNetConfiguration$Builder.seed(NeuralNetConfiguration.java:579)

at MultiGpuLenetMnistExample.main(MultiGpuLenetMnistExample.java:70)

Caused by: java.lang.RuntimeException: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath. Please see: [http://nd4j.org/getstarted.html](http://nd4j.org/getstarted.html)

at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5131)

at org.nd4j.linalg.factory.Nd4j.(Nd4j.java:226)

… 2 more

Caused by: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath. Please see: [http://nd4j.org/getstarted.html](http://nd4j.org/getstarted.html)

at org.nd4j.linalg.factory.Nd4jBackend.load(Nd4jBackend.java:218)

at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5128)

… 3 more

I read the referred website for getting started with nd4j, but there is no explanation as to which jar file to add in the CLASSPATH. By the way, for diverse reasons I do not use any IDE for my coding/compiling/executing in Java. The explanations are provided only for IntelliJ or Eclipse.

Best,

Gabriel

---

_[View the full topic](https://community.konduit.ai/t/how-to-add-nd4j-into-classpath-without-an-ide/482)._
