-2

as it mentioned I installed jdk 11.0.12(lts) in my win10 64bit,and checked java version in cmd, and it's showing my java versions and even tried creating path like java_home and copying path to path, but still (i wrote testing program, I'm like super new(noob)) and created (.java)file, and my that file didn't even showed any icon, like java one neither it got recognized in dir, help me here.

  • What do you mean by "didn't even showed any icon" and "it got recognized in dir"? JDK does not associate your .java files. You need to associate the .java extension files with an IDE of your choice so that you can double click and open the file in that IDE for editing. Also, share your code and how are you running it so that the community can help! – ujjaldey Sep 13 '21 at 15:51
  • *…and even tried creating path like java_home and copying path to path…* `echo %JAVA_HOME%` prints what in cmd.exe? Also what does `echo %PATH%` print? – g00se Sep 13 '21 at 15:57
  • Try installing [netbeans](https://netbeans.apache.org/download/index.html) / [BlueJ](https://www.bluej.org/) and opening your program in either. If netbeans and BlueJ run correctly that means you're java version is installed properly, if not, then uninstall java from programs and install again from the [java website](https://www.java.com/en/). Let me know how it goes. – Alias Cartellano Sep 13 '21 at 16:16
  • @ujjaldey i mean java icon on (.java) files, and I'm only using from cmd not any IDE yet, for testing if it works bt it didn't recognized in cmd. – Natsu21 Sep 13 '21 at 17:12
  • @g00se they both print what I've puted, java/jdk16.0.2 and java/jdk16.0.2/bin, respectively – Natsu21 Sep 13 '21 at 17:20
  • Yea I'm installing IDE, I'm pretty sure java installed properly, only issue why i can't use it on cmd, or rather why cmd cannot recognize/find (.java)extension. – Natsu21 Sep 13 '21 at 17:21
  • You should be able to use the command line. I would personally not use an IDE until you can. It will hide things from you that you need to know and give you a double learning curve – g00se Sep 13 '21 at 21:38
  • @Natsu21 share your code and the command you are running. Why do you care about the icon? – ujjaldey Sep 14 '21 at 04:00

1 Answers1

0

If you want to create your first Java project then just download one good IDE and visit youtube or take a core java course for the same. its really helps you to get the basic.

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 13 '21 at 16:45
  • Oh yes i was following basic tutorial, they checked one basic hello world code from notepad and run the java file in cmd after compiling, but when i created (.java)file it didn't showed in cmd, version is installed properly, i reinstalled and everything. – Natsu21 Sep 13 '21 at 17:16
  • *make sure to select the path where your java file is present and then try If you run via cmd first you need to compile and then your class will be created - 1. use code ( javac .java {shortcut:- Type 2-4 words for your file name and then hit TAB your java file automatically recognized}). 2. If your class will be created then use (java ). Try this, Good Luck – Rishu Chowdhary Sep 15 '21 at 05:45