Compiling/Running Java Programs in Notepad++?Has anyone successfully and consistantly accomplished this?
Page 1 of 1
13 Replies - 48148 Views - Last Post: 12 January 2012 - 03:50 AM
#1
Compiling/Running Java Programs in Notepad++?
Posted 07 July 2009 - 10:37 AM
Hoping I'm posting this in the correct message board, if not... my appologies!
Thanks!
Replies To: Compiling/Running Java Programs in Notepad++?
#2
Re: Compiling/Running Java Programs in Notepad++?
Posted 25 July 2009 - 07:39 PM
So I am not familiar with notepad++ but I would imagine that it has a scripting ability and so it should not be hard to make a little ANT template.
Even if it does not have a scripting ability, you can pass parameters to a script in python or perl etc to control the overall build.
Building a single file is easy, it when you have to work with projects that it gets a little strange. PN has the idea of projects which can include multiple files -- the support for projects is very simple at this point but a little scripting makes it useable for small projects.
#3
Re: Compiling/Running Java Programs in Notepad++?
Posted 04 August 2009 - 12:18 PM
Cheers
#4
Re: Compiling/Running Java Programs in Notepad++?
Posted 02 September 2009 - 10:32 PM
#5 Guest_WagnerSQ*
Re: Compiling/Running Java Programs in Notepad++?
Posted 19 February 2010 - 07:17 AM
misyel, on 02 September 2009 - 09:32 PM, said:
It's possible !!!!
To compile and execute java class file, just install NPPExec plugin (Plugins --> Plugin Manager --> Show Plugin Manager), restart N++.
Write a simple Hello World java file and press F6. Enter the following code -->
javac "$(FULL_CURRENT_PATH)"
java -classpath "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
OK.
More information at --> http://notepad-plus....k/run-HOWTO.php
Enjoy.
Notepad++ Rocks !!!!!
#6 Guest_Rich*
Re: Compiling/Running Java Programs in Notepad++?
Posted 20 March 2010 - 07:43 AM
WagnerSQ, on 19 February 2010 - 06:17 AM, said:
misyel, on 02 September 2009 - 09:32 PM, said:
It's possible !!!!
To compile and execute java class file, just install NPPExec plugin (Plugins --> Plugin Manager --> Show Plugin Manager), restart N++.
Write a simple Hello World java file and press F6. Enter the following code -->
javac "$(FULL_CURRENT_PATH)"
java -classpath "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
OK.
More information at --> http://notepad-plus....k/run-HOWTO.php
Enjoy.
Notepad++ Rocks !!!!!
Thanks misyel
big help- other directives stated multiple lines; only I might add: no quotes around the java - classpath.... I treated it like it was a regular Dos command line input for java, and it worked...
Thanks again.
#7
Re: Compiling/Running Java Programs in Notepad++?
Posted 20 May 2010 - 07:21 AM
#8
Re: Compiling/Running Java Programs in Notepad++?
Posted 21 May 2010 - 05:31 AM
#9 Guest_javac*
Re: Compiling/Running Java Programs in Notepad++?
Posted 26 September 2010 - 08:19 AM
WagnerSQ, on 19 February 2010 - 06:17 AM, said:
misyel, on 02 September 2009 - 09:32 PM, said:
It's possible !!!!
To compile and execute java class file, just install NPPExec plugin (Plugins --> Plugin Manager --> Show Plugin Manager), restart N++.
Write a simple Hello World java file and press F6. Enter the following code -->
javac "$(FULL_CURRENT_PATH)"
java -classpath "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
OK.
More information at --> http://notepad-plus....k/run-HOWTO.php
Enjoy.
Notepad++ Rocks !!!!!
Sorry for diging out this old thread but I can't run java programs in n++:
I installed the plugin, pressed F6 und inserted your code
javac "$(FULL_CURRENT_PATH)" java -classpath "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
After that I get this error in the console:
javac "D:\Dokumente\Java\HalloWelt.java"
CreateProcess() failed with error code 2:
Das System kann die angegebene Datei nicht finden.
(translated into english like: "the system could not find the specified file")
java -classpath "D:\Dokumente\Java" "HalloWelt"
Process started >>>
java.lang.NoClassDefFoundError: HalloWelt
Caused by: java.lang.ClassNotFoundException: HalloWelt
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: HalloWelt. Program will exit.
Exception in thread "main" <<< Process finished.
================ READY ================
What am I doing wrong?
#10 Guest_JimmyRay*
Re: Compiling/Running Java Programs in Notepad++?
Posted 19 January 2011 - 10:09 PM
cd "$(CURRENT_DIRECTORY)" javac $(FILE_NAME) java $(NAME_PART)
Peace
#11
Re: Compiling/Running Java Programs in Notepad++?
Posted 31 August 2011 - 01:07 PM
javac, on 26 September 2010 - 08:19 AM, said:
I installed the plugin, pressed F6 und inserted your code
javac "$(FULL_CURRENT_PATH)" java -classpath "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
After that I get this error in the console
What am I doing wrong?
Add the JDK/bin directory to execution path. (Set the PATH environment variable in Windows.)
This post has been edited by odeni: 31 August 2011 - 01:09 PM
#12
Re: Compiling/Running Java Programs in Notepad++?
Posted 08 September 2011 - 01:58 AM
cmwise, on 07 July 2009 - 10:37 AM, said:
Hoping I'm posting this in the correct message board, if not... my appologies!
Thanks!
Ans: firstly u need to set path variable
copy java/bin directory path & go to envirnment variable in that system variable edit path variable & pest bin directory path click on ok..
now save note pad file with dot java extention open command prompt
type javac your file name with extention
e.g javac Myprogram.java
here u r program is compile
then type java filename without extention
e.g java Myprogram
press enter u r program is running now
#13
Re: Compiling/Running Java Programs in Notepad++?
Posted 10 January 2012 - 04:10 PM
I have Java installed and it runs fine on the command line.
When I run my code in Notepad++, it compiles fine. It gives me the *.class file.
But it will not run the code. When I press F6 and put in:
cd "$(CURRENT_DIRECTORY)"
javac $(FILE_NAME)
java -classpath "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
I get this:
CD: C:\Documents\Java
Current directory: C:\Documents\Java
javac testApp.java
Process started >>>
<<< Process finished.
java -classpath "C:\Documents\Java" "testApp"
Process started >>>
Error: could not open `C:\Program Files (x86)\Java\jre6\lib\i386\jvm.cfg'
<<< Process finished.
Note: I do not have a Java folder in my Program Files (x86) folder.
My Java folder is in my Program Files folder.
Like I said, the file runs fine on the command line but not in Notepad++.
Thank you.
#14
Re: Compiling/Running Java Programs in Notepad++?
Posted 12 January 2012 - 03:50 AM
|
|

New Topic/Question
Reply



MultiQuote









|