MyCMD V 1.6 || An OS || BIG UPDATE: Run PYTHON, C++, C, and JAVA
AbhayBhat (244)

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

  • 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:

  1. 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.

  1. 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.

  1. 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)

You are viewing a single comment. View All
viraatvv (28)

@AbhayBhat actually, C# is like java's brother who is more into microsoft... Scala is a rip-off of java to me.