java.lang.NoClassDefFoundError: org/opencv/highgui/Highgui

opencv.org | 7 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    OpenCV Java for a multiplatform app - OpenCV Q&A Forum

    opencv.org | 7 months ago
    java.lang.NoClassDefFoundError: org/opencv/highgui/Highgui
  2. 0

    xmpp server component error

    Stack Overflow | 3 years ago | user3599456
    java.lang.NoClassDefFoundError: org/xmpp/component/Log
  3. 0

    Working with Xstream, clarification needed

    Stack Overflow | 5 years ago | Jam
    java.lang.NoClassDefFoundError: org/codehaus/jettison/mapped/Configuration at com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver.<init>(JettisonMappedXmlDriver.java:55)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Specifying classpath in Sun CDC Toolkit

    Oracle Community | 9 years ago | 843849
    java.lang.NoClassDefFoundError: deleteme.DeleteMe
  6. 0

    java (and javac) are defined to treat empty path elements in -classpath as ".". It looks like there is a regression in JDK 9 such that a trailing empty path element is lost (and thus not treated as "."). This was detected by resuscitating the javac test langtools/test/tools/javac/Paths/MineField.sh which has been disabled for a while during Jigsaw development. (Sigh). Here is a very stripped down version that demonstrates the bug: ---------------------------------- #!/bin/sh JDK=/opt/jdk/1.9.0 mkdir -p MyDir echo 'public class Lib {public static void f(){}}' > Lib.java $JDK/bin/javac -d MyDir Lib.java echo 'public class Main {public static void main(String[] a) {Lib.f();}}' > Main.java $JDK/bin/javac -cp MyDir Main.java cd MyDir $JDK/bin/java -cp ..: Main ---------------------------------- Here is the result of running the script: $ sh -x Bug.sh + JDK=/opt/jdk/1.9.0 + mkdir -p MyDir + echo public class Lib {public static void f(){}} + /opt/jdk/1.9.0/bin/javac -d MyDir Lib.java + echo public class Main {public static void main(String[] a) {Lib.f();}} + /opt/jdk/1.9.0/bin/javac -cp MyDir Main.java + cd MyDir + /opt/jdk/1.9.0/bin/java -cp ..: Main Exception in thread "main" java.lang.NoClassDefFoundError: Lib at Main.main(Main.java:1) Caused by: java.lang.ClassNotFoundException: Lib at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-ea/BuiltinClassLoader.java:366) at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-ea/ClassLoaders.java:184) at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:419) ... 1 more If you edit the script to run JDK 8, you get the following output (i.e. no error, as expected) $ sh -x Bug.sh + JDK=/opt/jdk/1.8.0 + mkdir -p MyDir + echo public class Lib {public static void f(){}} + /opt/jdk/1.8.0/bin/javac -d MyDir Lib.java + echo public class Main {public static void main(String[] a) {Lib.f();}} + /opt/jdk/1.8.0/bin/javac -cp MyDir Main.java + cd MyDir + /opt/jdk/1.8.0/bin/java -cp ..: Main

    JDK Bug System | 10 months ago | Jonathan Gibbons
    java.lang.NoClassDefFoundError: Lib

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      org/opencv/highgui/Highgui

      at core.Ident.ident()
    2. core
      Ident.ident
      1. core.Ident.ident(Ident.java:84)
      1 frame
    3. Unknown
      Main.main
      1. Main.main(Main.java:13)
      1 frame