Share your repls and programming experiences

← Back to all posts
MyCMD V 1.6 || A fake OS || BIG UPDATE: Run PYTHON, C++, C, and JAVA
EpicGamer007 (1755)

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!


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: NOtes for future releases. I will be pushing this to a part of MyCMD which will hold unstable featurer which you can turn on.

viraatvv (147)

What about C#? It's like Java.

EpicGamer007 (1755)

@viraatvv, I tried C# but I could not get it to work... I might try again some other time though!

viraatvv (147)

@AbhayBhat ok, it should not be hard because C# is 97% Java

EpicGamer007 (1755)

@viraatvv, It is more like a rip-off of java though

viraatvv (147)

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

EpicGamer007 (1755)

@viraatvv, I feel like Scala's syntaxx is quite different to java. C# and java seem to have closer syntax..

EpicGamer007 (1755)

For people reading this after 6/15/2021, Know that the repl has been deleted because the run language feature was kinda breaking the program.

Jakman (452)

nice. once again im impressed.

EpicGamer007 (1755)

@Jakman, Yay :). Did you try running C?

Jakman (452)

@AbhayBhat not yet. but i know it works ;)