SlideServe
Menu
Préférences
© SlideServe · v2026

Setting Up Java

kadeem avatar
8 diapositives · 273 Views · Jul 10, 2014

Setting Up Java. CS0007: Introduction to Computer Programming. Things you will need. You must have: The Java Runtime Environment (JRE) Includes Java Virtual Machine (JVM) The Java Developer Kit (JDK) Includes the Java Compiler A text editor Optional:

Setting Up Java - slide 1
01 / 8Setting Up Java
1 / 17

Télécharger la présentation

Setting Up Java
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Setting Up Java CS0007: Introduction to Computer Programming

  2. Things you will need • You must have: • The Java Runtime Environment (JRE) • Includes Java Virtual Machine (JVM) • The Java Developer Kit (JDK) • Includes the Java Compiler • A text editor • Optional: • An Integrated Development Environment (IDE) – a software application that provides comprehensive facilities to computer programmers for software development • Netbeans • Eclipse

  3. The Java Developer Kit • When you install the JDK, you automatically get the JRE • It can be downloaded here: • http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html • If you want more development features you can download them here: • http://www.oracle.com/technetwork/java/javase/downloads/index.html • Your best bet is to follow the directions here:’ • http://java.sun.com/new2java/programming/learn/

  4. Text Editors • You can create Java programs with mostly any text editors • Windows: • PSPad • Notepad++ • Linux: • gedit • Unix/Linux: • emacs • vim • nano • Remember to save you java source file as a .java file

  5. Compiling and Running From Command Line • You can compile a java source file from either a Windows or Unix command prompt with the following command: javacYourProgramName.java • This will create a file called “YourProgramName.class”. This contains the Java Byte Code for your program. • You can run a java program from either a Windows or Unix command prompt with the following command: java YourProgramName • Notes: • Your source file should end in “.java” • When you run your Java program just use the name of your source file WITHOUT “.java”

  6. The Command Line • Basic Unix Commands: • ../ - up one in the directory heirarchy • ls(optional path) – list the files in the directory given in the optional path, if no path is given, list the files in the current directory. • cd(optional path) – go to the directory given in the optional path, if no path is given, go to the home directory • Many, many, many more: • http://www.rain.org/~mkummel/unix.html • Windows Command Line Commands: • Same for the above, but instead of ls, use dir • Also many, many, many more: • http://ss64.com/nt/

  7. Integrated Development Environment (IDE) • Using a text editor and compiling from the command line is the most basic way of creating a Java program, but there are tools available to make it easier to create Java programs called IDEs • The two major ones are: • Netbeans • Eclipse • Netbeans is an IDE from Oracle, the current owners of the Java language, and thus, is very easy to use with Java. • If you install Netbeans, it will guide you through installing the JDK • Eclipse is a third-party open-source IDE that is very powerful and popular. • You may need to install the JDK successfully before installing Eclipse.

  8. Netbeans and Eclipse Demo