Because Gephi is built on top of the Netbeans Platform, all development needs to take place in Netbeans IDE, which fully integrates all tools for Netbeans Platform developers.
"The NetBeans Platform is a generic framework for Swing applications. It provides the "plumbing" that, before, every developer had to write themselves—saving state, connecting actions to menu items, toolbar items and keyboard shortcuts; window management, and so on."
Gephi software architecture is modular and therefore each feature is split into modules. Modules depend on each other, similar to Java packages. Plugins developers simply create new modules that contains their code, add dependencies to Gephi modules, and distribute their plugins by creating an NBM package. See Gephi APIs documentation to learn more about the API plugins that can be used by modules.
Build Gephi in NetBeans
To develop with Gephi, you need to use the same Netbeans version as the current source code. The latest Netbeans stable released is used by default. However, you also need to update your Netbeans installation to latest updates. To check if Netbeans is up to date, go to Help > Check for Updates in Netbeans menu. If asked to installed JUnit, click Yes.
Always update Netbeans with Administrator privileges.
Open Gephi Project
- Launch Netbeans and Open Project. Find the Gephi source folder on your system. Netbeans automatically recognizes the Netbeans Platform application and puts its icon.
- Uncheck Open Required Projects and click on Open Project.
- Gephi is now opened and appears in the Project list. If you click on modules you see Gephi's module list. By double-clicking you open the module as Nebeans Project, which appears in the project list.
- Right-click on Gephi project and select Run. That command build Gephi and run it.
After code update
- After a code update, please execute Clean and Build all by right-clicking on Gephi project. Then, after any of your changes you can use Build All instead.
Build Gephi from the command line
Go to the gephi folder and type
That will compile and build the gephi package in the dist folder. If you're on a Mac it will also build the gephi.app.
Build error: Cannot compile against a module
H:\Program Files (x86)\NetBeans 6.8\harness\build.xml:165: Cannot compile against a module: H:\Program Files (x86)\NetBeans 6.8\platform11\lib\org-openide-util.jar because of dependency: org.openide.util > 22.214.171.124 BUILD FAILED (total time: 23 seconds)
Netbeans has not been correctly updated because updates were not run with Administrator Privileges. Reinstall Netbeans and perform updates again to fix this issue.
No dependent module org.netbeans.libs.junit4
The JUnit plugin need to be installed in Netbeans. Go to Tools > Plugins and install JUnit plugin.
Since Netbeans 7.0, the JUnit module is not installed by default, but available as a Plugin. Netbeans will propose to install the JUnit either during installation or when opening the Gephi project.