Java - Testing if VLC is installed

Asked

Viewed 81 times

1

Hello! I am developing a mod project for Minecraft and I need to check if VLC is installed and Vlcj can run normally, in case you do not need to close the game is to show a message. Does anyone know how I could do the checking part?

  • Post some code so it’s easier for other members to help you.

  • Your question is about how to verify if a file exists using Java code, or what is the Minecraft VLC file for the mod of interest to you? If it’s the first one, edit the question to make it clear (and indicate the name of the file you want to check for). If it is the second one, it is outside the scope of the site (in this case, read [help] and do the [tour]).

1 answer

0


If I understand correctly, it is possible to use a routine from the Vlcj library itself for this.

The method discover class NativeDiscovery searches the native libraries libvlc and returns true if found, or false if they are not.

To use the above class you will probably also need to instantiate a StandardNativeDiscoveryStrategy.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.