Why do you have to download Java, but not C++

I'm trying to understand how programming languages work. I still don't get why do you need to download certain languages, like Java, Python, Go etc. But this doesn't seem to be the case with C++. I know, that C++ only requires a compiler, but that is the same case with the languages you have to download.

Can anyone give me an easy to understand explanation? Also, do I really don't have to download C++?
Java is, in part, an interpreted language. It takes a run-time program to execute your programs. Java compilers turn your source code into byte codes so the same "compiled" program can (theoretically) run on any computer that has a run-time program.

C/C++ compiles your source code directly into machine language that can run natively in your OS. You compile a C/C++ program for Windows it won't run on Linux or Mac. Your source code has to be compiled specifically for those operating systems.

You need to download a C/C++ compiler to run compiled source code for your OS. No need for a separate run-time module.
You need to download a C/C++ compiler to run compiled source code for your OS. No need for a separate run-time module.


But I technically don't have to download any programming language or compiler, if I just want to compile my code with an online compiler, right?
Last edited on
I know, that these are C++ forums, but I don't have to download Java or other languages, if I want to use an online compiler, right?

They'll have all the support for the language needed on their end, so you're computer won't be running the code.
Last edited on
You do have to download "C++."

Well, a C++ compiler, to be exact. C++ is not a physical "thing," but it is just a standard specification that is implemented by various compiler vendors. Each compiler vendor follows this standard specification (and, optionally, adds additional features outside of the standard) in creating their compiler. The standards compliance is fully dependent on the vendor.
its a simple question with a lot of answers :)
- unix has a bunch of coding tools in default installs, including c, c++, perl, python, java, and more all from install (unless you set it up to exclude them).
- windows has some too: java is needed by so many things now its on a new computer from day 1, and it updates itself from time to time. And you get garbled mess too; my work pc has like 4 versions of java, 3 of them managed by the software that installed them as part of its package, and one global one. It also has a couple of perls and a python or three.
- windows does not come with compilers for C & C++, though. You can use online ones, but you can do that for java and python and all too; you must not have looked for them, they are out there.

you really should download a c++ compiler and some tools (I use notepad ++ and g++ on windows, most people want more than this, I am old and like fast responding minimal setup). A good beginner's setup would be an IDE that can edit code, compile it, and debug it all in one software package. There are several of these, visual studio is one. Because you can choose, you have to download the one(s) you want.

- interpeted languages need to be ON the machine running them, whether that is buried inside your web browser or some other piece of software, whatever. You can't run the software without at least a 'light' copy of the language parser and dev tools!

- compiled languages (C++) don't need that. You can give someone a working program, and it works without needing large parts of the compiler and dev tools to be installed (microsoft bungles this somewhat, note how many installed programs need the redistributable package, when that really, really should be part of the OS and updates to it). A simple command line program, though, like hello world, you can just copy to a machine and run, does not need anything else. Java would need a java VM installed to do that... (there are compiled javas I think, I don't use the language much, but that is an additional feature).
Last edited on
And on the multiple language choices note try:
https://ideone.com/
Last edited on
You do have to download "C++."

Well, a C++ compiler, to be exact. C++ is not a physical "thing," but it is just a standard specification that is implemented by various compiler vendors. Each compiler vendor follows this standard specification (and, optionally, adds additional features outside of the standard) in creating their compiler. The standards compliance is fully dependent on the vendor.


I know, that I need a compiler to run C++ code, but I don't have to download the language itself, right?
When you downloaded your C++ compiler, you didn't get JUST a compiler. You also got some already compiled binary files that contain the standard library and a runtime, and you also got some header files (all the header files defined in the C++ language). You probably also got some other things.


I don't have to download the language itself, right?

Depending on what you mean by "the language itself", either yes or no. If you mean "did I have to download a whole lot of extra files so that I can use the standard library and so that I can make executables that will run on my system", then yes, you did.

"The language itself" doesn't really make any sense. I think you should stop asking about "the language itself"; you might as well ask if you need to download the French language before you can type a French word on your PC. The question just makes no sense.
Last edited on
its not like how you download java and it has to 'install' and integrate itself with your OS, browser, and everything else under the sun.
you install your compiler/IDE/software and you are done. Because of this, its not going to refer to itself as 'installing c++' the way that java and the OS (esp win) refer to 'installing java'. Its more like 'installing eclipse' in java terms.

Don't overthink it; install your selected tools and use them.
but I don't have to download the language itself, right?


As I have said previously, there is no such thing as "the language itself." When you say the "C++ language," all you are referring to is a standard. The C++ language is just a technical standard specification created by a committee in a document form.

This is the "language itself" you are referring to:
http://eel.is/c++draft/

Yes, the C++ language is just a bunch of words in a technical document that lays out the rules of the language. These implementation details are usually just of interest to compiler vendors, who actually implement the language. I could create my own programming language right now (called E++ or something). In order to create it, I would need to make a compiler that understands that language and is able to translate that language into machine code for a particular architecture.

All I would need is to make a compiler that is able to understand my made-up language.

I can't "download" my language anywhere, because I made it up and nobody knows about it except me. My hypothetical "E++" language is just an idea in my head, and I simply wrote a compiler that implements that idea.

It is similar with C++. A standards committee got together and wrote rules and conventions for an idea of a language known as "C++". Together, they formulated a standard of how the language should work, what keywords exist, how it is structured, its type system, etc.

At this point, the language only exists on paper (as an idea/standard) and does not exist yet.

People can begin to use the language when someone actually creates a compiler for the language that takes the rules created by the aforementioned standard and implements it. You could create your own C++ compiler right now and use that to compile C++ code, provided you follow the standard C++ document on the dot.

So that's the distinction. C++ is not a physical, downloadable "thing." It is an idea. And that idea is implemented by compiler vendors in the form of compiler software that is programmed to take in an input source file with C++ code (according to the standard rules of the language) and compile it into machine code.

You could, theoretically, make your own dialect of C++ that changes the convention entirely, but then it wouldn't be C++ anymore because you aren't following the standard. In conclusion, all you need is a compiler (which typically comes with an assembler and linker as well) and a text editor. The compiler already contains the implementation for the abstract idea of the "language"
Last edited on
Topic archived. No new replies allowed.