Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use the Java examples provided due to "NoClassDefFoundError" #29

Open
a3845 opened this issue Jan 16, 2021 · 1 comment
Open

Comments

@a3845
Copy link

a3845 commented Jan 16, 2021

Steps to reproduce

I followed the directions here (after cloning the repository and having Java installed): https://in3.readthedocs.io/en/develop/api-java.html#id1

Running build.sh produced man .class files. There were no errors. When I run "java -cp $IN3/build/lib/in3.jar:. GetBlockAPI" (or other Java programs besides GetBlockAPI), I get an error. I cannot run the compiled examples of this in3 Git repository.

Expected behavior

I expect the programs to run without errors.

Actual behavior

When I run "java -cp $IN3/build/lib/in3.jar:. GetBlockAPI", I get this error message:

Exception in thread "main" java.lang.NoClassDefFoundError: in3/IN3
at GetBlockAPI.main(GetBlockAPI.java:12)
Caused by: java.lang.ClassNotFoundException: in3.IN3
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 1 more

System configuration

I am using Ubuntu 18.04 and OpenJDK 11.0.9.1.

Incubed version

I cloned this Git repository from the master branch.

Request

How do you run Java programs in the examples directory after you clone this Git repository and run the build.sh script?

Incubed Configuration

Chain

@leonardotc
Copy link
Contributor

Hello @a3845

Thank you for reaching out. It is a little unclear to me how you are running the code. You said you clonned the git repository from master but pasted the command line command. Have you generated the .jar from master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants