Build jWebSocket with NetBeans

The jWebSocket source code is provided as an Apache Maven project. The benefit here is that you can either compile it with Maven directly or easily import into an IDE like NetBeans, Eclipse or IntelliJ. This section describes how to import and compile the jWebSocket sources in NetBeans. You can download the latest NetBeans version here.


Please install Apache Maven first and follow the instructions on the Maven page in this installation-guide. If you run an older NetBeans version we further recommend to update to the latest NetBeans version (> 6.7) since from this version the Apache Maven support is already integrated into the IDE w/o the need to install and configure any plug-ins.


To compile jWebSocket with NetBeans 6.7+ please follow the following steps.

  1. Download the jWebSocket sources from the download area or directly from our subversion repository and either extract them to a project root folder of your choice or check them out e.g. with the Tortoise Subversion Client. In the following instructions we use c:/svn/jWebSocket/trunk as root folder. Please adjust it accordingly when you are working on a different folder structure.
  2. Please check that the M2_HOME environment variable is refering to your Maven installation folder as described here.
  3. Before you build jWebSocket you need to configure the Maven capabilities in NetBeans Tools/Options dialog.
    Please type the path to the Maven Home directory as follows:
    Configure Maven capabilities in NetBeans
  4. For the rare case that you don't get this dialog Maven is probably not yet activated. To activate Maven create a new project, select category Maven and select "Maven Project with existing POM". NetBeans will activate the Maven support then and you do not need to follow any import procedure - simply open the project as described below.
  5. Select File/Open Project and select the Maven jWebSocket-Parent project in c:/svn/jWebSocket/trunk
    Opening the Apache Maven project jWebSocket-Parent including all required sub-projects
  6. In NetBeans the jWebSocket-Parent project and the required sub-projects are imported:
    jWebSocket-Parent project including all required sub-projects in NetBeans
  7. Now clean and build the entire project by right clicking jWebSocket-Parent and selecting Clean and Build in the pop up menu. Maven should now download all required jars from it's repository. This may take some time at the first run if not yet done with the Maven installation.
  8. After the first clean and build process you will be able to compile each of the jWebSocket modules separately.

Learn more about WebSockets in general, get background information and gain deeper insight!

Join jWebSocket

Wether developer, designer or translator – join the jWebSocket team and grow together with our success!

Copyright © 2013 Innotrade GmbH. All rights reserved.