Try to put it in the file eclipse.ini
(will probably be in the Eclipse installation directory) the following line just before the sentence -vmargs
:
-vm %JAVA_HOME%\bin\javaw.exe
If it doesn’t work, instead of javaw.exe
try java.exe
.
Another error may be the environment variables. See my answer to this question: What are the Java-related OS variables for?.
Note: Open the file eclipse.ini
with the notepad (Notepad), and if it is separated into lines, put in a new line -vm
and on the other line the rest.
If command javac
does not work then the error is somewhere related to Java, not Eclipse. Most likely the environment variables. If possible please edit the question showing what happens when typing java --version
and javac --version
.
You can try using Netbeans, it is easy to install and will probably work first. https://netbeans.apache.org/download/nb110/nb110.html
– Tony
At first glance seems to be missing the file
Teste.java
(Ctrl + S).– Piovezan
@Piovezan when executing the code, usually Eclipse already saves the file. But it can be just that.
– NinjaTroll
@yurishimoki When it runs it usually asks if it wants to save unsaved files, but since they are code writing time errors, it might not have run yet. Although the description of red error at the bottom may have been an attempt to execute.
– Piovezan