Getting Java and Ant: Difference between revisions

From Whirled Club Wiki
Jump to navigation Jump to search
m (Text replacement - "<" to "<")
m (Text replacement - """ to """)
 
Line 6: Line 6:
# Install the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java SE Development Kit (JDK)] (not the bundled versions).
# Install the [http://www.oracle.com/technetwork/java/javase/downloads/index.html Java SE Development Kit (JDK)] (not the bundled versions).
# On Windows you '''will not need to install Ant''' as you can use the batch files to build and test your game.  However, if you are building other types of items that do not have a batch file, you will need to follow the directions [http://wiki.apache.org/ant/AntOnWindows here] for installing Apache Ant.
# On Windows you '''will not need to install Ant''' as you can use the batch files to build and test your game.  However, if you are building other types of items that do not have a batch file, you will need to follow the directions [http://wiki.apache.org/ant/AntOnWindows here] for installing Apache Ant.
# After your JDK installation, you should be able to go to your command line via Start &amp;rarr; Run... &amp;rarr; cmd, type &quot;java -version&quot;, and get an output that looks similar to  
# After your JDK installation, you should be able to go to your command line via Start &amp;rarr; Run... &amp;rarr; cmd, type "java -version", and get an output that looks similar to  


<actionscript>
<actionscript>
c:\Documents and Settings\xxx>java -version
c:\Documents and Settings\xxx>java -version
java version &quot;1.6.0_13&quot;
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
</actionscript>
</actionscript>


If you are installing ant,  you should be able to go to your command line via Start &amp;rarr; Run... &amp;rarr; cmd, type &quot;ant -version&quot;, and get an output that looks similar to  
If you are installing ant,  you should be able to go to your command line via Start &amp;rarr; Run... &amp;rarr; cmd, type "ant -version", and get an output that looks similar to  
<actionscript>  
<actionscript>  
C:\Documents and Settings\XXXX>ant -version
C:\Documents and Settings\XXXX>ant -version
Line 41: Line 41:


   bash-3.2$ java -version
   bash-3.2$ java -version
   java version &quot;1.5.0_13&quot;
   java version "1.5.0_13"
   Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
   Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
   Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)
   Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

Latest revision as of 11:24, 4 September 2018

Icon-Flex.png

This is part of the Setting up your programming environment tutorial.


Windows

  1. Install the Java SE Development Kit (JDK) (not the bundled versions).
  2. On Windows you will not need to install Ant as you can use the batch files to build and test your game. However, if you are building other types of items that do not have a batch file, you will need to follow the directions here for installing Apache Ant.
  3. After your JDK installation, you should be able to go to your command line via Start &rarr; Run... &rarr; cmd, type "java -version", and get an output that looks similar to

<actionscript> c:\Documents and Settings\xxx>java -version java version "1.6.0_13" Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) </actionscript>

If you are installing ant, you should be able to go to your command line via Start &rarr; Run... &rarr; cmd, type "ant -version", and get an output that looks similar to <actionscript> C:\Documents and Settings\XXXX>ant -version Apache Ant version 1.7.0 compiled on December 13 2006 </actionscript>

Linux / Unix

  1. Install the Java JDK (this example is being tested with JDK 5) and set your JAVA_HOME environment variable to the directory in which you installed the JDK.
  2. Get and install the Ant build environment. You may have it installed already. If you do, you'll receive the version of ant if you type this into the terminal:
ant -version
 Apache Ant version 1.7.0 compiled on September 23 2007

If so, you're ready to advance to the Get Flex section. But if you don't get that message, you'll need to download and install Ant:

Under Ubuntu or Debian, type the following to install Ant:

sudo apt-get install ant

If you're running another Unix dialect, you can download an appropriate distribution from: http://ant.apache.org/

Mac OS X

Depending on the Mac operating system you have installed, you might already have both Java and ant installed. Try typing the following on a command line.

 bash-3.2$ java -version
 java version "1.5.0_13"
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
 Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)
 bash-3.2$ ant -version
 Apache Ant version 1.7.0 compiled on September 23 2007


If one or both of them is not installed, then you will need to

  1. Install the Java JDK (this example is being tested with JDK 5) and set your JAVA_HOME environment variable to the directory in which you installed the JDK.
  2. Install MacPorts, and then run
 % sudo port install apache-ant

Next Step