Child pages
  • Hyak java programming
Skip to end of metadata
Go to start of metadata

Download Java JDK on your desktop:

On your desktop download java jdk for linux x64 (do not get the rpm). The filename is like jdk-8u102-linux-x64.tar.gz

Currently this is the link:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

sftp the tar.gz file (e.g. jdk-8u102-linux-x64.tar.gz) to Hyak.

Install Java on Hyak

srun -p build --time=2:00:00 --mem=100G --pty /bin/bash

tar -xvf jdk-8u102-linux-x64.tar.gz

cd into the newly created directory

cd bin

pwd

put this directory in your PATH.

Compiling on Hyak

Compiling must be done on a compute node and not on the login node. Use this command to get a compute node which can be used for compiling.

srun -p build --time=2:00:00 --mem=100G --pty /bin/bash
javac myprog.java

While running the compiled file myprog, we can issue below command:

java myprog

  • No labels