Results 1 to 7 of 7
- 08-07-2007, 06:06 PM #1
Member
- Join Date
- Aug 2007
- Posts
- 1
- Rep Power
- 0
Launch native app inside a JFrame???
I know it's possible to launch an application from java but is it possible to launch an application and have it open as a JInternalFrame or similar inside a JFrame?
Here is the code for executing a command line arg.
public static void execute(String filePath){Could you cast the runtime as a process and add that to an internal frame or jpanel? Not sure how that would work though...:confused:
try{}
(Runtime.getRuntime()).exec(filePath);} catch (IOException e) ;
Anyone have an idea how to do this?
Or if this is even possible?
- 08-07-2007, 07:16 PM #2levent Guest
I think this is impossible..
- 02-24-2011, 01:49 PM #3
Member
- Join Date
- Feb 2011
- Posts
- 3
- Rep Power
- 0
Was going to start a new thread, but then found this one. This is exactly what I am trying to figure out how to do. I haven't used Java and was trying to brush up and learn a little more. I'd like to construct a cross-platform desktop environment I could put on a thumbdrive and run on any system with java installed. I thought, though, that it would be good if I still had access to the programs on the system, but I'd want them to run along side of the ones in my desktop environment layer. Did you ever figure out how to open native applications inside of a JFrame?
- 02-24-2011, 01:58 PM #4
Senior Member
- Join Date
- Feb 2011
- Posts
- 118
- Rep Power
- 0
You probably can display the native app in a Java app, but I'll bet it's more trouble than it's worth. First, you don't want to have your Java app launch the native process; instead, you should use JNI to write a wrapper around your native code so that it can be controlled from within your Java code. Second, you'll have to muck around with java.awt.Toolkit and the java.awt.peer.* classes to create a peer that's hooked up to the native view.
- 02-24-2011, 02:01 PM #5
Member
- Join Date
- Feb 2011
- Posts
- 3
- Rep Power
- 0
Maybe this will be a little easier then: how can I do the same thing, but with a 3rd party .jar or .class file? Meaning how can I open a java program with a gui inside of another java program's JFrame or JDesktopPane?
Last edited by telepresence; 02-24-2011 at 02:05 PM.
- 02-24-2011, 06:42 PM #6
Senior Member
- Join Date
- Feb 2011
- Posts
- 118
- Rep Power
- 0
- 02-25-2011, 03:23 PM #7
Member
- Join Date
- Feb 2011
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
string inside of a xml
By Heather in forum XMLReplies: 2Last Post: 03-28-2008, 05:21 PM -
Class inside an Interface
By $hr!k@nt in forum New To JavaReplies: 1Last Post: 12-21-2007, 10:56 AM -
launch a desktop icon program command
By avaj987 in forum New To JavaReplies: 3Last Post: 08-03-2007, 11:40 AM -
How to call JSP inside Servlet
By Swamipsn in forum Advanced JavaReplies: 0Last Post: 07-31-2007, 12:50 PM -
actionErrors inside of Action
By Jack in forum JDBCReplies: 2Last Post: 07-04-2007, 03:31 AM


LinkBack URL
About LinkBacks


Bookmarks