Share your repls and programming experiences

← Back to all posts
MyCMD V 1.6 || An OS || BIG UPDATE: Run PYTHON, C++, C, and JAVA
AbhayBhat (257)

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)

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.

Commentshotnewtop
viraatvv (68)

What about C#? It's like Java.

AbhayBhat (257)

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

viraatvv (68)

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

AbhayBhat (257)

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

viraatvv (68)

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

AbhayBhat (257)

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

Jakman (380)

nice. once again im impressed.

AbhayBhat (257)

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

Jakman (380)

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