Note that there are some explanatory texts on larger screens.

plurals
  1. POVLCJ simple application works packaged as jar but not in BlueJ
    text
    copied!<p>This is pretty particular, so I'm hoping someone on here has used VLCJ on windows before.</p> <p>Using Blue J, here is my test class:</p> <pre><code>import java.awt.BorderLayout; import java.awt.Canvas; import java.awt.Frame; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.ImageIcon; import uk.co.caprica.vlcj.player.MediaPlayerFactory; import uk.co.caprica.vlcj.player.embedded.EmbeddedMediaPlayer; import uk.co.caprica.vlcj.test.VlcjTest; /** * An absolute minimum test player. */ public class MinimalTestPlayer extends VlcjTest { public static void main(String[] args) throws Exception { if(args.length != 1) { System.out.println("Specify an MRL to play"); //System.exit(1); } System.setProperty("VLC_PLUGIN_PATH", "&lt;plugins-path&gt;"); Frame f = new Frame("Test Player"); f.setIconImage(new ImageIcon(MinimalTestPlayer.class.getResource("/icons/vlcj-logo.png")).getImage()); f.setSize(800, 600); f.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { System.exit(0); } }); f.setLayout(new BorderLayout()); Canvas vs = new Canvas(); f.add(vs, BorderLayout.CENTER); f.setVisible(true); MediaPlayerFactory factory = new MediaPlayerFactory(); EmbeddedMediaPlayer mediaPlayer = factory.newEmbeddedMediaPlayer(); mediaPlayer.setVideoSurface(factory.newVideoSurface(vs)); mediaPlayer.playMedia("test.mp4");//args[0]); Thread.currentThread().join(); </code></pre> <p>} }</p> <p>This works when I package it to a jar file <strong>without</strong> the need for</p> <pre><code>-Djna.library.path="C:\Program Files\VideoLAN\VLC\plugins" </code></pre> <p>or </p> <pre><code>--plugin-path="C:\Program Files\VideoLAN\VLC\plugins" </code></pre> <p>as shown <a href="http://code.google.com/p/vlcj/source/browse/trunk/vlcj/doc/README.windows?spec=svn112&amp;r=112" rel="nofollow">here.</a></p> <p>just running the jar file from cmd straight up works, so why can't this work in testing in BlueJ?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload