

Was still typing my comment to you replied. Let's say I coded something in C++, what compiler do I need to turn it into an executable? Because Java is just another language right? Why can't I compile Java into an executable?Īlso, are there like specific compilers for every language? Or are there many, many types of compilers. Okay so an executable is a program that could've been coded in ANY language, but it has been turned into a program that can be run on windows. Why do you need Java on your computer to run certain programs? I don't see the point in that. You need a compiler to turn programming language code into a executable. And when you run it, you tell it what files you want to compile or give it a file that has a list of them and any other things you want the compiler to do, like optimize the hell out of the code for you. It is something you download, install, and run like any other application. There are sometimes several for a given language (C++ has many available compilers).Ī compiler is a program that turns programming language code into an executable (though technically, it only turns it into the machine's assembly language, which then its assembled into something to become an executable). You need to install the compilers for these. exe on windows) which requires nothing extra to run. jar files which run with java.exe (which most computers have installed)Ĭ or C++ code compiles to native code normally (so. Some language (such as java) do require specific things to be installed for people to be able to run your compiled code, but they do not require them to have the compiler. You normally run the compiler with your source code files as input, and it generates new files with the desired extension (such as. txt file or code in it and it changes it to a executable? Or is it like a program you need to have on your computer to run certain programs.Īnybody who wants to run a program has to have the compiler then right?Ī compiler takes your source code (human readable) and turns it into executable (machine readable) code.
