0
Hello, i'am having a problem, i download the last jdk and now when i try to import classes like scanner i get an error
Problem using intellij and netbeans
8 Respuestas
+ 1
Open command prompt and type:
java -version
javac -version
if you got warning, then check the global environment variable 'path' in advanced system settings. It should contains the full path to the newest JDK.
if you get the newest versions, then the installation is fine. The problems maybe in the IDE.
IntelliJ: Get in file -> settings -> java compiler. It should be 1.8.
Go in file -> project structure -> properties -> project SDK. It should be 1.8 too.
0
Did you insert the environment variable path in the pc .
If you dont the go to c drive find java folder click on jdk the go to bin and copy the address ,the go to properties of the pc and click on advance system settings and click on "environment variable" and add new path name anything and paste the copied address. make sure that if you are compling the program the class name and the saved program file name should be same
0
yes i did that i created in path, i'm reinstalling
0
how did you import it .
use "import java.util.*;" or "import java.util.Scanner;"
0
import java.util.Scanner;
public class Aula {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
}
}
and i don't know the programs i use show me un error i can't program
0
If you are using PC the save then file as Aula.java and in the cmd use javac Aula.java to compile it and use java Aula to run it .
0
thanks nice help, it works
0
you right i change it now, in project Structure that was the problem thank you so much now i can program