Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Launching Cytoscape from Eclipse
How to Launch (and Debug, and Profile) Cytoscape from Eclipse
There are two ways to launch cytoscape from inside eclipse.
- As an external tool
- Easier to set up, more cumbersome to launch, slower to debug, some minor limitations, recommended for app developers
- Directly using a regular launch configuration
- Harder to set up, easier to launch, supports full-speed debug, supports YourKit profiler launch, recommended for core developers
External Tool Launch Configuration
Instructions are available on the App Dev Ladder: https://github.com/cytoscape/cytoscape/wiki/Launch-and-Debug-from-Eclipse
Regular Launch Configuration
These instructions work on Mac and should work on Linux. Windows is probably similar.
Start by building Cytoscape from source.
Launch Cytoscape normally using the cytoscape.sh script. Or if you already have an external tool launch configuration use it to launch cytoscape.
Open a Terminal
Run this command
ps -A | grep java
- Ubuntu Note: On Ubuntu, the ps command doesn't output the full command line arguments for a process, so I had to get the java process PID (in my case, 37012 ) and then do this:
ps -fp 37012 -w > cytoscape_process.txt**
This will show the command that the cytoscape.sh script generates. We will create an eclipse launch config from this command.
- If there is more than one java process Cytoscape is the one that ends with org.cytoscape.launcher.internal.Launcher
Go to eclipse, click the little down arrow next to the run button, and select Run Configurations…
- This will open the Run Configuations Dialog
- Click on “Java Application” and click the “New” button on the little toolbar above it.
- Click on the Main tab (probably already open)
- Give the run configuration a name such as “Cytoscape_HEAD”
- In the “Main class” field enter the following:
- Click on the Arguments tab
- Go back to the terminal
- Select all the VM arguments from the command (starting at -Xms2048M and up to but not including the -classpath argument)
- Copy-paste the arguments into the “VM arguments” text area in the eclipse run configurations dialog.
- Add the following argument to the VM arguments (very important!!!)
- Click on the Classpath tab
- Click on “Bootstrap Entries”
- Click on “Add External JARs…”
Note: these instructions changed for v3.7 with karaf update
- Navigate to
- Select the following jar files
- Click Apply
- Click Run
To debug from Eclipse, you may need to add all of the Java Projects in the Source tab
You can now run/debug/profile Cytoscape directly from the eclipse toolbar. Enjoy :)
Some apps that rely on JavaFX may throw exceptions when attempting to load JavaFX classes.
- I think this can be fixed by updating your Java install. Some earlier versions of Java 8 did not ship with the JavaFX classes.