I worked on MyCMD quite a bit and I got a new update. I think it's new features SOOOO COOOL so I just HAD to post it.
The new features are... The abilities to
Compile and Run Java!
Run Python!
Compile and Run C++!
Compile and run C!
YUP! ALL OF THESE. Compile and run all these languages all within one place!
Go to Files/Programs/[The Language You Are Writing In]
Create the file.
Then run it directly from MyCMD!
I am planning on adding more languages soon! I also will be working on getting variables and printing working so stay tuned :).
Happy coding!
Note:
For those who want to know how I did it, here are the steps:
Create a process like this:
Process pro = Runtime.getRuntime.exec(command);
Command is a string containing the command to compile or run the program.
Process and Runtime are part of java.lang so no need to import them either.
A process has an error stream(The errors of the program) and output stream(The output of the program) which you can print using a bufferedReader and inputStreamReader
I have a method which prints that.
pro.waitFor(). I do not know what that does but I think it makes it so that nothing will happen until the program has finished running.
And yeah, that is pretty much it :)
Edit:
I STILL HAVE TO WORK ON BEING ABLE TO GET INPUT(From a different file)
Edit: NOtes for future releases. I will be pushing this to a part of MyCMD which will hold unstable featurer which you can turn on.
Hey repl.
It is me again, @AbhayBhat
I worked on MyCMD quite a bit and I got a new update. I think it's new features SOOOO COOOL so I just HAD to post it.
The new features are...
The abilities to
YUP! ALL OF THESE. Compile and run all these languages all within one place!
Go to
Files/Programs/[The Language You Are Writing In]
Create the file.
Then run it directly from MyCMD!
I am planning on adding more languages soon! I also will be working on getting variables and printing working so stay tuned :).
Happy coding!
Note:
For those who want to know how I did it, here are the steps:
Command is a string containing the command to compile or run the program.
Process and Runtime are part of java.lang so no need to import them either.
I have a method which prints that.
pro.waitFor()
. I do not know what that does but I think it makes it so that nothing will happen until the program has finished running.And yeah, that is pretty much it :)
Edit:
I STILL HAVE TO WORK ON BEING ABLE TO GET INPUT(From a different file)
Edit: NOtes for future releases. I will be pushing this to a part of MyCMD which will hold unstable featurer which you can turn on.
@AbhayBhat actually, C# is like java's brother who is more into microsoft... Scala is a rip-off of java to me.