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

Exception in thread "main" java.lang.NoClassDefFoundError: net/bramp/ffmpeg/FFmpeg #359

Open
pobertraterson opened this issue Feb 17, 2025 · 2 comments

Comments

@pobertraterson
Copy link

I know this has been brought up before under issue #70 with changing the guava version to 18.0 or above, however I'm experiencing the same problem using Guava version 33.3.1.

Exception in thread "main" java.lang.NoClassDefFoundError: net/bramp/ffmpeg/FFmpeg
	at main(Main.java:9)
Caused by: java.lang.ClassNotFoundException: net.bramp.ffmpeg.FFmpeg
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 1 more

pom.xml:

<dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>33.3.1-jre</version>
</dependency>

Hopefully this is just a small error made by my stupidity.

@bramp
Copy link
Owner

bramp commented Feb 17, 2025

I think this may be a different issue. In #70 they can't find a Guava class. In your exception, it can't find this ffmpeg library.

How are you including the library in your project?

@pobertraterson
Copy link
Author

I've been having this issue before so all I've done so far is this

import net.bramp.ffmpeg.*;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        System.out.println("test");
        FFmpeg ffmpeg = new FFmpeg("/opt/homebrew/Cellar/ffmpeg/7.1_4/bin/ffmpeg");
        FFprobe ffprobe = new FFprobe("/opt/homebrew/Cellar/ffmpeg/7.1_4/bin/ffprobe");
    }
}

and included it in my pom.xml as what it says on the readme file

<dependency>
      <groupId>net.bramp.ffmpeg</groupId>
      <artifactId>ffmpeg</artifactId>
      <version>0.8.0</version>
</dependency>

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