Notepad ++ compile c ++ and java

Source: Internet
Author: User

NOTEPAD ++:

Run notpad ++ and click "Run-" run ". A pop-up box is displayed.
Compile source code:
Cmd/k gcc-o configure (name_partcmd.exe "$ (FULL_CURRENT_PATH)" & PAUSE & EXIT
Run the executable file generated in the previous step:
Cmd/k "$ (NAME_PART)" & PAUSE & EXIT

Note:
The quotation marks must not be omitted if the file name or path contains spaces.
& PAUSE indicates that after the command is run, the PAUSE waits for the keyboard operation
& EXIT indicates that after the operation is complete, EXIT the running window and return to notepad ++.
The gcc bin directory has already been set in the system environment variables. Otherwise, you must complete the absolute path of the gcc command.

The following describes how to configure NppExec (used to Build and Run java files ):

Build Java
--------------
Cd "$ (CURRENT_DIRECTORY )"
D: "Java" jdk1.6.0 _ 03 "bin" Javac.exe "$ (FILE_NAME )"
Or:

Run Java
-------------
Cd "$ (CURRENT_DIRECTORY )"
D: "Java" jdk1.6.0 _ 03 "bin" java.exe "$ (NAME_PART )"

Build & Run Java
------------------------
Cd "$ (CURRENT_DIRECTORY )"
D: "Java" jdk1.6.0 _ 03 "bin" Javac.exe "$ (FILE_NAME )"
D: "Java" jdk1.6.0 _ 03 "bin" java.exe "$ (NAME_PART )"

My compilation + run: F6 --> (Save the following content as RUN_G ++)

NPP_SAVE // save changes before Compilation
G ++ $ (FILE_NAME) // compile the file
Cmd/k a <in.txt & exit // call the terminal to run the generated file and input data from in.txt.

In addition, I feel that the NPP commands of NOTEPAD ++ are getting more and more powerful, especially when running other commands in the console window.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.