Tutorial:Setup App development environment

From OpenTutorials
Jump to: navigation, search

Install Java JDK

Cytoscape is a Java application. It requires Java 6 or 7. To install Oracle JDK, go to this URL to download and install Java. Be sure to select the version that corresponds with our operating system (32-bit or 64-bit). On the Mac, you will be automatically prompted to install Apple's JDK when you try to use Cytoscape or Eclipse.

Install Maven

Maven is the build tool that Cytoscape 3 project uses to build the Cytoscape application. To develop Cytoscape apps, developers should install Maven on their computer if it is not already installed.

Maven can be downloaded from this page http://maven.apache.org/download.cgi Make sure you download Maven version 3.0 or higher.

Windows

Follow the above download link to download the ZIP file, 'apache-maven-x.x.x-bin.zip'.

  • unzip the zip file, put it somewhere you like
  • put the Maven 'bin' directory in your Path. Open Explorer, right click Computer, choose Properties --> Advanced System Settings --> Environment Variables. Edit the path variable, and add the path to maven bin directory there.

Open a command prompt and type the command "mvn -v" - you should get the version number of Maven.

Mac

Maven may already been installed with your system. To check if Maven has been installed, open a Terminal and type the command "mvn -v". If this shows that Apache Maven version 3.0 or higher is installed, you're good to go. If not, you can download it from the above download link. The file you should download is apache-maven-x.x.x-bin.tar.gz.

After you get the file, open a terminal and type the following command

tar -xvf apache-maven-x.x.x-bin.tar

After all the files are extracted, you will find the executable mvn in the bin directory. Add this directory to your PATH (in .profile and/or .bashrc in your home directory).

Linux

You can check if Maven is already installed on your computer,

mvn -v

If Maven is not installed, you can install it with command (Ubuntu)

apt-get install maven

If you are using RedHat Linux, then use the command

yum install maven

Install Git

Cytoscape repositories are hosted at GitHub. App developers should install git if they want to check out Cytoscape source code.

Windows

You should download the Windows version of Git at http://git-scm.com/download/win and install it.

This will install a "Git Bash Shell", among other things. Use this to run Git commands - you should use Unix commands rather than the DOS commands used in a typical Windows command shell.

Mac

  • Start here: https://mac.github.com/
  • Download and install GitHub.app
  • Launch GitHub.app and start the configuration wizard:
 * Enter your GitHub account info
 * Click on Install Command Line Tools
  • Open Terminal and type ‘git’
  • If you are prompted to install Xcode, click Install to continue
  • In Terminal, test the installation by typing ‘git’ again
  • Finish the GitHub.app wizard

Linux

You can check if git is already installed on your computer git --version

If git is not installed yet, you can install it with command (on Ubuntu) apt-get install git

Install Eclipse for Cytoscape 3 Development (optional)

Many people use Eclipse as their Java development environment. You can download and install Eclipse to develop Cytoscape App. There are different distributions of Eclipse, either one should be fine, for RCP, for Java developer or Classic. You can also follow this document to setup Eclipse.

If the distribution you use does not include the plugins 'M2Eclipse' and 'EGit', you can instal them as follows.

  • Start Eclipse, click the menu 'Help', then 'Install new software...'. In the dialog, select "All Available Sites" to Work with. Type 'Maven' in the filter text, you will get plugin 'm2e - Maven Integration for Eclipse'. Install it.
  • Follow the same steps as previous, but this time, type 'egit' in the filter text. You will get plugin "Eclipse EGit". Install it.