Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that java is not an internal or external command, nor is it a runnable program?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "java is not an internal or external command, nor is it how to solve the error problem of runnable programs." interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn that "java is not an internal or external command, nor is it how to solve the error reporting problem of runnable programs."

Brief introduction

I encountered this problem when learning to use the command line of Java to compile java files.

Windows operating system reported an error

"javac' is not an internal or external command, nor is it a runnable program or batch file." here's how to solve it.

Friends who can't find environment variables and user variables in the comment area.

Post blindly

Solution process

According to the inquiry, it is not installed here (or after it is installed but not set up on the environment variables).

Step 1: download the corresponding JDK on the website (just use JDK)

Click the circle in the image above (if there is an updated version, the operation should be similar)

Install boldly, in fact, this installation is very fast. (during installation, I directly chose the default address (of course, the corresponding address is also possible).

My JAVA file is located at C:\ Program Files\ Java (you can reinstall it if you don't remember)

After installation, you need to configure the environment variables, as follows

In the user variable, add a new variable, named java_home, at C:\ Program Files\ Java\ jdk-10.0.2, and notice the address of my previous JAVA file.

Add a variable to Path. The addresses are C:\ Program Files\ Java\ jdk-10.0.2\ bin

There may still be problems.

After doing the above, it may not work. Here are two solutions.

First, restart cmd

Second, in Path, adjust the location of the two bin folders (move up to the top), then restart cmd

From the second method above, you can see that, in fact, the javac exe file is in this bin folder (that is, the one in jdk).

The effect after the solution

As follows

At this point, I believe you have a deeper understanding of "java is not an internal or external command, nor how to solve the error problem of runnable programs." you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report