Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

I've install jdk but (.java)files are not recognizing in cmd

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
as it mentioned I installed jdk 16 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 javac.exe 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.
I even reinstalled/installed other versions too.
I'm super new.

IMG_20210914_072912.jpg
Path
Path
IMG_20210914_073046.jpg
Not recognizing (.java)in cmd
Not recognizing (.java)in cmd
 
Master Rancher
Posts: 1005
27
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does it work when you type 'java MyClass.java" from the directory where MyClass (whatever your source is) is residing in?

I have heard the shebang works if everything is correctly configured on some platforms (not Windows I think) but the normal way to run a 'Single-Source Java Program' from the command line is to say:
'java MyClass.java'
where of course MyClass is the appropriate name.
 
Saloon Keeper
Posts: 8434
71
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does
java -version
show? If it's 16.0.2 you're ok. If not you have to move the last line of your PATH to the very front of the list. As it is now that entry is probably being ignored. You don't want to go around moving your .exe files, you will end up making a real mess that will only be fixable by uninstalling ALL java versions and then doing a reinstall of 16.0.2.
 
Marshal
Posts: 73738
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

What is set as javapath? The first line of the PATH, which I can't now read because of problems with screenshots, looks incorrect. It is likely that javapath;bin would be better.
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic