Mac Java3d Netbeans Download Java Version 8

The NetBeans OpenGL Pack provides an easy to use OpenGL development environment integrated into NetBeans.

Plugin owner:mbien
Website:https://netbeans-opengl-pack.dev.java.net/
Added:2007-08-09
License:GPLv2 + Classpath Exception
Category:
Downloaded:287,344 times
Rating:
4.53, by 22 users

Plugin LogShow log

Versions available

Download size: N/A Last Update: 2009-07-02

What's new in this version

0.5.5 (NetBeans 6.7 only) updated JOGL to verion 1.1.1a (security update)
0.5.4 (NetBeans 6.7 only) here. release notes.
0.5.3: NetBeans 6.5 compatibility, GLSL 1.3 support, GL Quicksearch, new NetBeans Form Designer sample projects. release info

Verifications for NetBeans versions

Plugin is not subject to any verification

Download size: N/A Last Update: 2009-07-02

What's new in this version

0.5.5 (NetBeans 6.7 only) updated JOGL to verion 1.1.1a (security update)
0.5.4 (NetBeans 6.7 only) here. release notes.
0.5.3: NetBeans 6.5 compatibility, GLSL 1.3 support, GL Quicksearch, new NetBeans Form Designer sample projects. release info

Verifications for NetBeans versions

Plugin is not subject to any verification


Introduction


Featurelist:
  • JOGL project templates
  • Ready to run JOGL demos and examples of the OpenGL Programming Guide (also known as Red Book)
  • Integration of JOGL GUI components into the Matisse GUI builder
  • OpenGL Shading Language (GLSL 1.3) editor with compiler error annotation, code folding, syntax highlighting, auto completion and documentation.
  • Easy access to the GLSL compiler and linker of your graphics driver integrated in the editor
  • OpenGL Capabilities Viewer
  • OpenGL Quicksearch
  • Applet/Webstart support

If you have questions, suggestions or bug reports, please use the user mailing list. More information and screenshots can be found on the project page.

happy coding!

[ You have to be logged in to be able to comment. ]

Examcollection

A period of time regarding teaching as well as category presence or perhaps finding out is sealed by means of qualifications in which analyze one's understanding as well as ability to transfer knowledge for you to society immediately after teaching or Examcollection perhaps to a higher a higher level finding out. It's on the other hand extremely tough to do qualifications devoid of effective coaching or perhaps teaching as well as lively taking part regarding learners.

Hair Transplant Banglaore

hair transplant hyderabad

NetBeans OpenGL Pack - plugin detail

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work. What is SEO

geertjan on 7.1

How did you succeeded it .It gives The plugin Editor Library is requested in version >= 1.29.2.8.2 error .Under which circumstances we dont need GLSL editor I want to work on OPen-Gl generally not for o specific topic

Works fine in 7.1

Hi all,
I tried this plugin, or at least a subset of it, in NetBeans IDE 7.1 (on Ubuntu) and have had very positive results:
http://netbeans.dzone.com/nb-getting-started-jogl

jogl

jogl moved and is still active http://jogamp.org/

too sad that this project is dead.

and what about jogl?? i see its dead also.
very sad .

status

the NOGL Pack is a project driven by volunteers, I was the last active maintainer (and probably the main contributor) and had recently no time to continue maintaining it. The last build is compatible with NetBeans 6.7, no new builds are planed so far (at least not from me). Sorry about that.

this project is dead??

anyone know what happen to this project???
why they stop developing opengl to netbeans (java)???

OpenGL plugin on NB 7.0 RC1

Oopsie... need to take back my prior comment... after restarting NB I find that GLSL Editor was not installed :(

OpenGL plugin on NB 7.0 RC1

The complaint since 6.9 has been the following warning when trying to install: (people posting here treated like fatal)
The plugin Editor Library is requested in version >= 1.29.2.8.2 (release version 1) but only 2.7.10.2 (of release version different from 1) was found. The following plugin is affected: GLSL editor
I deselected GLSL Editor and all the netbeans installed without error or warnings.. went to install GLSL Editor and found it was already installed. Everything I've tried so far seems to be working. With 128 Demo/samples, I have a ways to go, until I can say of details. But it does install and appears to work.
A few warnings here and there, this does need some cleanup

Wishlist: OpenGl plugin on NB 7.0

Hopefully a NB 7.0 version would not be too far behind the possible future NB 6.9 version. :-)

GLSL Editor not installing in netbeans 6.9

can the above be corrected or modified or am i stuck with netbeans 6.7 ?

GLSL Editor not installing in netbeans 6.9

can the above be corrected or modified or am i stuck with netbeans 6.7 ?

thanks

I downloaded the openGL pack completly but didn't work.

Provide update for Netbeans 6.9

Hi,
The only thing holding me back from installing Netbeans 6.9 is unavailability of JOGL for this version. I had to uninstall and revert back to 6.8 since the plugin doesn't fully install on 6.9.
Please provide a version that works on 6.9 or some tips to get the current one working on 6.9.
Thanks for the great plugin!

A New Version for Netbeans6.9.1?

Hi,
Thank you for your jogl plugin, It's really very good, I love it so much.
And can you make a version for NetBeans6.9.1?
Best Regards,
Alex

dependency problem installing on 6.9 dev

Hi, I can't install on 6.9 (dev), is there any plan for an updated version anytime soon?
It seems just a dependency but I found no way to force the installation, netbeans installer says:
The plugin Editor Library is requested in version >= 1.29.2.8.2 (release version 1) but only 2.7.10.2 (of release version different from 1) was found. The following plugin is affected: GLSL editor

helpp!

hello to everyone.. I am trying to install the pluging, but I have a similar error as poli´s when i am trying:
Missing required modules for Plugin JOGL OpenGL projects: module net.java.nboglpack>1.4, that is for the demo prjects, but also i have other problems when i try to install other plugins, like: Missing required modules for Plugin JOGL OpenGL projects:module com.sun.gluegen>1.06 and module javax.media.opengl>1.1.1.4 for the installation of JOGL OpenGL projects.
I have the IDE netbeans propieties:
Product Version: NetBeans IDE Dev (Build 200807040101)
Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23
System: Windows XP version 5.1 running on x86; Cp1252; es_ES (nb)
Userdir: C:.......6.5m1
please can anybody help me???

RE: NetBeans 6.7

HI _m4c0_,
v0.5.3 is only supported on NetBeans 6.1 and 6.5. The version in trunk already works on 6.7 but it isn't yet released since 6.7 isn't realeased also;)
I uploaded a dev build for you, feel free to test and provide feedback on the mailing list or with the bug tracker.
https://netbeans-opengl-pack.dev.java.net/servlets/ProjectDocumentList?folderID=9978

NetBeans 6.7

Was it tested on NB 6.7? I couldn't install all NBM files (only project support and libraries)...

Re: mac?

hi jportway,
please file an issue and attach the ide logfile and a screenshot of the error message. I have no mac which makes debugging more difficult for me.
btw: the modules you mentioned are only required for the GLSL editor, everything else should still work thanks, michael

mac?

Hi - I'm also having problem using the plugin on a mac.
When I install the modules and the IDE reboots I get a dialog saying that the editor and compiler modules couldn't be activated. The GL capability viewer is there and seems to work ok, but I can't see anything else. I'm running NB under Java 1.6.

Kevin

It okay now...
I don't know why..

RE: Cannot Integrate with NetBeans Form Designer

Hi Kevin,
sorry, but i can't reproduce this. I tested the new JOGL Aplication GLCanvas and GLPanel project wizzards and both created .form and .java files. Could you file an issue on the issue tracker and attach your ide log file?

Cannot Integrate with NetBeans Form Designer

Hi, I download the plugin and install.
It work quite good, but I cannot use the Form Designer to create GLCanvas / GLPanel like ( https://netbeans-opengl-pack.dev.java.net/resources/JOGL_FormDesigner_Integration2.png )
Besides, I observed that there have a file (SimpleGLCanvas.form), but not SimpleGLCanvas.java ...

RE: NetBeans 6.5 Installation on Win XP SP3

i answered your question on the mailing lists: https://netbeans-opengl-pack.dev.java.net/servlets/ReadMsg?list=users&msgNo=47

NetBeans 6.5 Installation on Win XP SP3

Greetings,
The installation instructions for the NetBeans OpenGL pack
https://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3260
do not appear to work on NetBeans 6.5 on Windows XP SP3. When I try these instructions nothing seems to happen at all. I have a list of 103 available plugins but none of them are JOGL. Adding https://netbeans-opengl-pack.dev.java.net via Tools|Plugins|Settings doesn't seem to have any effect.
Are these the right installation instructions?
https://netbeans-opengl-pack.dev.java.net/servlets/ProjectProcess?tab=2
If not, can someone please point me to the proper instructions?
Thanx.
Paul

Re: Does not work with NB6.5 and Mac Intel

Hi maehem,
you don't need the OpenGL Pack to build wonderland. Please use the wonderland mailing list and website to get support. http://forums.java.net/jive/forum.jspa?forumID=112
http://wiki.java.net/bin/view/Javadesktop/DownloadAndBuildSource
the gl pack requires JDK 6 for most actions (GL Capabilities viewer included). If you still think it is a bug it would be great if you could post the exception to our user mailing list.

Does not work with NB6.5 and Mac Intel

I install the plugins manually (they don't appear in any of the update centers). Restart NB 6.5 and I do see a OpenGL menu item in Tools, but selecting it generates a NB error.
I'm trying to build the Wonderland source which wants OpenGL but one of the source files will not resolve the opengl import reference even with these plugins.

RE:

Thanks for the quick reply!I think the update center was conveniant especially with adding the jogl libraries.
Because when I install the jogl way the dll-s and jar-s doesn't get copied to the dist directory.
It looks like I can't start an empty opengl project only the sample project.

Problems

Can anyone help?

Problems

I tried this plugin a year ago and everything vent fine, I don't remember wich version it was. But now I have problems. So i downloaded from here '1212688694932_netbeans-opengl-pack_0.5.2_fixed.zip'. I tried to follow the guide, but there was no 'net-java-nboglpack-updatecenter.nbm' in it, but instead there were 14 others. So I added all, then installed it. Seven opengl category plugins appeared on the 'installed' tab ( http://www.imageocean.net/images/uq5t5xocoms3ybx54sv3.png ) . On the settings tab the update center didn't appear. Unlike previously jogl didn't get installed, so I downloaded it and installed it the way it said in its guide. Now I am able to compile and run the sample projects (most of it), but if I want to drag and drop one of the two jogl components (GLJpanel, GLCanvas) from the palette then I get an error. ( http://www.imageocean.net/images/tsnv0ub8i6zzb4tltii7.png )

RE: Problems

Hi mzso,
-'Can anyone help?'
I hope so!
-'not all plugins appeared in the plugin manager after install...'
thats fine, since the amount of modules is growing i desided to show only modules which provide 'features' in the list. All other modules e.g utility and library wrappers are hidden.
-'can't find an update center!...'
Thats possible, we do not have an update center anymore ;-). People complianed downloading/updating the pack over the java.net servers was extremly slow in some situations. I tried to get the pack verified in the official update center (this one here) but it is not compatible with java 5 which is a showstopper...
-'drag and drop of jogl components does not work for me'
please create a JOGL project and try again this should work (File | New Project... | OpenGL category)

Thaank you for the help

mbien,
Thank you veery much for yourr help, I am checking the site for more information.
Fred

RE: Help installing

hi fredcrs2, welcome aboard,
# Invoke plugin manager via 'Tools | Plugins'
# Select the 'Downloaded' tab in the plugin manager
# Add the modules
# Follow the wizard.
yes its about JOGL ;) in a nutshell JOGL is _the java binding to the OpenGL api (soon for ES too) with a handfull of utility classes, LWJGL is a 'lightweight java game library' with more game oriented apis. For further questions regarding the NB OpenGL pack I recoment to join the mailing lists, for general graphics and gaming questions javagaming.org. It is far more comfortable to comunicate this way ;).

Help installing

Sorry to ask this here, but I can find the information and I am new to Netbeans.
I am using Linux, Ubuntu 8.04 and have installed Netbeanss 6.1 via aptitude
But I dont know how to install this Netbeans OpenGL pack
It is JOGL right??
If anyone can help me I appreciate.
Thanks
PS: Whats the difference between JOGL and JWLGL ??
Thanks!

RE: RE: please help

I found the problem: under jdk-6u10 doesnt run the installer, just with an older version..
This pack is great! Tank you for the help..

RE: RE: please help

I use NB 6.1 and I dont have installed older version of this pack..

RE: RE: please help

poli, sorry but I can't reproduce this issue. I have started NB 6.1 with a fresh user dir patched to latest version and installed all modules inside the _0.5.2 zip archive. Everything installed fine without dependency problems.

RE: please help

hi poli, would you like to contact me directly or post to the mailing list with additional information like your netbeans version and if you already had installed an older version of the pack? The current version is only tested on NB 6.0 and 6.1. The next version will be probably only available for NB6.5 and later.

please help

hi! I want to install this plugin, but I always become an error:
Missing required modules for Plugin JOGL OpenGL projects:
module com.sun.gluegen > 1.0.6
Missing required modules for Plugin JOGL runtime libraries:
module com.sun.gluegen > 1.0.6
pls somebody help me..

please comment

@annonymous voter ;-)
voting with 0 stars without providing feedback does not help us to improve the pack. Please don't forget to comment esp. if you don't liked it/got exceptions etc.
btw: next version is almost ready

forgive my ignorance but...

would this work for Opengl ES?

Re: forgive my ignorance but...

Hi warsng,
I have no experience with OpenGL ES yet but there is currently a lot of work in progress to make JOGL run on OpenGL ES devices. I am pretty sure we will put it in the pack as soon as there is a stable version available.

Re: Excellent add on !!!

Thank you Alessandro for the kind words!

Excellent add on !!!

This a excellent tools for those looking for OpenGL on Java.
This tool includes all JOGL examples plus Red Book examples.
It amazing !

The Java SE Development Kit 8 lets you develop and deploy Java applications on desktops and servers, as well as in today's demanding embedded environments. Java offers the rich user interface, performance, versatility, portability, and security that today’s applications require. In this video, I'm going to be showing you How to Download and Install Netbeans 8.2 with Java JDK on Windows. NetBeans is an IDE which allows you to write ja.

NetBeans (@ http://netbeans.org) is an open-source Integrated Development Environment (IDE). NetBeans began in 1996 as a Java IDE student project at Charles University in Prague. Sun Microsystems acquired NetBeans in 1999. In 2010, Oracle acquired Sun (and thus NetBeans).

Compared with its rival Eclipse (http://www.elicpse.org) (both are open-source, so I don't know what are they competing for?), NetBeans provides seamless support for Java AWT/Swing, Java ME mobility pack, Java EE, and bundled with an excellent profiler for performance tuning.

If your Java version starts with 1.5 or 1.6, or 1.7 you're fine. If your Java version is 1.4 or less, you need an upgrade. Get the latest version of Java from Oracle. You'll need the JRE (Java Runtime Environment) to run java programs, and the JDK (Java Development Kit) for development. GO TO THE JAVA3D DOWNLOAD PAGE. The solution was to install JDK 8u25 for mac. The JRE is not enough to run Netbeans, so it essentially was using the old JRE which did not support retina well. Here is the link: JDK 8u25 Download. The way to test if you have the right version is by running this in the command line: java -version.

NOTE (2018 Feb 01): NetBeans 8.2 might not work with JDK 9 at this moment. Stick to JDK 8 now, if you want to use NetBeans.

How to Install NetBeans 8.2

How to Install NetBeans on Windows

Step 0: Install JDK

To use NetBeans for Java programming, you need to first install Java Development Kit (JDK). See 'JDK - How to Install'.

Step 1: Download

Download 'NetBeans IDE' installer from http://netbeans.org/downloads/index.html. There are many 'bundles' available. For beginners, choose the 1st entry 'Java SE' (e.g., 'netbeans-8.2-javase-windows.exe' 95MB).

Java
Step 2: Run the Installer

Run the downloaded installer.

How to Install NetBeans on Mac OS X

To use NetBeans for Java programming, you need to first install JDK. Read 'How to install JDK on Mac'.

To install NetBeans:

  1. Download NetBeans from http://netbeans.org/downloads/. Set 'Platform' to 'Mac OS X'. There are many 'bundles' available. For beginners, choose 'Java SE' (e.g., 'netbeans-8.2-javase-macosx.dmg' 116MB).
  2. Double-click the download Disk Image (DMG) file.
  3. Double-click the 'NetBeans 8.x.mpkg', and follow the instructions to install NetBeans. NetBeans will be installed under '/Applications/NetBeans'.
  4. Eject the Disk Image ('.dmg').

You can launch NetBeans from the 'Applications'.

Notes: To uninstall NetBeans, drag the '/Applications/NetBeans' folder to trash.

How to Install NetBeans on Ubuntu Linux

To use NetBeans for Java programming, you need to first install JDK. Read 'How to install JDK on Ubuntu'.

To install NetBeans:

  1. Download NetBeans from http://netbeans.org/downloads/. Choose platform 'Linux (x86/x64)' ⇒ 'Java SE'. You shall receive a sh file (e.g., 'netbeans-7.x-ml-javase-linux.sh') in '~/Downloads'.
  2. Set the downloaded sh file to executable and run the sh file. Open a Terminal: Follow the instructions to install NetBeans.

To start NetBeans, run the script 'netbeans' in the NetBeans' bin directory:

Writing a Hello-world Java Program in NetBeans

Step 0: Launch NetBeans

Launch NetBeans. If the 'Start Page' appears, close it by clicking the 'cross' button next to the 'Start Page' title.

Step 1: Create a New Project

For each Java application, you need to create a 'project' to keep all the source files, classes and relevant resources.

  1. From 'File' menu ⇒ Choose 'New Project...'.
  2. The 'Choose Project' diglog pops up ⇒ Under 'Categories', choose 'Java' ⇒ Under 'Projects', choose 'Java Application' ⇒ 'Next'.
  3. The 'Name and Location' dialog pops up ⇒ Under 'Project Name', enter 'FirstProject' ⇒ In 'Project Location', select a suitable directory to save your works ⇒ Uncheck 'Use Dedicated Folder for Storing Libraries' ⇒ Uncheck 'Create Main class' ⇒ Finish.
Step 2: Write a Hello-world Java Program
  1. Right-click on 'FirstProject' ⇒ New ⇒ Java Class (OR choose the 'File' menu ⇒ 'New File...' ⇒ Categories: 'Java', File Types: 'Java Class' ⇒ 'Next').
  2. The 'Name and Location' dialog pops up ⇒ In 'Class Name', enter 'Hello' ⇒ Delete the content in 'Package' if it is not empty ⇒ 'Finish'.
  3. The source file 'Hello.java' appears in the editor panel. Enter the following codes:
Step 3: Compile & Execute

There is no need to 'compile' the source code in NetBeans explicitly, as NetBeans performs the so-called incremental compilation (i.e., the source statement is compiled as and when it is entered).

To run the program, right-click anywhere in the source (or from the 'Run' menu) ⇒ Run File. Observe the output on the output console.

Notes:

  • You should create a NEW Java project for EACH of your Java application.
  • Nonetheless, NetBeans allows you to keep more than one programs in a project, which is handy for writing toy programs (such as your tutorial exercises). To run a particular program, open and right-click on the source file ⇒ Run File.

Correcting Syntax Error

NetBeans performs incremented compilation, as and when a source line is entered. It marked a source line with syntax error with a RED CROSS. Point your cursor at the RED CROSS to view the error message.

You CANNOT RUN the program if there is any syntax error (marked by a RED CROSS before the filename). Correct all the syntax errors; and RUN the program.

[TODO] Diagram

HINTS: In some cases, NetBeans shows a ORANGE LIGHT-BULB (for HINTS) next to the ERROR RED-CROSS (Line 5 in the above diagram). You can click on the LIGHT-BULB to get a list of HINTS to resolve this particular error, which may or may not work!

SYNTAX WARNING: marked by a orange triangular exclaimation sign. Unlike errors, warnings may or may not cause problems. Try to fix these warnings as well. But you can RUN your program with warnings.

Read the NetBeans Documentation

At a minimum, you SHOULD READ the 'IDE Basics, Getting Started, Java Application', which is accessible via NetBeans's 'HELP' menu ⇒ Help Contents. This will save you many agonizing hours trying to figure out how to do somethings later.

The 'Help' ⇒ 'Online Doc and Support' (@ http://netbeans.org/kb/index.html) contains many articles and tutorial on using NetBeans.

The NetBeans 'Start Page' also provides many useful links to get you started.

Debugging Program in NetBeans

Step 0: Write a Java Program

The following program computes and prints the factorial of 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?!).

Let us use the graphic debugger to debug the program.

Step 1: Set an initial Breakpoint

A breakpoint suspends program execution for you to examine the internal states of the program. Before starting the debugger, you need to set at least one breakpoint to suspend the execution inside the program. Set a breakpoint at 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.

Step 2: Start Debugging

Right click anywhere on the source code ⇒ 'Debug File'. The program begins execution but suspends its operation at the breakpoint, i.e., the main() method.

As illustrated in the following diagram, the highlighted line (also pointed to by a green arrow) indicates the statement to be executed in the next step.

Step 3: Step-Over and Watch the Variables and Outputs

Click the 'Step Over' button (or select 'Step Over' in 'Debug' menu) to single-step thru your program. At each of the step, examine the value of the variables (in the 'Variable' panel) and the outputs produced by your program (in the 'Output' Panel), if any. You can also place your cursor at any variable to inspect the content of the variable.

Single-stepping thru the program and watching the values of internal variables and the outputs produced is the ultimate mean in debugging programs - because it is exactly how the computer runs your program!

Step 4: Breakpoint, Run-To-Cursor, Continue and Finish

As mentioned, a breakpoint suspends program execution and let you examine the internal states of the program. To set a breakpoint on a particular statement, click on the left-margin of that line (or select 'Toggle Breakpoint' from 'Run' menu).

'Continue' resumes the program execution, up to the next breakpoint, or till the end of the program.

'Single-step' thru a loop with a large count is time-consuming. You could set a breakpoint at the statement immediately outside the loop (e.g., Line 11 of the above program), and issue 'Continue' to complete the loop.

Alternatively, you can place the cursor on a particular statement, and issue 'Run-To-Cursor' to resume execution up to the line.

'Finish' ends the debugging session. Always terminate your current debugging session using 'Finish' or 'Continue' till the end of the program.

Other Debugger's Features:

Modify the Value of a Variable

You can modify the value of a variable by entering a new value in the 'Variable' panel. This is handy for temporarily modifying the behaviour of a program, without changing the source code.

Step-Into and Step-Out

To debug a method, you need to use 'Step-Into' to step into the first statement of the method. You could use 'Step-Out' to return back to the caller, anywhere within the method. Alternatively, you could set a breakpoint inside a method.

NetBeans - Tips & Tricks

General Usage

These are the features that I find to be most useful in NetBeans:

Mac Java3d Netbeans Download Java Version 8.2

  1. Maximizing Window (double-click): You can double-click on the 'header' of any panel to maximize that particular panel, and double-click again to restore it back. This is particularly useful for editing source code in full panel.
  2. Code Auto-Complete (or Intelli-Sense) (ctrl-space): Enter a partial statement (e.g., Sys) and press control-space to activate the auto-complete, which displays all the available choices.
  3. Javadoc (ctrl-space, alt-F1): Place the cursor on a method or class, and press ctrl-space to view the javadoc; or right-click ⇒ Show Javadoc (alt-F1) to open it on a browser.
  4. Code Shorthand (tab): For example, you can enter 'sout' and press TAB for 'System.out.println'; 'psvm' for 'public static void main(String[] args) { }' or 'fori' + tab for a for-loop. To view and configure code template, choose 'Tools' menu ⇒ 'Options' ⇒ 'Editor' ⇒ 'Code Templates'.
  5. Formatting Source Code (alt-shift-f): Right-click on the source (or from the 'Source' menu) ⇒ Choose 'Format'. NetBeans will layout your source codes with the proper indents and format. To configure the formatting, choose 'Tools' menu ⇒ 'Options' ⇒ 'Editor' ⇒ 'Formatting'.
    You can also select the section of codes to be formatted, instead of the entire file.
  6. Hints for Correcting Syntax Error: If there is a syntax error on a statement, a red mark will show up on the left-margin on that statement. You could click on the 'light bulb' to display the error message, and also select from the available hints for correcting that syntax error.
  7. Rename (Refactor) (ctrl-r): To rename a variable, place the cursor on that variable, right-click ⇒ 'Refactor' ⇒ 'Rename' ⇒ Enter the new name. All the appearances of that variables in the project will be renamed.
  8. Small Programs: You can keep many small toy programs (with 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'.
  9. Source Toggle Comment: To temporarily comment-off a block of codes, choose 'Source' ⇒ 'Toggle Comment'.
  10. Error Message Hyperlink: Click on an error message will hyperlink to the corresponding source statement.
  11. Command-Line Arguments: To provide command-line arguments to your Java program in NetBeans, right-click on the 'project' ⇒ 'Set as Main Project' ⇒ 'Set Configurations' ⇒ 'Customize...' ⇒ 'Run' ⇒ select the 'Main' class ⇒ type your command-line arguments inside the 'Arguments' field ⇒ choose 'Run' menu ⇒ 'Run Main Project'.
  12. Line Numbers: To show the line numbers, right-click on the left-margin ⇒ 'Show Line Numbers'.
  13. Changing Font Face and Size: Tools ⇒ Options ⇒ Fonts & Colors ⇒ In 'Category', select 'Default' ⇒ In 'Font', choose the font face and size.
  14. Resetting Window View: If you mess up the window view (e.g., you accidentally close a window and cannot find it anymore), you can reset the view via 'Window' menu ⇒ 'Reset Windows'.
  15. Code Templates: For example, when you create a new Java class, NetBeans retrieves the initial contents from the 'Java Class' code template. To configure code templates, select 'Tools' menu ⇒ 'Templates' ⇒ Choose the desired template ⇒ 'Open in Editor'. To set a value of a variable used in the all the code templates (e.g., $User), select 'Tools' menu ⇒ 'Templates' ⇒ 'Settings'.
  16. Displaying Chinese Character: Need to choose a font that support chinese character display, such as 'Monospace', in Tools ⇒ Options ⇒ Fonts & Colors ⇒ Syntax ⇒ default.
  17. Changing the JDK Location: The Netbeans configuration file is located at 'etcnetbeans.conf'. Edit the directive 'netbeans_jdkhome'.
  18. Let me know if you have more tips to be included here.

Java Application Development

  1. Choosing the JDK version for your program: Right-click on your project ⇒ 'Properties' ⇒ 'Source' node ⇒ You can select the JDK level of your project in pull-donw menu 'Source/Binary Format'.
  2. Enabling JDK 7 support: If JDK 7 is already installed in your system, right-click on your Project ⇒ 'Properties' ⇒ 'Source' node ⇒ 'Source/Binary Format' ⇒ Select 'JDK 7'. Also check 'Libraries' ⇒ Java Platform ⇒ JDK 7.
    If JDK 7 is not installed/configured, install JDK 7. Add JDK 7 support to NetBeans via 'Tool' menu ⇒ 'Java Platforms' ⇒ 'Add Platform...'.
  3. Choosing Default Charset: Right-click on your project ⇒ 'Properties' ⇒ 'Source' node ⇒ 'Encoding' ⇒ choose your desired charset for the text-file I/O from the pull-down menu.
  4. Enabling Unicode Support for File Encoding: Right-click on your project ⇒ 'Properties' ⇒ 'Source' node ⇒ 'Encoding' ⇒ choose your Unicode encoding (e.g., UTF-8, UTF-16, UTF-16LE, UTF-16GE) for the text-file I/O.
  5. To include Javadoc/Source: Use 'Library Manager' (select the 'Tools' menu ⇒ 'Libraries'); or 'Java Platform Manager' (select 'Tools' menu ⇒ 'Java Platforms')
  6. Adding External JAR files & Native Libraries ('.dll', '.lib', '.a', '.so'): Many external Java packages (such as JOGL, Java3D, JAMA, etc) are available to extend the functions of JDK. These packages typically provide a '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).
    To include an external JAR file ('.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.
    If the external package contains many JAR files, you could create a user library to contain all the JAR files, and add the library to all the projects that required these JAR files. From 'Tools' menu ⇒ 'Libraries' ⇒ 'New Library...' ⇒ Enter a library name ⇒ Use 'Add JAR/Folder...' to add JAR files into this library.
    Many JAR files come with native libraries in the form of '.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.
    Notes: The JAR files must be included in the 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'.

Writing Java GUI (AWT/Swing) Application in NetBeans

Step 0: Read
  1. Java GUI Application Learning Trail @ http://www.netbeans.org/kb/trails/matisse.html.
  2. Swing Tutorial's 'Learning Swing with the NetBeans IDE' @ http://docs.oracle.com/javase/tutorial/uiswing/learn/index.html.
Step 1: Create a New 'Java Application' Project
  1. Launch NetBeans ⇒ File ⇒ New Project...
  2. Under 'Categories', choose 'Java' ⇒ Under 'Projects', choose 'Java Application' ⇒ Next.
  3. In 'Project Name', enter 'FirstNetBeansGUI' ⇒ Choose a suitable directory for your 'Project Location' ⇒ Uncheck the 'Create Main class' box ⇒ Finish.
Step 2: Write a Java File 'JFrame Form'
  1. Right-click on the project 'FirstNetBeansGUI' ⇒ 'New' ⇒ 'JFrame Form...' (or 'Others' ⇒ 'Swing GUI Forms' ⇒ 'JFrame Form').
  2. In 'Class Name', enter 'NetBeansSwingCounter' ⇒ Finish.
  3. Create the GUI Components visually:
    1. From the 'Platte' panel ⇒ 'Swing Controls' ⇒ Drag and drop a 'Label', 'TextField', and 'Button' into the design panel.
    2. Click on the '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'.
    3. Similarly, for 'jTextField1' ⇒ Change the 'text' to 0, and change the 'Variable Name' to 'tfCount' ⇒ Resize the text field if necessary.
    4. For 'jButton1' ⇒ Change the 'text' to 'Count', and change the 'Variable Name' to 'btnCount'.
  4. Write the event handler for the button by double-clicking the button and enter the following codes:
  5. Create an instance variable count (just below the class declaration) as follows:
Step 3: Compile & Execute

Right-click the source and select 'Run File'.

Step 4: Study the Generated Source Code

Expand the 'Generated Code' and study how the GUI builder declare, allocate and initialize the GUI Components 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.

NetBeans and MySQL

Reference: 'Connecting to a MySQL Database' @ http://netbeans.org/kb/docs/ide/mysql.html.

NetBeans (JavaEE) provides direct support to MySQL server. You can use NetBeans as a GUI client to access a MySQL server, as well as an administrative tool (e.g., starting and stopping the server).

Configuring NetBeans to Support MySQL

From NetBeans 'Window' menu ⇒ Select 'Services'. The 'Services' tab shall appear on the left pane

  1. Right-click on the 'Databases' node ⇒ 'Register MySQL Server'. (If you have already registered a MySQL server, you can right-click on Server node 'MySQL Server at hostname:port' ⇒ Properties, to modify its properties.)
  2. Select the 'Basic Properties' tab, enter the hostname, port number, root user and password.
  3. Select the 'Admin Properties' tab:
    1. Leave the 'Path/URL to admin tool' empty.
    2. In 'Path to start command', enter '<MYSQL_HOME>binmysqld.exe'; in the 'Arguments', enter '--console'
    3. In 'Path to stop command', enter '<MYSQL_HOME>binmysqladmin.exe', in the 'Arguments', enter '-u root -ppassword shutdown'.
  4. A server node 'MySQL Server at hostname:port' appears.
Database Administration - Start/Stop the Server and Create Databases
  1. You can start the MySQL server by right-clicking on the server node ⇒ select 'start'. [There seems to be a problem here. If a 'connection refused: connect' error occurs, enter the password again.]
  2. Once the MySQL server is started and connected, you can see the list of databases by expanding the MySQL server node. You can create a new database by right-clicking on it and choose 'Create Database...'.
Create a new Connection

You need a connection to manipulate data. You can create multiple connections with different users and default databases.

  1. Right-click on the 'Databases' ⇒ 'New Connection...' ⇒ Select the driver 'MySQL Connector/J' ⇒ Next ⇒ Enter hostname, port number, default database, a general username and password ⇒ 'Test Connection' (make sure that MySQL is started) ⇒ Finish.
  2. A connection node 'jdbc:mysql://hostname:port/defaultDatabase' appears.
Manipulating Data via a Connection
  1. Right-click on a connection node (e.g., 'jdbc:mysql://hostname:port/defaultDatabase') ⇒ Choose 'Connect' (if not connected, provided that the MySQL server has been started).
  2. You can expand the connection node to view all the databases.
  3. Expand an existing database. There are three sub-nodes 'Tables', 'View' and 'Procedures'. Right-click on the 'Tables' to create table or execute command. Similarly, right-click on the 'View' and 'Procedures'.
  4. To view/manipulate the records in a table, right-click on the selected table ⇒ You can choose to 'View Data...', 'Execute Command...', etc.
  5. You can right-click on the connection to 'connect' or 'disconnect' from the server.
Create a SQL Script and Run the Script

You can create a SQL script by right-clicking on a project ⇒ New ⇒ 'SQL File'. You can run the script by right-clicking on the SQL script ⇒ 'Run File' ⇒ Select an existing connection (or create a new connection) to run the script. You could also run a single statement (right-click on the statement ⇒ Run Statement) or a selected group of statements (highlight the statements ⇒ Right-click ⇒ Run Selection).

Developing and Deploying Web Application in NetBeans

Read:
  • 'Introduction to Developing Web Applications' @ http://netbeans.org/kb/docs/web/quickstart-webapps.html.
  • More articles in 'Java EE & Java Web Learning Trail' @ http://netbeans.org/kb/trails/java-ee.html.

Web (HTTP) Servers

Configuring Web Server

You could configure the web server via 'Tools' menu ⇒ 'Servers'.

Tomcat Server

To configure Tomcat Server, select 'Tools' menu ⇒ 'Servers' ⇒ click 'Add Servers':

  1. Choose Server: Select the desired Tomcat version ⇒ Next.
  2. Installation and Login Details: In 'Server Location', fill in the Tomcat installation directory ($CATALINA_HOME) ⇒ Enter the username/password of a tomcat user with 'manager' role. You could either check the 'create user if it does not exist' or define the tomcat user in '$CATALINA_HOMEconftomcat-users.xml' as follows:
Running the Web Server

Choose 'Services' ⇒ Expand 'Servers' node ⇒ Right-click on the desired server ⇒ Start/Stop/Restart.

MySQL Database Server

You can also manage the MySQL database server directly from Tomcat. Read 'NetBeans and MySQL' Section.

Mac Java3d Netbeans Download Java Version 8.4

Writing a Hello-World Servlet/JSP Web Application

Create a New Servlet/JSP Project
  1. From 'File' menu ⇒ choose 'New Project...'.
  2. 'Choose Project' ⇒ Under 'Categories', choose 'Java Web' ⇒ Under 'Projects', choose 'Web Application' ⇒ 'Next'.
  3. 'Name and Location' ⇒ In 'Project Name', enter 'HelloServletJSP' ⇒ In 'Project Location', select a suitable directory to save your works ⇒ Check 'Set as Main Project' ⇒ Next.
  4. 'Server and settings' ⇒ Choose your server, or 'add' a new server ⇒ Next.
  5. 'Frameworks' ⇒ Select none for pure servlet/JSP application ⇒ Finish.
Writing a Hello-World JSP

A JSP page called '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.

Mac Java3d Netbeans Download Java Version 8.0

Writing a Hello-World Servlet
  1. Right-click on the project 'HelloServletJSP' ⇒ New ⇒ Servlet.
  2. 'Name and Location' ⇒ In 'Class Name', enter 'HelloServlet' ⇒ In 'Package', enter 'hello' ⇒ Next.
  3. 'Configure Servlet Deployment' ⇒ In 'Servlet Name', enter 'HelloServletExample' ⇒ In 'URL Pattern', enter 'sayhello' ⇒ Finish.
  4. Enter the following codes for 'HelloServlet.java':
  5. To execute the servlet: Right-click on the project ⇒ run ⇒ Change the URL to http://localhost:8080/HelloServletJSP/sayhello.
Generating a WAR-file for a Web Application

A WAR (Web Archive) file is basically a zip file for distributing web application in single file. You can use WinZip or WinRAR to inspect or unzip the war file.

To distribute the project as a war-file, right-click project ⇒ 'Clean and Build'. The war file is created in the '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.

Debugging Web Application

Mac Java3d Netbeans Download Java Version 8.1

The most important reason for using IDE is to use the graphic debugger for debugging the program. You can set a breakpoint in your server-side Java codes, and 'Debug' a web application, similar to a standalone application.

Writing a Hello-world JSF 2.0 Web Application

Create a New JSF 2.0 Project
  1. From 'File' menu ⇒ choose 'New Project...'.
  2. 'Choose Project' ⇒ Under 'Categories', choose 'Java Web' ⇒ Under 'Projects', choose 'Web Application' ⇒ 'Next'.
  3. 'Name and Location' ⇒ In 'Project Name', enter 'HelloJSF20' ⇒ In 'Project Location', select a suitable directory to save your works ⇒ Check 'Set as Main Project' ⇒ Next.
  4. 'Server and settings' ⇒ Choose your server, or 'add' a new server ⇒ Next.
  5. 'Frameworks' ⇒ Check 'JavaServer Faces' ⇒ In 'Libraries', 'Registered Libraries', select 'JSF 2.0' ⇒ Finish.
  6. An 'index.xhtml' JSF page is generated, as follows: To run this facelet, right-click on the project ⇒ Run.
Create a new JSF 2.0 Facelet
  1. Right-click on the project ⇒ New ⇒ 'Other...'
  2. 'Choose File Type' ⇒ Under 'Category', select 'JavaServer Faces' ⇒ Under 'File Type', select 'JSF Page' ⇒ Next.
  3. 'Name and Location' ⇒ In 'File Name', enter 'HelloJSF20' ⇒ In 'Options', check 'Facelets' ⇒ Finish.
  4. In 'HelloJSF20.xhtml', enter the following codes:
  5. To execute the JSF page, right-click on the project ⇒ Run ⇒ Change the URL to http://localhost:8080/HelloJSF20/HelloJSF20.xhtml.

Writing a Hello-world JSF 1.2 Web Application

Create a New JSF 1.2 Project
  1. From 'File' menu ⇒ choose 'New Project...'.
  2. 'Choose Project' ⇒ In 'Categories', choose 'Java Web' ⇒ In 'Projects', choose 'Web Application' ⇒ 'Next'.
  3. 'Name and Location' ⇒ In 'Project Name', enter 'HelloJSF12' ⇒ In 'Project Location', select a suitable directory to save your works ⇒ Check 'Set as Main Project' ⇒ Next.
  4. 'Server and settings' ⇒ choose your server, or 'add' a new server ⇒ Next.
  5. 'Frameworks' ⇒ Check 'JavaServer Faces' ⇒ In 'Libraries', 'Registered Libraries', select 'JSF 1.2' ⇒ Finish.
  6. A 'WelcomeJSF.jsp' page is generated, as follows: To run this page, right-click on the project ⇒ Run.
Create a new JSF 1.2 Page
  1. Right-click on the project ⇒ New ⇒ 'Other...'
  2. 'Choose File Type' ⇒ In 'Category', select 'JavaServer Faces' ⇒ In 'File Type', select 'JSF Page' ⇒ Next.
  3. 'Name and Location' ⇒ In 'File Name', enter 'HelloJSF12' ⇒ In 'Options', check 'JSP File (Standard Syntax)' ⇒ Finish.
  4. In 'HelloJSF12.jsp', enter the following codes:
  5. To execute the JSF page, right-click on the project ⇒ Run ⇒ Change the URL to http://localhost:8080/HelloJSF12/faces/HelloJSF12.jsp.

Debugging Web Applications in NetBeans

You can debug a webapp just like standalone application. For example, you can set breakpoints, single-step through the programs, etc.

REFERENCES & RESOURCES

  • NetBeans mother site @ http://netbeans.org.
  • NetBeans 'Help' menu.

Comments are closed.