title: java - vlcj gives an error when trying to create a server stream
body: <pre><code>   { String media = "d:\\a.mp4";
      String options = formatHttpStream("127.0.0.1", 5555);
      System.out.println("Streaming '" + media + "' to '" + options + "'"); 
      MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory(args[0]);
      HeadlessMediaPlayer mediaPlayer = mediaPlayerFactory.newHeadlessMediaPlayer();
      mediaPlayer.playMedia(media, options);
      Thread.currentThread().join();
  }
  private static String formatHttpStream(String serverAddress, int serverPort) {
      StringBuilder sb = new StringBuilder(60);
      sb.append(":sout=#duplicate{dst=std{access=http,mux=ts,");
      sb.append("dst=");
      sb.append(serverAddress);
      sb.append(':');
      sb.append(serverPort);
      sb.append("}}");
      return sb.toString();
  }
  </code></pre>
  
  <p>LOG ERROR:</p>
  
  <p>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".</p>
  
  <p>SLF4J: Defaulting to no-operation (NOP) logger implementation</p>
  
  <p>SLF4J: See <a href="http://www.slf4j.org/codes.html#StaticLoggerBinder" rel="nofollow">http://www.slf4j.org/codes.html#StaticLoggerBinder</a> for further details.</p>
  
  <p>Streaming 'd:\a.mp4' to ':sout=#duplicate{dst=std{access=http,mux=ts,dst=127.0.0.1:5555}}' Exception in thread "main" java.lang.RuntimeException: Failed to load the native library.</p>
  
  <p>The error was "Unable to load library 'libvlc': JNA native support (win32-amd64/libvlc.dll) not found in resource path (C:\Users\Adam\http\VLC STREAM\bin;E:\Adam\Desktop\vlcj-3.7.0\jna-3.5.2.jar;E:\Adam\Desktop\vlcj-3.7.0\platform-3.5.2.jar;E:\Adam\Desktop\vlcj-3.7.0\slf4j-api-1.7.10.jar;E:\Adam\Desktop\vlcj-3.7.0\vlcj-3.7.0.jar;E:\Adam\Desktop\apache-logging-log4j.jar)".</p>
  
  <p>The required native libraries are named "libvlc.dll" and "libvlccore.dll".</p>
  
  <p>In the text below  represents the name of the directory containing "libvlc.dll" and "libvlccore.dll"...</p>
  
  <p>There are a number of different ways to specify where to find the native libraries:</p>
  
  <ol>
  <li><p>Include NativeLibrary.addSearchPath("libvlc", ""); at the start of your application code.</p></li>
  <li><p>Include System.setProperty("jna.library.path", ""); at the start of your application code.</p></li>
  <li><p>Specify -Djna.library.path= on the command-line when starting your application.</p></li>
  <li><p>Add  to the system search path (and reboot).</p></li>
  </ol>
  
  <p>If this still does not work, then it may be necessary to explicitly add the native library directory to the operating
  system configuration - e.g. on Linux this might mean setting the LD_LIBRARY_PATH environment variable, or adding
  configuration to the "/etc/ld.so.conf" file or the "/etc/ld.so.conf.d" directory. Of these options, setting
  LD_LIBRARY_PATH is the only one that would not require root privileges.</p>
  
  <p>Finally, it is not possible to mix CPU architectures - it is not possible for a 64-bit Java Virtual Machine to load
  32-bit native libraries.</p>
  
  <p>More information may be available in the log.</p>
  
  <pre><code>at uk.co.caprica.vlcj.binding.LibVlcFactory.create(LibVlcFactory.java:198)
  at uk.co.caprica.vlcj.player.MediaPlayerFactory.&lt;init&gt;(MediaPlayerFactory.java:256)
  at StreamHttp.main(StreamHttp.java:11)  
  </code></pre>
  
  <p>LIB:</p>
  
  <p><a href="http://zapodaj.net/ed5de522e2b3e.jpg.html" rel="nofollow">http://zapodaj.net/ed5de522e2b3e.jpg.html</a></p>
  
  <p>I have no idea</p>