How to run java in notepad
Click "Run" and select "Run" in the submenu.
1. Enter in the run window:
cmd /k javac "$(FULL_CURRENT_PATH)" & echo 编译成功! & PAUSE & EXIT
After clicking Save, set the name in the pop-up window: Name it JAVA Compilation
2. Repeat the above steps to add the method of running JAVA
Input in the run window:
cmd /k java -cp "$(CURRENT_DIRECTORY)" "$(NAME_PART)" & PAUSE & EXIT
After clicking save, set the name in the pop-up window: name it JAVA Run
Related recommendations: "Notepad usage graphic tutorial"
After the addition is successful, it will be displayed under the run menu:
Open the .java file, click "Compile JAVA", and then click "Run JAVA" after success to call the CMD command to run the JAVA code.
It is troublesome to click and run manually. You can set shortcut keys to compile JAVA: Alt Shift B and run JAVA: Alt Shift R
The above is the detailed content of How to run java in notepad. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Java 8 introduces the Stream API, providing a powerful and expressive way to process data collections. However, a common question when using Stream is: How to break or return from a forEach operation? Traditional loops allow for early interruption or return, but Stream's forEach method does not directly support this method. This article will explain the reasons and explore alternative methods for implementing premature termination in Stream processing systems. Further reading: Java Stream API improvements Understand Stream forEach The forEach method is a terminal operation that performs one operation on each element in the Stream. Its design intention is

To open a web.xml file, you can use the following methods: Use a text editor (such as Notepad or TextEdit) to edit commands using an integrated development environment (such as Eclipse or NetBeans) (Windows: notepad web.xml; Mac/Linux: open -a TextEdit web.xml)

Capsules are three-dimensional geometric figures, composed of a cylinder and a hemisphere at both ends. The volume of the capsule can be calculated by adding the volume of the cylinder and the volume of the hemisphere at both ends. This tutorial will discuss how to calculate the volume of a given capsule in Java using different methods. Capsule volume formula The formula for capsule volume is as follows: Capsule volume = Cylindrical volume Volume Two hemisphere volume in, r: The radius of the hemisphere. h: The height of the cylinder (excluding the hemisphere). Example 1 enter Radius = 5 units Height = 10 units Output Volume = 1570.8 cubic units explain Calculate volume using formula: Volume = π × r2 × h (4

Spring Boot simplifies the creation of robust, scalable, and production-ready Java applications, revolutionizing Java development. Its "convention over configuration" approach, inherent to the Spring ecosystem, minimizes manual setup, allo

There are several ways to modify XML formats: manually editing with a text editor such as Notepad; automatically formatting with online or desktop XML formatting tools such as XMLbeautifier; define conversion rules using XML conversion tools such as XSLT; or parse and operate using programming languages such as Python. Be careful when modifying and back up the original files.

Recommended mobile XML reader apps include: Android: XML Viewer and Editor, XML Notepad, XML ParseriOS: XML Viewer, XML Editor, XML Tools

A stack is a data structure that follows the LIFO (Last In, First Out) principle. In other words, The last element we add to a stack is the first one to be removed. When we add (or push) elements to a stack, they are placed on top; i.e. above all the

To solve the problem of Bootstrap Table garbled, you need to ensure that the data source is encoded in UTF-8 format. The steps are as follows: 1. Check the data source encoding as UTF-8; 2. Set the page encoding to UTF-8; 3. Use the data-urlencode attribute; 4. When requesting data using XMLHttpRequest, make sure that the server response is UTF-8 encoding; 5. Convert the data to JSON; 6. Use the encoding conversion library.
