netbeans-8.2-javase-windows.exe
' 95MB).netbeans-8.2-javase-macosx.dmg
' 116MB).NetBeans 8.x.mpkg
', and follow the instructions to install NetBeans. NetBeans will be installed under '/Applications/NetBeans
'..dmg
')./Applications/NetBeans
' folder to trash.sh
file (e.g., 'netbeans-7.x-ml-javase-linux.sh
') in '~/Downloads
'.sh
file to executable and run the sh
file. Open a Terminal: Follow the instructions to install NetBeans. netbeans
' in the NetBeans' bin
directory:FirstProject
' ⇒ In 'Project Location', select a suitable directory to save your works ⇒ Uncheck 'Use Dedicated Folder for Storing Libraries' ⇒ Uncheck 'Create Main class' ⇒ Finish.FirstProject
' ⇒ New ⇒ Java Class (OR choose the 'File' menu ⇒ 'New File..' ⇒ Categories: 'Java', File Types: 'Java Class' ⇒ 'Next').Hello
' ⇒ Delete the content in 'Package' if it is not empty ⇒ 'Finish'.Hello.java
' appears in the editor panel. Enter the following codes: n
(=1*2*3*..*n
). The program, however, has a logical error and produce a wrong answer for n
=20
('The Factorial of 20 is -2102132736
' - a negative number?!).main()
method by clicking on the left-margin of the line containing main()
. A red circle or an inverted Triangle appears in the left-margin indicating a breakpoint is set at that line.main()
method.sout
' and press TAB for 'System.out.println
'; 'psvm
' for 'public static void main(String[] args) { }
' or 'for
i' + tab for a for-loop. To view and configure code template, choose 'Tools' menu ⇒ 'Options' ⇒ 'Editor' ⇒ 'Code Templates'.main()
) in one Java project instead of create a new project for each small program. To run the desired program, on the 'editor' panel ⇒ right-click ⇒ 'Run File'.$User
), select 'Tools' menu ⇒ 'Templates' ⇒ 'Settings'.etcnetbeans.conf
'. Edit the directive 'netbeans_jdkhome
'.lib
' directory containing JAR files ('.jar
') (Java Archive - a single-file package of Java classes) and native libraries ('.dll
', '.lib
' for windows, '.a
', '.so
' for Linux and Mac)..jar
') into a project: Expand the project node ⇒ Right-click on 'Libraries' ⇒ 'Add JAR/Folder..' ⇒ Select the desired JAR file or the folder containing the classes..dll
', '.lib
' (for Windows) and '.a
', '.so
' for Linux/Mac. The directory path of these libraries must be included in JRE's property 'java.library.path
'. This can be done via right-click the project ⇒ Set Configuration ⇒ Customize.. ⇒ Run ⇒ In 'VM options', enter '-Djava.library.path=xxx
', where xxx
is path of the native libraries.CLASSPATH
. The native library directories must be included in JRE's property 'java.library.path
', which normally but not necessarily includes all the paths from the PATH
environment variable. Read 'External JAR files and Native Libraries'.FirstNetBeansGUI
' ⇒ Choose a suitable directory for your 'Project Location' ⇒ Uncheck the 'Create Main class' box ⇒ Finish.FirstNetBeansGUI
' ⇒ 'New' ⇒ 'JFrame Form..' (or 'Others' ⇒ 'Swing GUI Forms' ⇒ 'JFrame Form').NetBeansSwingCounter
' ⇒ Finish.Label
', 'TextField
', and 'Button
' into the design panel.jLabel1
' ⇒ In the 'Properties' panel, enter 'Count' in 'text' (You can also single-click on the jLabel1
to change the text). Right-click on the jLable1
⇒ Change Variable Name ⇒ In 'New Name', enter 'lblCount
'.jTextField1
' ⇒ Change the 'text' to 0, and change the 'Variable Name' to 'tfCount
' ⇒ Resize the text field if necessary.jButton1
' ⇒ Change the 'text' to 'Count', and change the 'Variable Name' to 'btnCount
'.count
(just below the class declaration) as follows: Component
s in the initComponents()
. Note how the JButton
registers an ActionEvent
listener and how an inner class is used as the listener and provide the event handler actionPerformed()
. Also notice that the main()
method uses a Swing's worker to run the GUI on the Event-Dispatcher thread, instead of the main
thread, for thread-safe operations.MySQL Server at hostname:port
' ⇒ Properties, to modify its properties.)<MYSQL_HOME>binmysqld.exe
'; in the 'Arguments', enter '--console
'<MYSQL_HOME>binmysqladmin.exe
', in the 'Arguments', enter '-u root -ppassword shutdown
'.MySQL Server at hostname:port
' appears.jdbc:mysql://hostname:port/defaultDatabase
' appears.jdbc:mysql://hostname:port/defaultDatabase
') ⇒ Choose 'Connect' (if not connected, provided that the MySQL server has been started).$CATALINA_HOMEconftomcat-users.xml
' as follows: HelloServletJSP
' ⇒ In 'Project Location', select a suitable directory to save your works ⇒ Check 'Set as Main Project' ⇒ Next.index.jsp
' is automatically created, which says 'Hello world!'. To execute this JSP, right-click on the project ⇒ 'Run'. The URL is http://localhost:8080/HelloServletJSP/index.jsp
.HelloServletJSP
' ⇒ New ⇒ Servlet.HelloServlet
' ⇒ In 'Package', enter 'hello
' ⇒ Next.HelloServletExample
' ⇒ In 'URL Pattern', enter 'sayhello
' ⇒ Finish.HelloServlet.java
': http://localhost:8080/HelloServletJSP/sayhello
.dist
' directory. You can deploy the web application by dropping the war-file into Tomcat's 'webapps
' directory. Tomcat will automatically unzip the war-file and deploy the application upon startup.HelloJSF20
' ⇒ In 'Project Location', select a suitable directory to save your works ⇒ Check 'Set as Main Project' ⇒ Next.index.xhtml
' JSF page is generated, as follows: To run this facelet, right-click on the project ⇒ Run. HelloJSF20
' ⇒ In 'Options', check 'Facelets' ⇒ Finish.HelloJSF20.xhtml
', enter the following codes: http://localhost:8080/HelloJSF20/HelloJSF20.xhtml
.HelloJSF12
' ⇒ In 'Project Location', select a suitable directory to save your works ⇒ Check 'Set as Main Project' ⇒ Next.WelcomeJSF.jsp
' page is generated, as follows: To run this page, right-click on the project ⇒ Run.HelloJSF12
' ⇒ In 'Options', check 'JSP File (Standard Syntax)' ⇒ Finish.HelloJSF12.jsp
', enter the following codes: http://localhost:8080/HelloJSF12/faces/HelloJSF12.jsp
.libopencv
is missing or has problems with dependencies.opencv_java.dylib
(bridge from Java to the openCV feature libraries) is bundled as a convenience, since currently in the net it is not available ready to install and is a bit complex to create. So only the openCV feature libraries have to be installed by the SikuliX user himself.brew install opencv
libopencv_java.so
is available in your loader path at runtime.