Home Java Javagetting Started cmd running 'java -version' prompts that the main class cannot be found or cannot be loaded

cmd running 'java -version' prompts that the main class cannot be found or cannot be loaded

Feb 05, 2020 pm 04:17 PM
cmd main class not found

cmd running 'java -version' prompts that the main class cannot be found or cannot be loaded

Problem:

Input: java -version Error

Error: Main class-version cannot be found or cannot be loaded

(Related video tutorial sharing: java video tutorial)

Solution:

Under system variables, create a new CLASSPATH variable and add

.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;

Note: Add ## at the beginning.; at the end #;Next time you run it, restart cmd and then run java -version.

Related tutorial sharing:

java introductory tutorial

The above is the detailed content of cmd running 'java -version' prompts that the main class cannot be found or cannot be loaded. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to view all IP addresses in LAN using cmd How to view all IP addresses in LAN using cmd Feb 20, 2023 pm 02:22 PM

How to view all IP addresses on the LAN using cmd: 1. Press the "Win+R" shortcut key to open the "Run" window; 2. After entering "CMD" in the "Run" window, press the Enter key; 3. In the open "Command" In the "Prompt" interface, enter the command "arp -a" and press the Enter key; 4. From the returned results, you can see the IP addresses of all computers in the local LAN that communicate with the machine.

How to get BitLocker recovery key from CMD without Microsoft account How to get BitLocker recovery key from CMD without Microsoft account Feb 19, 2024 pm 09:00 PM

This guide will explain how to obtain a BitLocker recovery key to restore access to encrypted data if necessary. BitLocker is a security feature of Windows devices used to protect data from unauthorized access. Recovery keys are a backup method if you can't access your data through regular means. You can obtain a 48-digit BitLocker recovery key without a Microsoft account or via CMD, ensuring you are always able to access and recover your important data. How to get BitLocker recovery key from CMD without Microsoft account? Follow these suggestions to obtain a BitLocker recovery key: Using Command Prompt click Start, search for cmd and click to manage

CMD close port command CMD close port command Nov 21, 2023 am 09:45 AM

The command to use CMD to close a port: 1. Use CMD to close a specific port; 2. Use CMD to close all open ports; 3. Use CMD to open a specific port; 4. Use CMD to open all open ports.

Open Task Manager using command line: Detailed steps Open Task Manager using command line: Detailed steps Dec 29, 2023 pm 10:59 PM

Many friends encounter certain software getting stuck when using their computers. If the computer cannot move, you need to call up the task manager to end the process. So how to use cmd to open the task manager command? Just enter tasksmgr and press enter. The specific solutions are discussed below. Take a look. Steps to use cmd to open the Task Manager command: 1. Press and hold the Win+R keys on the keyboard to open the run window, or click "Start - Run" in the lower left corner, enter cmd in the run window, and press the Enter key to open the cmd window. 2. Enter: C:\Windows\system32\taskmgr.exe, and then press the Enter key to open the task manager. 3. Open CMD

How to fix error: Main class not found or loaded in Java How to fix error: Main class not found or loaded in Java Oct 26, 2023 pm 11:17 PM

This video cannot be played due to a technical error. (Error Code: 102006) This guide provides simple fixes for this common problem and continue your coding journey. We will also discuss the causes of Java errors and how to prevent it in the future. What is "Error: Main class not found or loaded" in Java? Java is a powerful programming language that enables developers to create a wide range of applications. However, its versatility and efficiency come with a host of common mistakes that can occur during development. One of the interrupts is Error: Main class user_jvm_args.txt not found or loaded, which occurs when the Java Virtual Machine (JVM) cannot find the main class to execute a program. This error acts as a roadblock even in

What is the difference between powershell and cmd What is the difference between powershell and cmd Jan 11, 2023 pm 02:23 PM

Differences: 1. When running Cmd, it only takes up less than 1M of memory; when using PowerShell, it takes up about 20M of memory. 2. Cmd does not support syntax highlighting, but PowerShell does. 3. When using Cmd to run some more complex and time-consuming commands, when you drag the command line window at will, the content in the window can still remain the same; but PowerShell cannot. 4. Cmd can only use commands in the .net library, nor can it use Linux commands; PowerShell can.

How to solve the problem that gpedit.msc cannot be found in win10 How to solve the problem that gpedit.msc cannot be found in win10 Dec 29, 2023 pm 03:13 PM

When we use win10 system, in some cases we need to open the gpedit.msc service during operation to perform some operations. But if there is a prompt that the gpedit.msc service cannot be found, for this problem, the editor thinks that the quick startup in the control panel may need to be reset. Another possibility is that you are using the home version of win10. The home version is There is no gpedit.msc function. Let’s take a look at the specific steps with the editor. What to do if gpedit.msc cannot be found in win10? Depending on the situation, the editor provides five solutions for you. The first method is gpedit.msc, which is a command used to open the group policy interface. Only the professional and enterprise versions can use the group policy.

cmdtelnet command is not recognized as an internal or external command cmdtelnet command is not recognized as an internal or external command Jan 03, 2024 am 08:05 AM

The cmd window prompts that telnet is not an internal or external command. This problem must have deeply troubled you. This problem does not appear because there is anything wrong with the user's operation. Users do not need to worry too much. All it takes is a few small steps. Operation settings can solve the problem of cmd window prompting telnet is not an internal or external command. Let’s take a look at the solution to the cmd window prompting telnet is not an internal or external command brought by the editor today. The cmd window prompts that telnet is not an internal or external command. Solution: 1. Open the computer's control panel. 2. Find programs and functions. 3. Find Turn Windows features on or off on the left. 4. Find “telnet client

See all articles