+ 1

Can anyone make program in java that can write and run another java program?

Meta programming

13th Jan 2018, 7:39 AM
42126ay
42126ay - avatar
3 Answers
+ 3
you could simply put your code in a string and let one program write it into a file and compile it etc
13th Jan 2018, 7:47 AM
Jeremy
Jeremy - avatar
0
As far as I know, it cannot directly do that, though it may be possible to do it by sending orders to the OS. If you are interested in meta programming, i would suggest you start with non-compiled languages
13th Jan 2018, 1:30 PM
spcan
spcan - avatar
- 1
I mean can my java program compile it to bytecode and run?
13th Jan 2018, 10:49 AM
42126ay
42126ay - avatar