netbeans-10 https://www.e-learn.cn/tag/netbeans-10 zh-hans How to start JavaFX 11 application outside IDE? https://www.e-learn.cn/topic/3682304 <span>How to start JavaFX 11 application outside IDE?</span> <span><span lang="" about="/user/144" typeof="schema:Person" property="schema:name" datatype="">核能气质少年</span></span> <span>2020-07-07 06:50:08</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>I downloaded:<br /> - OpenJDK 11.0.2<br /> - JavaFX SDK 11.0.2<br /> Both files are extracted to path <code>C:/Program Files/Java/</code> </p> <p>OS: Windows 10<br /> IDE: NetBeans 10.0 </p> <p>Paths: </p> <pre><code>JAVA_HOME = C:/Program Files/Java/jdk-11.0.2 PATH_TO_FX = C:/Program Files/Java/javafx-sdk-11.0.2/lib </code></pre> <p>Inside Path system variable add <code>%JAVA_HOME%/bin</code></p> <p>In NetBeans I created Java Application project named JFXDev which contains one package com. Inside com package is one main class with following code: </p> <pre><code>package com; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) { Button btn = new Button(); btn.setText("Say 'Hello World'"); btn.setOnAction(new EventHandler&lt;ActionEvent&gt;() { @Override public void handle(ActionEvent event) { System.out.println("Hello World!"); } }); StackPane root = new StackPane(); root.getChildren().add(btn); Scene scene = new Scene(root, 300, 250); primaryStage.setTitle("Hello World!"); primaryStage.setScene(scene); primaryStage.show(); } public static void main(String[] args) { launch(args); } } </code></pre> <p>Properties of projects are modified:<br /> 1) Libraries -&gt; Modulepath added path C:/Program Files/Java/javafx-sdk-11.0.2/lib<br /> 2) Libraries -&gt; Classpath added path C:/Program Files/Java/javafx-sdk-11.0.2/lib/javafx.controls.jar<br /> 3) Run -&gt; VM Options: added --add-modules=javafx.controls,javafx.fxml </p> <p>When I start application with NetBeans it works perfectly but I was unable to start application from dist folder. I tried following commands in cmd: </p> <ol><li><p>Command: <code>java -jar JFXDev.jar</code> </p> <ul><li>Response: <code>Error: could not find or load main class com.Main</code> </li> </ul></li> <li><p>Command: <code>java --module-path '%PATH_TO_FX% --add-modules=javafx.comntrols JFXDev</code> </p> <ul><li>Response: <code>Error: Could not find or load main class Files/Java/javafx-sdk-11.0.2/lib</code> </li> </ul></li> <li><p>Command: <code>java --module-path %PATH_TO_FX% --add-modules=javafx.comntrols Main</code> </p> <ul><li>Response: <code>Error: Could not find or load main class Files/Java/javafx-sdk-11.0.2/lib</code> </li> </ul></li> <li><p>Command: <code>java --module-path %PATH_TO_FX% --add-modules=javafx.comntrols com.Main</code> </p> <ul><li>Response: <code>Error: Could not find or load main class Files/Java/javafx-sdk-11.0.2/lib</code> </li> </ul></li> <li>Command: <code>java --module-path "C:/Program Files/Java/javafx-sdk-11.0.2/lib/" --add-modules=javafx.comntrols com.Main</code> <ul><li>Response: <code>Error: Could not find or load main class Main</code> </li> </ul></li> </ol><p>Later I added <code>module-info.java</code> file: </p> <pre><code>module JFXDev { requires javafx.controls; exports com; } </code></pre> <p>But it doesn't make any difference.<br /> What I'm doing wrong, any advice or suggestion?</p> <p>I tried steps from https://openjfx.io/openjfx-docs/#install-javafx but I get same error :/</p> <br /><h3>回答1:</h3><br /><h1>"Actual" Answer</h1> <p>Some of those errors you've provided indicate a problem with spaces in your arguments (e.g. <code>C:/Program Files/...</code>). Surround <code>%PATH_TO_FX%</code> with quotes: <code>"%PATH_TO_FX%"</code>. Then, as you said in a comment, the correct command line for you is:</p> <pre class="lang-none prettyprint-override"><code>java -p "%PATH_TO_FX%" --add-modules javafx.controls -jar &lt;path-to-jar-file&gt; </code></pre> <hr /><h1>Rest of Answer</h1> <p>From the information you've provided, it's difficult (for me at least) to tell what exactly the problem is. Instead, I'll give some examples of launching a JavaFX application from the command line, both modular and non-modular.</p> <p>Let's say you have a project with one class—the main class—named <code>com.example.Main</code>. This class extends <code>Application</code> and displays a simple window. Let's also say that, when the code is modular, the module looks like:</p> <pre><code>module app { requires javafx.controls; exports com.example to javafx.graphics; } </code></pre> <p>And your project structure looks like this:</p> <pre class="lang-none prettyprint-override"><code>\---&lt;project-directory&gt; +---out | +---artifacts | | app-1.0.jar (modular or non-modular) | | | \---classes | | module-info.class (when modular) | | | \---com | \---example | Main.class | \---src | module-info.java (when modular) | \---com \---example Main.java </code></pre> <p>Then your command line will look like one of the following (Windows oriented):</p> <h2>Non-modular</h2> <h3>Exploded Directory</h3> <pre class="lang-none prettyprint-override"><code>java -p "%PATH_TO_FX%" --add-modules javafx.controls -cp out\classes com.example.Main </code></pre> <h3>Jar File</h3> <pre class="lang-none prettyprint-override"><code>java -p "%PATH_TO_FX%" --add-modules javafx.controls -jar out\artifacts\app-1.0.jar </code></pre> <p><em>Note: Requires <code>Main-Class</code> attribute in the manifest.</em></p> <h2>Modular</h2> <h3>Exploded Directory</h3> <pre class="lang-none prettyprint-override"><code>java -p "%PATH_TO_FX%;out\classes" -m app/com.example.Main </code></pre> <h3>Jar File</h3> <pre class="lang-none prettyprint-override"><code>java -p "%PATH_TO_FX%;out\artifacts" -m app/com.example.Main </code></pre> <p><em>Or if the Jar was created/updated with <code>--main-class</code></em></p> <pre class="lang-none prettyprint-override"><code>java -p "%PATH_TO_FX%;out\artifacts" -m app </code></pre> <hr /><p><em>Notes:</em></p> <ul><li><em>The above assumes that <code>&lt;project-directory&gt;</code> is the working directory.</em></li> <li><em><code>-p</code> is shorthand for <code>--module-path</code></em></li> <li><em><code>-m</code> is shorthand for <code>--module</code></em></li> <li><em><code>-cp</code> is shorthand for <code>--class-path</code> or <code>-classpath</code></em></li> </ul><br /><br /><p>来源:<code>https://stackoverflow.com/questions/55652036/how-to-start-javafx-11-application-outside-ide</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/java" hreflang="zh-hans">java</a></div> <div class="field--item"><a href="/tag/javafx" hreflang="zh-hans">javafx</a></div> <div class="field--item"><a href="/tag/javafx-11" hreflang="zh-hans">javafx-11</a></div> <div class="field--item"><a href="/tag/netbeans-10" hreflang="zh-hans">netbeans-10</a></div> </div> </div> Mon, 06 Jul 2020 22:50:08 +0000 核能气质少年 3682304 at https://www.e-learn.cn NetBeans 10 JUnit Jar not found https://www.e-learn.cn/topic/3665100 <span>NetBeans 10 JUnit Jar not found</span> <span><span lang="" about="/user/148" typeof="schema:Person" property="schema:name" datatype="">早过忘川 </span></span> <span>2020-06-14 04:35:23</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>I have a new installation of NetBeans 10. Trying to run some initial unit tests I just created, I get the following error:</p> <blockquote> <p>The <code>&lt;classpath&gt;</code> or <code>&lt;modulepath&gt;</code> for <code>&lt;junit&gt;</code> must include junit.jar if not in Ant's own classpath</p> </blockquote> <p>I could probably hack the build script to include <code>junit.jar</code>, but I want to know: what's the right way to fix this?</p> <p>Shouldn't NetBeans come with a version of JUnit already accessible? Should I configure my project differently? How do I add a path to the library?</p> <p>How can I find the classpath for Ant (and what version/binary NetBeans is using)?</p> <p>The project <code>Test Libraries</code> shows that JUnit 5.3.1 is present, I have three Jar files listed there: junit-jipiter-api, junit-jupiter-params, junit-jupiter-engine. But it seems to be not actually found.</p> <p>The project is a standard Java Library (no main class). I didn't add any "extras" or mess with the default project setup that NetBeans uses. Just used the basic setup wizard thing.</p> <hr /><p>Re. a reply from the NetBeans mailing list by Geertjan Wielenga, he pointed me at this thread and reply:</p> <blockquote> <p>Yep...</p> <p>We never got around to implementing JUnit 5 support for Ant based projects in NB 10.</p> <p>John McDonnell</p> </blockquote> <p>http://mail-archives.apache.org/mod_mbox/netbeans-users/201901.mbox/%3cCAAuDyk6WcgLaUDz0dp=4Arr7QGnwWcYey3VOeGojRRMRqVZrFA@mail.gmail.com%3e</p> <p>So I think it's just not going to work. I'll try the suggested reversion to JUnit 4 below.</p> <br /><h3>回答1:</h3><br /><p>I'm running netbeans 10 as well, in xubuntu if that helps. I have no idea what is going on, so I had to revert to junit4. EDIT: To be perfectly clear, ant needs junit.jar which is nowhere to be found in the default netbeans 10 installation. Until someone brings a better solution, revert to junit4:</p> <p>1) in your test libraries, right click and import the junit 4.1.2 ones.</p> <p>2) remove the junit 5.3 ones.</p> <p>3) scrap all the imports in your test file and use the junit4 ones. ie your imports will look like:</p> <pre><code>import static junit.framework.Assert.assertEquals; import org.junit.Test; import org.junit.*; /*import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test;*/ </code></pre> <p>4) scrap the beforeAll and other test tags. Only leave the @Test one.</p> <p>5) save all, close and re-open the project. It will complain that the hamcrest libraries for junit4 are not imported. Allow netbeans to fix it for you.</p> <p>With that done, I was able to test successful and failing tests. I guess when you generate the junit tests with the template generator, it will generate the junit5 ones, so, a bit annoying. But you'll have tests!</p> <br /><br /><p>来源:<code>https://stackoverflow.com/questions/54161715/netbeans-10-junit-jar-not-found</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/java" hreflang="zh-hans">java</a></div> <div class="field--item"><a href="/tag/netbeans" hreflang="zh-hans">netbeans</a></div> <div class="field--item"><a href="/tag/netbeans-10" hreflang="zh-hans">netbeans-10</a></div> </div> </div> Sat, 13 Jun 2020 20:35:23 +0000 早过忘川 3665100 at https://www.e-learn.cn Getting error while creating JavaFX11 application in Apache Netbeans 10 https://www.e-learn.cn/topic/3330940 <span>Getting error while creating JavaFX11 application in Apache Netbeans 10</span> <span><span lang="" about="/user/53" typeof="schema:Person" property="schema:name" datatype="">依然范特西╮</span></span> <span>2020-01-30 05:40:34</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>i am new to java fx and i have downloaded Apache Netbeans 9 which runs on java 11.</p> <p>since java fx is shipped separately, i have downloaded openjfx-11.0.1_SDK and followed steps in this link https://openjfx.io/openjfx-docs/#install-javafx</p> <p>when i try to create java fx application in apache netbeans , i am getting below error </p> <blockquote> <p>Failed to automatically set-up a JavaFX Platform. Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab, enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime. Note: JavaFX SDK can be downloaded from JavaFX website</p> </blockquote> <p>attaching screen shot of netbeans 10.</p> <p></p> <br /><h3>回答1:</h3><br /><p>Setting up the correct Environment For creating JavaFX11 application in Apache Netbeans 10 is Quite A Hustle .... This Link Might Help You in some extent</p> <p>But even after completing these steps you will find even more Errors while running the project... Here is the Possible solution for that scenario</p> <br /><br /><br /><h3>回答2:</h3><br /><p>I had the same issue on Netbeans 11. I solved this issue by following below steps.</p> <ol><li><p>Download the javafx.zip file from the website and after downloading it put it on JDK folder.</p></li> <li><p>First, click on Manage Platforms and then click on Add platform and after clicking on Add platform it will ask of the filename, so give the path till JDK folder.</p></li> <li><p>After giving path click on next and it will ask for platform name and platform sources so in platform sources give the path till src.zip (jdk/lib/src.zip) and press finish button.</p></li> <li><p>After finishing button, you will see the new platform is added with the same name you have given platform name then click on it and go-to sources and click on Add Jar/Folder button and give the path till javafx.zip file which is saved on JDK folder.</p></li> <li><p>After giving path click on add Jar/folder and close it. After closing it click on JavaFX platform and in that you will see the platform name is there click on it and create the project.</p></li> </ol><br /><br /><p>来源:<code>https://stackoverflow.com/questions/54034710/getting-error-while-creating-javafx11-application-in-apache-netbeans-10</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/javafx-11" hreflang="zh-hans">javafx-11</a></div> <div class="field--item"><a href="/tag/netbeans-9" hreflang="zh-hans">netbeans-9</a></div> <div class="field--item"><a href="/tag/netbeans-10" hreflang="zh-hans">netbeans-10</a></div> </div> </div> Wed, 29 Jan 2020 21:40:34 +0000 依然范特西╮ 3330940 at https://www.e-learn.cn How to create Web Application in Apache Netbeans 10? https://www.e-learn.cn/topic/3043383 <span>How to create Web Application in Apache Netbeans 10?</span> <span><span lang="" about="/user/163" typeof="schema:Person" property="schema:name" datatype="">荒凉一梦</span></span> <span>2020-01-01 10:48:26</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>Just I've downloaded Netbeans 10. While creating new project, I'm not getting option 'Web Application'. </p> <p>How to do it? Is there GUI design builder for web applications in Apache Netbeans 10? </p> <br /><h3>回答1:</h3><br /><p>Unlike some earlier NetBeans releases such as 8.2, Apache NetBeans 10.0 does not support web development by default, and that is why you do not see an option for <strong>Java Web</strong> under the <strong>Categories</strong> listed within the <strong>Project Wizard</strong>. See What's Happened to My Favorite NetBeans Plugins? for additional background information.</p> <p>However, web development can still be performed using Apache NetBeans 10.0. You just need to install some plugins first:</p> <ul><li>Go to <strong>Tools &gt; Plugins</strong> and select the <strong>Available Plugins</strong> tab.</li> <li>Ensure that the entries are sorted in ascending <strong>Category</strong> order. Click the <strong>Category</strong> column header to do that if necessary.</li> <li>Scroll down and locate the entries for the <strong>Category</strong> named <strong>Java Web and EE</strong>. </li> <li><p>Under the <strong>Install</strong> column check all of those entries:</p> <p></p></li> <li><p>Click the <strong>Install</strong> button to install those checked <strong>Java Web and EE</strong> plugins.</p></li> <li>Follow the instruction for the <strong>Installer</strong> wizard. The requested plugins will be downloaded and installed, and you will be invited to click <strong>Finish</strong> to restart NetBeans.</li> <li><p>After the restart select <strong>File &gt; New Project...</strong>. There should be new entries in the <strong>Categories</strong> list named <strong>Java Web</strong> and <strong>Java EE</strong>, allowing you to create web and EE applications:</p> <p> </p></li> </ul><p>Troubleshooting:</p> <ul><li>If there are no entries for <strong>Java Web and EE</strong> on the <strong>Available Plugins</strong> tab then update your question with a screen shot of <strong>Tools &gt; Plugins &gt; Settings</strong>.</li> <li>If the plugins appear to install correctly but <strong>Java Web</strong> and <strong>Java EE</strong> are still not available under the <strong>Project Wizard</strong> after a restart then update your question with: <ul><li>A screen shot of <strong>Tools &gt; Plugins &gt; Installed</strong>, with the <strong>User Installed Plugins</strong> entry selected.</li> <li>The recent content of the NetBeans log (<strong>View &gt; IDE Log</strong>).</li> </ul></li> </ul><br /><br /><br /><h3>回答2:</h3><br /><p>If you're not seeing the Java Web and EE categories, you need to go into Settings and make sure Netbeans 8.2 Plugin Portal is checked like in the image below.</p> <p></p> <br /><br /><p>来源:<code>https://stackoverflow.com/questions/54079789/how-to-create-web-application-in-apache-netbeans-10</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/web" hreflang="zh-hans">web</a></div> <div class="field--item"><a href="/tag/netbeans-10" hreflang="zh-hans">netbeans-10</a></div> </div> </div> Wed, 01 Jan 2020 02:48:26 +0000 荒凉一梦 3043383 at https://www.e-learn.cn Apache Netbeans 10 CVS plugin not available? https://www.e-learn.cn/topic/2287825 <span>Apache Netbeans 10 CVS plugin not available?</span> <span><span lang="" about="/user/174" typeof="schema:Person" property="schema:name" datatype="">旧街凉风</span></span> <span>2019-12-11 17:19:32</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>i finally upgraded to Apache Netbeans 10 (from 8.2) and wanted to install the CVS plugin as usual using the menus <code>Tools-&gt;Plugins-&gt;Available Plugins</code></p> <p>However, i cannot seem to find/access the plugin. In Settings i activated the Netbeans 8.2 Plugin Portal, however i still have (after updating) only 31 Available Plugins and 9 Installed. </p> <p>When i try to open a CVS versioned project, netbeans recognizes this and tries to automatically get CVS - but the download fails. </p> <p>So, how can i install the CVS Plugin in Apache Netbeans 10?</p> <br /><h3>回答1:</h3><br /><ul><li><p>Select <strong>Tools &gt; Plugins &gt; Settings</strong></p></li> <li><p>Add the Update Center which includes the CVS plugin to the <em>Configuration of Update Centers</em> list:</p> <ul><li><p>Click the <strong>Add</strong> button to open the <strong>Update Customizer Center</strong> dialog.</p></li> <li><p>In the <strong>Name</strong> field enter some descriptive value (e.g. <strong>Latest Development Build</strong>), and in the <strong>URL</strong> field enter this URL: <code>http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz</code></p></li> <li><p>Click <strong>OK</strong> to close the <strong>Update Customizer Center</strong> dialog, and return to the <strong>Settings</strong> tab.</p></li> </ul></li> <li><p>For that new entry named <strong>Latest Development Build</strong>, check its <strong>Active</strong> checkbox:</p> <p></p></li> <li><p>Select <strong>Tools &gt; Plugins &gt; Available Plugins</strong></p></li> <li><p>Enter <strong><em>CVS</em></strong> in the search field and the CVS plugin should be listed:</p> <p></p></li> <li><p>Check the <strong>Install</strong> checkbox for the CVS plugin, click the <strong>Install</strong> button and follow the wizard's instructions.</p></li> </ul><p>After that you should be able to use CVS without needing to restart NetBeans:</p> <ul><li>Select <strong>Tools &gt; Options &gt; Team &gt; Versioning</strong> to configure CVS.</li> <li>Select a project in the <strong>Projects</strong> panel, right click and select <strong>Versioning &gt; Import into CVS Repository</strong> to import a project into CVS.</li> </ul><br /><br /><p>来源:<code>https://stackoverflow.com/questions/54725150/apache-netbeans-10-cvs-plugin-not-available</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/java" hreflang="zh-hans">java</a></div> <div class="field--item"><a href="/tag/netbeans" hreflang="zh-hans">netbeans</a></div> <div class="field--item"><a href="/tag/netbeans-10" hreflang="zh-hans">netbeans-10</a></div> </div> </div> Wed, 11 Dec 2019 09:19:32 +0000 旧街凉风 2287825 at https://www.e-learn.cn Ubuntu 18.04/Netbeans 10.0 Fatal Error: Unable to find package java.lang in classpath or bootclasspath https://www.e-learn.cn/topic/2277093 <span>Ubuntu 18.04/Netbeans 10.0 Fatal Error: Unable to find package java.lang in classpath or bootclasspath</span> <span><span lang="" about="/user/170" typeof="schema:Person" property="schema:name" datatype="">戏子无情</span></span> <span>2019-12-11 15:26:22</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><h3>问题</h3><br /><p>First, I work on Ubuntu 18.04 with netbeans 10.0 and open JDK 11. When I create a basic new project, alerts directly triggered.</p> <pre><code>cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath </code></pre> <p>I tried to uninstall/install netbeans and openJKD 11 but nothing work.</p> <p>I looked on lots of forums discussions with this kind of problem but nothing work. For information, </p> <pre><code>xxx:~$java -version </code></pre> <p>gives </p> <pre class="lang-sh prettyprint-override"><code>openjdk version "11.0.3" 2019-04-16 OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1) OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing) </code></pre> <p>i don't know what i'm missing, if someone can help me...</p> <br /><h3>回答1:</h3><br /><p>You have NetBeans <strong>10</strong> version, but your JDK is version <strong>11</strong>. So try use NetBeans <strong>11</strong> version... or download/install JDK <strong>10</strong> (the same as NetBeans).</p> <br /><br /><br /><h3>回答2:</h3><br /><p>Configure the platform, it seems that installers for Ubuntu 18.04 missed the path to Java platform JDK11. </p> <p>Add a new definition pointing to the right folders.</p> <p>Platform Name: JDK 11 Platform Folder: /usr/lib/jvm/default-java</p> <p>Then check the Sources/Source/Binary Format that must be configured to 11.</p> <br /><br /><p>来源:<code>https://stackoverflow.com/questions/56952163/ubuntu-18-04-netbeans-10-0-fatal-error-unable-to-find-package-java-lang-in-clas</code></p></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/ubuntu" hreflang="zh-hans">Ubuntu</a></div> <div class="field--item"><a href="/tag/netbeans" hreflang="zh-hans">netbeans</a></div> <div class="field--item"><a href="/tag/ubuntu-1804" hreflang="zh-hans">ubuntu-18.04</a></div> <div class="field--item"><a href="/tag/javalang" hreflang="zh-hans">java.lang</a></div> <div class="field--item"><a href="/tag/netbeans-10" hreflang="zh-hans">netbeans-10</a></div> </div> </div> Wed, 11 Dec 2019 07:26:22 +0000 戏子无情 2277093 at https://www.e-learn.cn How to create Web Application in Apache Netbeans 10? https://www.e-learn.cn/topic/1537742 <span>How to create Web Application in Apache Netbeans 10?</span> <span><span lang="" about="/user/64" typeof="schema:Person" property="schema:name" datatype="">久未见</span></span> <span>2019-12-04 07:37:58</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><div class="alert alert-danger" role="alert"> <p>Just I've downloaded Netbeans 10. While creating new project, I'm not getting option 'Web Application'. </p> <p>How to do it? Is there GUI design builder for web applications in Apache Netbeans 10? </p> </div><div class="panel panel-info"><div class="panel-heading"></div><div class="panel-body"> <p>Unlike some earlier NetBeans releases such as 8.2, Apache NetBeans 10.0 does not support web development by default, and that is why you do not see an option for <strong>Java Web</strong> under the <strong>Categories</strong> listed within the <strong>Project Wizard</strong>. See <a href="https://blogs.apache.org/netbeans/entry/what-s-happened-to-my" rel="nofollow">What's Happened to My Favorite NetBeans Plugins?</a> for additional background information.</p> <p>However, web development can still be performed using Apache NetBeans 10.0. You just need to install some plugins first:</p> <ul><li>Go to <strong>Tools &gt; Plugins</strong> and select the <strong>Available Plugins</strong> tab.</li> <li>Ensure that the entries are sorted in ascending <strong>Category</strong> order. Click the <strong>Category</strong> column header to do that if necessary.</li> <li>Scroll down and locate the entries for the <strong>Category</strong> named <strong>Java Web and EE</strong>. </li> <li><p>Under the <strong>Install</strong> column check all of those entries:</p> <p><a href="https://i.stack.imgur.com/AvErT.png" rel="nofollow"><p></p><p></p><img class="b-lazy" data-src="https://www.eimg.top/images/2020/03/15/4c90ef87b07692083733e193ad26edeb.png" data-original="https://www.eimg.top/images/2020/03/15/4c90ef87b07692083733e193ad26edeb.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /><p></p><p></p></a></p></li> <li><p>Click the <strong>Install</strong> button to install those checked <strong>Java Web and EE</strong> plugins.</p></li> <li>Follow the instruction for the <strong>Installer</strong> wizard. The requested plugins will be downloaded and installed, and you will be invited to click <strong>Finish</strong> to restart NetBeans.</li> <li><p>After the restart select <strong>File &gt; New Project...</strong>. There should be new entries in the <strong>Categories</strong> list named <strong>Java Web</strong> and <strong>Java EE</strong>, allowing you to create web and EE applications:</p> <p><a href="https://i.stack.imgur.com/sX6BN.png" rel="nofollow"><p></p><p></p><img class="b-lazy" data-src="https://www.eimg.top/images/2020/03/15/7835d25520b79193db5f2ec9388ea876.png" data-original="https://www.eimg.top/images/2020/03/15/7835d25520b79193db5f2ec9388ea876.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /><p></p><p></p></a> </p></li> </ul><p>Troubleshooting:</p> <ul><li>If there are no entries for <strong>Java Web and EE</strong> on the <strong>Available Plugins</strong> tab then update your question with a screen shot of <strong>Tools &gt; Plugins &gt; Settings</strong>.</li> <li>If the plugins appear to install correctly but <strong>Java Web</strong> and <strong>Java EE</strong> are still not available under the <strong>Project Wizard</strong> after a restart then update your question with: <ul><li>A screen shot of <strong>Tools &gt; Plugins &gt; Installed</strong>, with the <strong>User Installed Plugins</strong> entry selected.</li> <li>The recent content of the NetBeans log (<strong>View &gt; IDE Log</strong>).</li> </ul></li> </ul></div></div><div class="panel panel-info"><div class="panel-heading"></div><div class="panel-body"> <p>If you're not seeing the Java Web and EE categories, you need to go into Settings and make sure Netbeans 8.2 Plugin Portal is checked like in the image below.</p> <p><a href="https://i.stack.imgur.com/SZcie.png" rel="nofollow"><p></p><p></p><img class="b-lazy" data-src="https://www.eimg.top/images/2020/03/15/bdba71570a23f658647032719bb4d6f7.png" data-original="https://www.eimg.top/images/2020/03/15/bdba71570a23f658647032719bb4d6f7.png" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /><p></p><p></p></a></p> </div></div><div class="alert alert-warning" role="alert"><p>来源:<code>https://stackoverflow.com/questions/54079789/how-to-create-web-application-in-apache-netbeans-10</code></p></div></div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field--label">标签</div> <div class="field--items"> <div class="field--item"><a href="/tag/web" hreflang="zh-hans">web</a></div> <div class="field--item"><a href="/tag/netbeans-10" hreflang="zh-hans">netbeans-10</a></div> </div> </div> Tue, 03 Dec 2019 23:37:58 +0000 久未见 1537742 at https://www.e-learn.cn