Is there a way to run a java program from within another java program?

user4111600

Ok, so basically, I wrote a java program that creates new java classes within the same folder as my current program. So far, that part works absolutely fine since it's just basically creating new text files. What I would like to know though, is if there is a way to run those created classes within the program without terminating the running program that created them. So, basically, I want to write a program that creates, edits, and runs java programs. Is there any method, function, API, that helps to do something like this?

Also, I'm using eclipse to do this.

qbit

I am not completelly sure how much this will help in your case since it kinda relies a lot on what are you actually trying to achieve and how. But another option available to you is to call the main method of another class.
For example if you want to pass no arguements you can make a call like class2.main(new String[0]);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Is there a way to call checkstyle from within a Java program?

From Dev

CodeCompiler - Compile and Run Java Program from another Java Program

From Dev

Can you run a java class from within a java program?

From Dev

Java - run a java program with args within a Java program

From Dev

How to run java code from another java program?

From Dev

QBasic: how to run a program from within another program?

From Dev

QBasic: how to run a program from within another program?

From Dev

Want access of textfield from another .java file within a program

From Dev

Compile and Run Scala File within a Java Program

From Dev

How to open/run java program using cmd in another java program

From Dev

Run a Program After Another in One Java File

From Dev

Running a java program located at any location from another java program

From Dev

Run exe from within program

From Dev

Run Java program from Eclipse Builders

From Dev

Powershell inconsistencies when run from Java program

From Dev

Java codes to run program from detected drive

From Dev

Trying to run a Java program from the command prompt

From Dev

DockerFile to run a java program

From Dev

Accessing variables from another Java program

From Dev

call another class from java program

From Java

Add a java program to run within the Android Studio app

From Dev

Running Java Program in another Program gives error

From Dev

Running Java Program in another Program gives error

From Java

Is there a way for eclipse to run a Java program even if there are errors being detected in the project?

From Dev

What is the best way to run a Java program that also has Scala code?

From Dev

Is there a way to get a Java program to run during a certain time of day?

From Dev

Best and short way to run a program if another is not installed

From Dev

How to run a normal Java Program from a Java Applet?

From Dev

Linux commands not working properly from within Java program

Related Related

  1. 1

    Is there a way to call checkstyle from within a Java program?

  2. 2

    CodeCompiler - Compile and Run Java Program from another Java Program

  3. 3

    Can you run a java class from within a java program?

  4. 4

    Java - run a java program with args within a Java program

  5. 5

    How to run java code from another java program?

  6. 6

    QBasic: how to run a program from within another program?

  7. 7

    QBasic: how to run a program from within another program?

  8. 8

    Want access of textfield from another .java file within a program

  9. 9

    Compile and Run Scala File within a Java Program

  10. 10

    How to open/run java program using cmd in another java program

  11. 11

    Run a Program After Another in One Java File

  12. 12

    Running a java program located at any location from another java program

  13. 13

    Run exe from within program

  14. 14

    Run Java program from Eclipse Builders

  15. 15

    Powershell inconsistencies when run from Java program

  16. 16

    Java codes to run program from detected drive

  17. 17

    Trying to run a Java program from the command prompt

  18. 18

    DockerFile to run a java program

  19. 19

    Accessing variables from another Java program

  20. 20

    call another class from java program

  21. 21

    Add a java program to run within the Android Studio app

  22. 22

    Running Java Program in another Program gives error

  23. 23

    Running Java Program in another Program gives error

  24. 24

    Is there a way for eclipse to run a Java program even if there are errors being detected in the project?

  25. 25

    What is the best way to run a Java program that also has Scala code?

  26. 26

    Is there a way to get a Java program to run during a certain time of day?

  27. 27

    Best and short way to run a program if another is not installed

  28. 28

    How to run a normal Java Program from a Java Applet?

  29. 29

    Linux commands not working properly from within Java program

HotTag

Archive