Java-Teaching: Difference between revisions

From Research Computing Center Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 9: Line 9:


=== Version ===
=== Version ===
1.8.0_121
1.8.0_241, 11.0.16, 13.0.2, 15.0.1, 17.0.6
   
   
=== Author / Distributor ===
=== Author / Distributor ===
Line 21: Line 21:
=== Running Program ===
=== Running Program ===


The last version of this application is at /usr/local/apps/eb/Java/1.8.0_121
Please use the following command to search for all Java versions installed on the cluster:
<pre class="gscript">
ml spider Java
</pre>
 
For example:
 
'''Version 1.8.0_241'''
 
Installed in /apps/eb/Java/1.8.0_241
 
To use this version, please load the module with
<pre class="gscript">
ml Java/1.8.0_241
</pre>
 
 
'''Version 11.0.16'''
 
Installed in /apps/eb/Java/11.0.16


To use this version, please load the module with
To use this version, please load the module with
<pre class="gscript">
<pre class="gscript">
ml Java/1.8.0_121
ml Java/11.0.16
</pre>  
</pre>  


Here is an example of a shell script, sub.sh, to run on the batch queue:  
Here is an example of a shell script, sub.sh, to run Java 1.8.0_241 on the batch queue:  


<div class="gscript2">
<div class="gscript2">
Line 43: Line 62:
   
   
cd $SLURM_SUBMIT_DIR<br>
cd $SLURM_SUBMIT_DIR<br>
ml Java/1.8.0_121<br>     
ml Java/1.8.0_241<br>     
java <u>[options]</u><br>   
java <u>[options]</u><br>   
</div>
</div>
Line 59: Line 78:
   
   
<pre  class="gcommand">
<pre  class="gcommand">
ml Java/1.8.0_121
ml Java/1.8.0_241
java  
java  
Usage: java [-options] class [args...]
Usage: java [-options] class [args...]

Latest revision as of 12:58, 5 September 2023

Category

Programming

Program On

Teaching

Version

1.8.0_241, 11.0.16, 13.0.2, 15.0.1, 17.0.6

Author / Distributor

Java

Description

"Java Platform, Standard Edition (Java SE) lets you develop and deploy Java applications on desktops and servers." More details are at Java

Running Program

Please use the following command to search for all Java versions installed on the cluster:

ml spider Java

For example:

Version 1.8.0_241

Installed in /apps/eb/Java/1.8.0_241

To use this version, please load the module with

ml Java/1.8.0_241


Version 11.0.16

Installed in /apps/eb/Java/11.0.16

To use this version, please load the module with

ml Java/11.0.16

Here is an example of a shell script, sub.sh, to run Java 1.8.0_241 on the batch queue:

#!/bin/bash
#SBATCH --job-name=j_Java
#SBATCH --partition=batch
#SBATCH --mail-type=ALL
#SBATCH --mail-user=username@uga.edu
#SBATCH --ntasks=1
#SBATCH --mem=10gb
#SBATCH --time=08:00:00
#SBATCH --output=Java.%j.out
#SBATCH --error=Java.%j.err

cd $SLURM_SUBMIT_DIR
ml Java/1.8.0_241
java [options]

In the real submission script, at least all the above underlined values need to be reviewed or to be replaced by the proper values.

Please refer to Running_Jobs_on_the_teaching_cluster, Run X window Jobs and Run interactive Jobs for more details of running jobs at Teaching cluster.


Here is an example of job submission command:

sbatch ./sub.sh 

Documentation

ml Java/1.8.0_241
java 
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32	  use a 32-bit data model if available
    -d64	  use a 64-bit data model if available
    -server	  to select the "server" VM
                  The default VM is server,
                  because you are running on a server-class machine.


    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

Back to Top

Installation

Source code is obtained from Java

System

64-bit Linux