Results 1 to 3 of 3
  1. #1
    nonboyx is offline Member
    Join Date
    Aug 2009
    Rep Power

    Default launching .rm file outside java

    there are rm files on tree nodes and i want to open these files via tree event

    jTree1.addTreeSelectionListener(new TreeSelectionListener() {
    public void valueChanged(TreeSelectionEvent e){
    TreePath tp = e.getPath();
    Runnable xxx = new RunReal(tp);
    Thread th = new thread(xxx);

    public class RunReal implements Runnable {
    Runtime r;
    Private String source;
    Private String file;
    TreePath tp;

    public RunReal(TreePath tp) {
    r = Runtime.getRuntime();
    source = realplayer.exe's location;
    file = folder location + tp.getLastPathComponent().toString(); = tp;

    public void run(){
    String[] params = new String[2];
    params[0] = source;
    params[1] = file;
    try {
    Process p = r.exec(params);
    } catch(Exception ex){

    in main()...

    SwingUtilities.invokeLater(new Runnable() {
    public void run(){
    //frame settings

    when i click on a node realplayer launches but when i set the minute from realplayer to a different value realplayer locks. also when i click on different nodes several times realplayer again locks. need help please

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Rep Power


    First thing you want to do is to at least put a
    Java Code:
    in your catch block so you see if there are any Exceptions being thrown.

  3. #3
    deschutron is offline Member
    Join Date
    Sep 2009
    Rep Power


    It looks like RealPlayer might be locking on its own.

    One thing you can try:
    Print the contents of params to System.out, and run Realplayer yourself with those same arguments and see if the error reoccurs. If it does then the error is either caused by the arguments or by RealPlayer.

Similar Threads

  1. Problem launching Java applet
    By jacatone in forum Java Applets
    Replies: 3
    Last Post: 01-20-2009, 12:56 AM
  2. launching Jframe from text field
    By crunchymonkey in forum AWT / Swing
    Replies: 4
    Last Post: 10-15-2008, 03:50 AM
  3. Launching applications without an IDE
    By this_is_phil in forum New To Java
    Replies: 6
    Last Post: 05-24-2008, 08:54 AM
  4. Launching Applet from a JSP page
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-31-2008, 01:53 PM
  5. Launching imageJ using Java Web Start
    By Petar in forum Web Frameworks
    Replies: 0
    Last Post: 07-30-2007, 12:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts