Skip to content

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

Description

@a3845

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

Activity

  1. leonardotc commented on Jan 19, 2021

    @leonardotc
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions