Install NicheA on Windows 7 64bit


1. Make sure you have Java Runtime Environments (JRE) and Java Development Kit (JDK) 1.6+ 64bit on your computer.

Based on our existing experiences, JRE and JDK related issue was the very first and most important problem which blocked a neophyte to use NicheA on Windows. Thus, we rewrote this section to make sure that anyone can install a suitable Java environment on his/her Windows computer.

If you see the dialog when you launch NicheA after installing, it means you are working under a 32bit JRE/JDK environment.

Figure 1. You will read this message if your computer is working under a 32bit JDK environment.

NicheA works on JDK 1.6+ 64bit only. By default, MS Windows 7 pre-installed a JRE 1.7 32bit. And you can't overwrite it by installing JDK 1.6+ 64bit. In other words, even you install JDK 1.8 64bit on your computer, you are still using the pre-installed JRE 1.7 32bit. You can use the following method to detect the JDK version on your computer.

  • (1) Open a Command Prompt window. This page shows how to " open a command prompt window".
  • (2) Run the command below.
  • > java -d64

    When you read the following message, it means you haven't installed any JRE/JDK on your computer. The JDK 1.8 64 bit for Windows can be downloaded via JDK official website or our mirror side.

    Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
    Error: could not find java.dll
    Error: Could not find Java SE Runtime Environment.

    If you read the following message, it means the JRE on your computer is in 32bit.

    Error: This Java instance does not support a 64-bit JVM.
    Please install the desired version.

    Two solutions can solve this problem. You can select any of them based your requirements.

  • (1) The recommended and the easiest way is removing the installed JDK 32bit from your computer. In "Programs and Features" in "Control Pane", you can find all the installed JRE/JDK on your computer. Remove all the JRE/JDK without 64bit, and reinstall JDK 1.8 if needed. Fig.2 shows an list on a testing computer, which installed 2 JDK (32bit and 64bit). Now we need to remove the JDK in 32bit.

    This page tells you how to remove/unisntall a program in Windows 7.
  • Figure 2. A list shows all the installed JDK on a computer.

  • (2) (Advanced user only) If you want to keep both JDK 32bit and 64bit on your computer, you can change the shortcuts of JDK. When you run "where java" in a Command Prompt window, it will tell you the working copy of 'java' command on your computer. On the testing computer, it tells me the 'java' command is in "C:\ProgramData\Oracle\Java\javapath\java.exe". It is not a real executable command, but a shortcut pointing to the real location of JDK. If you want to keep it, you just need to change their name (java32 for example). Then you can create a group of new shortcuts which point to JDK 64bit, and replace the original files.
  • The JDK 1.8 64 bit for Windows can be downloaded via JDK official website or our mirror side.

    After installing right JDK, you can go to the next step, installing R on your computer

    For more information, you can refer the following webpages:

  • How can I find which version of Java is installed without running an applet in Windows or Mac?
  • JDK 8 and JRE 8 Installation Start Here
  • How do I manually download and install Java for my Windows computer?
  • 2. Install R and install required packages on Windows.

    Download R, and install.

    Run the following script in R environment to install required packages manually.

    > install.packages("ggplot2")
    > install.packages("raster")
    > install.packages("rgdal")

    3. Install NicheA.

    Download NicheA installation (64bit).

    Double click the downloaded file to install NicheA on Windows.

    Note:

    NicheA installation file can detect and remove the old version automatically.

    4. A video for Niche Analyst setup & installation on Windows (old version).

    5. Run NicheA

    You can run NicheA by clicking from the Start menu.

    If NicheA can’t launch by clicking its icon, you need to run NicheA from Command Prompt to find the reason. If you want to run NicheA from Command Prompt, please following the steps:

  • Open the Command Prompt window by clicking the Start button , clicking All Programs, clicking Accessories, and then clicking Command Prompt.
  • Run the following command to enter the NicheA folder.
    cd "c:\Program Files\Niche Analyst 3.0\"
  • Run command to launch NicheA in a terminal with debug informations.
    nichea.bat
  • Read the exception message and try to solve the problem following the message.
  • The steps above were also a suggested way to launch NicheA, rather than click the icon via Start menu. You can edit nichea.bat to control NicheA in detail (for example: add parameters ‘-Xms512m -Xmx8096m’ after `java` in niche.bat to allocate more memory to NicheA).

    Please mail to huijieqiao [at] gmail.com if you have any trouble to run NicheA.

    The first time to launch NicheA, it will detect all the runtime environments to make sure that all the functions are available. If you see the following dialog form, please tell NicheA the path to the necessary files.

    Figure 3. A dialog form to tell user that NicheA can’t find RScript.

    Figure 4. Fill in the path to the necessary files.

    6. Test NicheA