Answer the question
In order to leave comments, you need to log in
"This document cannot be saved with a '.java' extension at the end of the name. The '.rtf' extension is required." on macOS. What to do?
Hello!
Trying to save a file on a macbook that I created in a simple TextEdit with the following code:
public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}
Answer the question
In order to leave comments, you need to log in
Use an editor designed for editing code, in the case of java, it is better to use an IDE right away
It won't work out. Source texts for any language are plain text files.
That is text without formatting. The problem is that TextEdit offers
richer formats.
In all formats (in which you can save) there will be garbage, which then will not allow the code to work.
Not everyone needs special IDEs, in case of fixing the file, I can sometimes recommend CotEditor (16 megabytes).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question