Results 1 to 3 of 3
Thread: launching .rm file outside java
- 08-22-2009, 03:52 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 1
- Rep Power
- 0
launching .rm file outside java
hi,
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);
th.start();
}
}
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();
this.tp = 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
- 08-24-2009, 01:24 PM #2
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
First thing you want to do is to at least put a
in your catch block so you see if there are any Exceptions being thrown.Java Code:ex.printStackTrace();
- 09-28-2009, 07:40 PM #3
Member
- Join Date
- Sep 2009
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
Problem launching Java applet
By jacatone in forum Java AppletsReplies: 3Last Post: 01-19-2009, 11:56 PM -
launching Jframe from text field
By crunchymonkey in forum AWT / SwingReplies: 4Last Post: 10-15-2008, 02:50 AM -
Launching applications without an IDE
By this_is_phil in forum New To JavaReplies: 6Last Post: 05-24-2008, 07:54 AM -
Launching Applet from a JSP page
By Java Tip in forum Java TipReplies: 0Last Post: 01-31-2008, 12:53 PM -
Launching imageJ using Java Web Start
By Petar in forum Web FrameworksReplies: 0Last Post: 07-30-2007, 11:37 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks