Page 1 of 1

How to run Java program?

PostPosted: Thu Jan 24, 2013 10:53 pm
by David85
Hi
I have a java program on PC and run it using:
java -cp ProgramName.jar;ibmjzos600.jar;bcprov-jdk16-140.jar;. com.zddd.enttt.Class FILELIST=file.name OUTFILE=file.name DIR=directory FILE=name.file
How can i run this on mianframe? I tried use a
 //JTEST3 JOB David,CLASS=A,MSGCLASS=X,REGION=200M,USER=USER,            J
 //           MSGLEVEL=(1,1),TIME=1440,NOTIFY=&SYSUID                     
 //PROCLIB JCLLIB ORDER=USER.JZOS.SAMPJCL                               
 //*                                                                     
 //JAVA EXEC PROC=EXJZOSVM,VERSION='60',                                 
 // JAVACLS='com.zddd.enttt.Class'       
 //STDENV DD *                                                                                                                                     
 . /etc/profile                                                           
 export JAVA_HOME=/usr/lpp/java/J6.0                                     
 JZOS_HOME=/u/user/java/jzos                                             
 export PATH=/bin:"${JAVA_HOME}"/bin:                                     
                                                                         
 LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin                                 
 LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390                               
 LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390/j9vm                         
 LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic                           
 LIBPATH="$LIBPATH":"${JZOS_HOME}"                                       
 export LIBPATH="$LIBPATH":                                                   
 OPTS="-Djava.ext.dirs=${JZOS_HOME}:${JAVA_HOME}/lib/ext"                 
 OPTS="$OPTS -Djzos.jdfsort.dir=${JZOS_HOME}"                             
 OPTS="$OPTS -Djzos.script.path=${JZOS_HOME}/sample"                     
 export JZOS_JVM_OPTIONS="$OPTS"                                                                 
 # Uncomment the following to add additional required jars to CLASSPATH   
 export APP_HOME=/u/user/java/programs                       
 for i in "${APP_HOME}"/*.jar; do                                         
 CLASSPATH="$CLASSPATH":"$i"
 done                     
 export CLASSPATH="$CLASSPATH":
 export IBM_JAVA_OPTIONS="$IJO "
                               
export JAVA_DUMP_HEAP=false   
export JAVA_PROPAGATE=NO       
export IBM_JAVA_ZOS_TDUMP=NO 

But I dont now how to pass parameters (FILELIST etc) to the program.

Re: How to run Java program?

PostPosted: Thu Jan 24, 2013 11:05 pm
by dick scherrer
Hello and welcome to the froum,

Suggest you talk with your network and mainframe system support people. They can tell you how running your java on the mainframe is done or they can help with a method if one does not already exist.

Re: How to run Java program?

PostPosted: Mon Jul 26, 2021 1:16 pm
by ashima08
IBM produces a number of z/OS mainframe Java products. ReportCenter requires a Java runtime environment at version 8 or higher.

Re: How to run Java program?

PostPosted: Mon Jul 26, 2021 7:09 pm
by Terry Heinze
Did you notice that you replied to an 8 year old topic?