<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to run Java applications in Notebook++ version  7.9]]></title><description><![CDATA[<p dir="auto">I want to run SimpleCalc.java in Notpad++ ,but it showed error. I have run SimpleCalculator.java under NetbeansProjects directory successfully.  How to debug this running java application process?<br />
<img src="/assets/uploads/files/1629212438995-3d6db83c-341b-4cd5-a40a-2b8757d18dab-image.png" alt="3d6db83c-341b-4cd5-a40a-2b8757d18dab-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/21682/how-to-run-java-applications-in-notebook-version-7-9</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 17:04:02 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/21682.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 Aug 2021 15:02:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to run Java applications in Notebook++ version  7.9 on Wed, 26 Feb 2025 21:27:44 GMT]]></title><description><![CDATA[<p dir="auto">You can also consider using “Java Plugin for Notepad++”:<br />
<a href="https://dominikcebula.github.io/npp-java-plugin/" rel="nofollow ugc">https://dominikcebula.github.io/npp-java-plugin/</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/100085</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100085</guid><dc:creator><![CDATA[dominikcebula]]></dc:creator><pubDate>Wed, 26 Feb 2025 21:27:44 GMT</pubDate></item><item><title><![CDATA[Reply to How to run Java applications in Notebook++ version  7.9 on Wed, 18 Aug 2021 11:43:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a>  I successfully implemented the SimpleCalculator java program( by moving its locations to Documents folder)  under NppExec plugin and obtained the desired result in Notepad++<br />
With regards,<br />
WMD</p>
]]></description><link>https://community.notepad-plus-plus.org/post/69033</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/69033</guid><dc:creator><![CDATA[Dhamnekar Winod]]></dc:creator><pubDate>Wed, 18 Aug 2021 11:43:25 GMT</pubDate></item><item><title><![CDATA[Reply to How to run Java applications in Notebook++ version  7.9 on Tue, 17 Aug 2021 16:17:32 GMT]]></title><description><![CDATA[<p dir="auto">I actually like this name “Notebook++”. It looks fresh!<br />
Sorry for off-topic.😀</p>
]]></description><link>https://community.notepad-plus-plus.org/post/69020</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/69020</guid><dc:creator><![CDATA[mere-human]]></dc:creator><pubDate>Tue, 17 Aug 2021 16:17:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to run Java applications in Notebook++ version  7.9 on Tue, 17 Aug 2021 16:01:36 GMT]]></title><description><![CDATA[<p dir="auto">@Vinod-Dhamnekar ,</p>
<p dir="auto">I gave you the literal contents of the script.  You did not need to manually put in the values.</p>
<p dir="auto"><img src="/assets/uploads/files/1629215907382-6ffb6714-7bfe-4b05-a22d-57897443929c-image.png" alt="6ffb6714-7bfe-4b05-a22d-57897443929c-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/69019</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/69019</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 17 Aug 2021 16:01:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to run Java applications in Notebook++ version  7.9 on Tue, 17 Aug 2021 15:54:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a>  As per your suggestion, I renamed the file to SimpleCalculator.java.<br />
Please tell me in NppExec\execute window, are there any errors in writing command syntax? See the following picture.</p>
<p dir="auto"><img src="/assets/uploads/files/1629215647575-5432406b-af9f-42a5-b46f-a28929d717e3-image.png" alt="5432406b-af9f-42a5-b46f-a28929d717e3-image.png" class=" img-fluid img-markdown" /><br />
with regards,<br />
WMD</p>
]]></description><link>https://community.notepad-plus-plus.org/post/69018</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/69018</guid><dc:creator><![CDATA[Dhamnekar Winod]]></dc:creator><pubDate>Tue, 17 Aug 2021 15:54:56 GMT</pubDate></item><item><title><![CDATA[Reply to How to run Java applications in Notebook++ version  7.9 on Tue, 17 Aug 2021 15:16:45 GMT]]></title><description><![CDATA[<p dir="auto">@Vinod-Dhamnekar ,</p>
<p dir="auto">We cannot be expected to be Java experts and thus debug any Java problems you might be having – as a forum for a text editor, doing programming debugging is off topic.</p>
<p dir="auto">From the Notepad++ standpoint, it appears you are using the NppExec to run <code>javac</code> on the active file.  It’s using the command <code>javac SimpleCalc.java</code> to call that. If you were at a normal command prompt (cmd.exe or powershell), would that command be sufficient?  Do you know what command-line that NetbeansProjects uses when calling your SimpleCalc.java ?</p>
<p dir="auto">I haven’t done any java recently, but a few years ago, I played around with it some.  At that time, I had created a java-compile and java-compile-and-run script for NppExec:</p>
<p dir="auto"><strong>compile:</strong></p>
<pre><code>NPP_SAVE
cd "$(CURRENT_DIRECTORY)"
javac "$(FILE_NAME)"
</code></pre>
<p dir="auto"><strong>compile then run</strong></p>
<pre><code>NPP_SAVE
cd "$(CURRENT_DIRECTORY)"
javac "$(FILE_NAME)"
java -classpath "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
</code></pre>
<p dir="auto">You will notice that I do slightly more than just run <code>javac</code>: first I make sure the file is saved (otherwise <code>javac</code> will see the last-saved version, which might not match what I have open in Notepad++ if I’ve forgotten to save first); second, I change into the same directory that the <code>.java</code> file is saved in (NppExec doesn’t guarantee it will set up its environment in the same folder); then third, I use <code>javac</code> to compile the <code>.java</code> source code.</p>
<p dir="auto">Also, looking briefly at your error message in the console, it says “class SimpleCalculator is public, should be declared in a file named SimpleCalculator.java”, but your file is called <code>SimpleCalc.java</code> .  I don’t remember enough of my java to be sure, but a quick google told me that <a href="https://stackoverflow.com/a/1841878/5508606" rel="nofollow ugc">“the public class name must match the file name. Inner, non public, class names may differ.”</a> – this strongly tells me that you should rename the file <code>SimpleCalculator.java</code>.  Notice, you even say,</p>
<blockquote>
<p dir="auto">I want to run SimpleCalc.java in Notepad++ ,but it showed error. I have run SimpleCalculator.java under NetbeansProjects directory successfully.</p>
</blockquote>
<p dir="auto">You said that you have the file called <code>SimpleCalc.java</code> in Notepad++, but you had a file called <code>SimpleCalculator.java</code> when you ran it under Netbeans.  That lends strength to the suggestion that you should try running it with the filename and the public class name matching.</p>
<p dir="auto">If you have more questions that are specific to Notepad++ and NppExec, feel free to ask follow ups.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/69017</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/69017</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 17 Aug 2021 15:16:45 GMT</pubDate></item></channel></rss>