Results 1 to 7 of 7
- 06-20-2011, 10:06 PM #1
(Help) Run Java Programs With A Java Program?
Hello, I have been wanting to build a program that could run other peoples programs. What I mean is I would build a custom gui that could run things like terminal/console could.
Example:
if someone made a program like this
System.out.println("hello");
it would be able to run that and display it as the label.
- 06-21-2011, 01:35 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
BeanShell is a mature and full featured interpreter for Java.
- 06-21-2011, 01:39 AM #3
- 06-21-2011, 09:59 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
What pbrockway said.
BeanShell will take text and interpret it as Java code.
You should (I've not tried, but I'd be surprised if you couldn't) be able to hook into the output from it, so should be able to get the "Hello World" output from your System.println("Hello World") line.
- 06-21-2011, 08:16 PM #5
There is a java package: import javax.tools.JavaCompiler.*;
that might be of interest.
- 06-22-2011, 02:55 AM #6
Oh ok well I wonder if you could just hook into the output of a terminal or console
- 06-22-2011, 03:04 AM #7
Similar Threads
-
2 Java Programs Interacting Same Computer
By ForeverP in forum Advanced JavaReplies: 6Last Post: 06-20-2011, 11:21 AM -
Websites for java programs?
By Phoenix Dogstar in forum Forum LobbyReplies: 1Last Post: 05-03-2011, 05:11 AM -
How to make 11 java programs into one.
By decgaid06 in forum New To JavaReplies: 6Last Post: 03-29-2011, 06:23 PM -
how to call 2 java programs in one another java program
By renu in forum New To JavaReplies: 8Last Post: 09-30-2010, 06:32 PM -
Putting Java Programs on a DVD
By matt.monkeyboy in forum Advanced JavaReplies: 4Last Post: 04-05-2010, 03:06 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks