Java-Teaching: Difference between revisions
No edit summary |
No edit summary |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
=== Version === | === Version === | ||
1.8. | 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 === | ||
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/ | ml Java/11.0.16 | ||
</pre> | </pre> | ||
Here is an example of a shell script, sub.sh, to run Java 1.8.0_241 on the batch queue: | |||
<div class="gscript2"> | |||
<nowiki>#</nowiki>!/bin/bash<br> | |||
<nowiki>#</nowiki>SBATCH --job-name=j_Java<br> | |||
<nowiki>#</nowiki>SBATCH --partition=batch<br> | |||
<nowiki>#</nowiki>SBATCH --mail-type=ALL<br> | |||
<nowiki>#</nowiki>SBATCH --mail-user=<u>username@uga.edu</u><br> | |||
<nowiki>#</nowiki>SBATCH --ntasks=<u>1</u><br> | |||
<nowiki>#</nowiki>SBATCH --mem=<u>10gb</u><br> | |||
<nowiki>#</nowiki>SBATCH --time=<u>08:00:00</u><br> | |||
<nowiki>#</nowiki>SBATCH --output=Java.%j.out<br> | |||
<nowiki>#</nowiki>SBATCH --error=Java.%j.err<br> | |||
cd $SLURM_SUBMIT_DIR<br> | |||
ml Java/1.8.0_241<br> | |||
java <u>[options]</u><br> | |||
</div> | |||
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]], [[Running_Jobs_on_the_teaching_cluster#Running_an_X-windows_application | Run X window Jobs]] and [[Running_Jobs_on_the_teaching_cluster#How_to_open_an_interactive_session | Run interactive Jobs]] for more details of running jobs at Teaching cluster. | Please refer to [[Running_Jobs_on_the_teaching_cluster]], [[Running_Jobs_on_the_teaching_cluster#Running_an_X-windows_application | Run X window Jobs]] and [[Running_Jobs_on_the_teaching_cluster#How_to_open_an_interactive_session | Run interactive Jobs]] for more details of running jobs at Teaching cluster. | ||
Here is an example of job submission command: | |||
<pre class="gcommand"> | |||
sbatch ./sub.sh | |||
</pre> | |||
=== Documentation === | === Documentation === | ||
<pre class="gcommand"> | <pre class="gcommand"> | ||
ml Java/1.8. | ml Java/1.8.0_241 | ||
java | java | ||
Usage: java [-options] class [args...] | Usage: java [-options] class [args...] |
Latest revision as of 11: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
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.
Installation
Source code is obtained from Java
System
64-bit Linux