Must Java be installed to run a Java application?
when you write an app in java, people need to have this java installed to use it开发者_C百科 right?
Sorry if this is a dumb question.
Traroth is correct; your audience needs the Java Runtime in order to use your java.
However, they don't necessarily need that Java, or in other words, they don't need to be using Sun (now Oracle)'s JRE. They could also be using the OpenJDK, or any of the other free java implementations.
Not a silly question at all.
Side Note: As Glenn Nelson stated, there are Ahead-Of-Time compilers, and if you want to go down that route, go ahead. But I'd strongly warn against jumping into that boat, especially if you are just starting off in Java. AOT Java compilers come with their own set of issues.
Yes, you need the Java Runtime to run a java program:
http://java.com/en/download/
There are also executable installers which may bundle Java or download it during the installation. You may also use "Java Web Start".
精彩评论