Hey i am using Notepad++ , and i need to know how to run the java applications from the program , i once saw sean.cruels.com using a program similar to Notepad++ , or maybe its an older version , anyway he just used to click Tools > Run Tools > compile , but in this version i cant find it , and i dont know what to do in the Run > Run , i have no idea , if there is a link for the begginer's tutorial in the Notepad++ , please share .
Thanks :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
to execute it it will bring up the console and compile/run it then pause so you can see what happened.
In the case of the compile command it will close it it is successful and pause if there are any compile errors.
You have to make sure you save first though
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've found the way to compile & run Java applications from Notepad++ with just one hotkey.
First of all, go to the directory where you have installed Notepad++ and create a new file called CompileJava.bat
then open it and enter these lines:
@echo off
path=%path%;"<path to your BIN directory of JDK>" @echo on
javac %1
java %2
pause
Save the file and exit.
After that, open Notepad++ and press F5. Fill in the box in the small window that appears with:
then press the Save button, give a name to the shortcut and select the hotkey. Press Ok. Now open a java source and press the hotkey you've selected and you will see your program compiling & running!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey i am using Notepad++ , and i need to know how to run the java applications from the program , i once saw sean.cruels.com using a program similar to Notepad++ , or maybe its an older version , anyway he just used to click Tools > Run Tools > compile , but in this version i cant find it , and i dont know what to do in the Run > Run , i have no idea , if there is a link for the begginer's tutorial in the Notepad++ , please share .
Thanks :)
You have to make sure you save it first otherwise it will Use whatever previous version it finds in the cwd npp is in
if you use :
cmd /c cd "$(CURRENT_DIRECTORY)" && (javac "$(FILE_NAME)" || pause)
to compile it and:
cmd /k cd "$(CURRENT_DIRECTORY)" && java "$(NAME_PART)" && pause && exit || pause && exit
to execute it it will bring up the console and compile/run it then pause so you can see what happened.
In the case of the compile command it will close it it is successful and pause if there are any compile errors.
You have to make sure you save first though
I've found the way to compile & run Java applications from Notepad++ with just one hotkey.
First of all, go to the directory where you have installed Notepad++ and create a new file called CompileJava.bat
then open it and enter these lines:
@echo off
path=%path%;"<path to your BIN directory of JDK>"
@echo on
javac %1
java %2
pause
Save the file and exit.
After that, open Notepad++ and press F5. Fill in the box in the small window that appears with:
$(NPP_DIRECTORY)\CompileJava.bat $(FILE_NAME) $(NAME_PART)
then press the Save button, give a name to the shortcut and select the hotkey. Press Ok. Now open a java source and press the hotkey you've selected and you will see your program compiling & running!
coucou
I think that the easiest to compile under N++ is to use the excellent plugin from Vitalyi : NppExec.
Nico