executable jar

General discussion on the JZOS batch launcher and toolkit
Post Reply
Guest

executable jar

Post by Guest »

How do I set-up jzos to run an executable jar?

Thanks,
Aaron
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

The JZOS batch launcher doesn't directly support the execution of jars, but you can put the jar(s) in the classpath and then execute the main class that is specified in the jar's manifest file.

Let us know if you need assistance in setting this up...
coreymitchell81
Posts: 2
Joined: Thu Apr 17, 2008 10:16 pm
Location: Sioux Falls, SD

Executable Jar

Post by coreymitchell81 »

I am trying to call an executable jar file from JCL. I have successfully executed a class file in the same directory that the jar file resides in but everytime I try to execute the jar file I get the following error: java.lang.NoClassDefFoundError: datapump.DataPump.

The jar file is named datapump and the class inside that contains the main method is DataPump according to the Manifest.

How can I set this up to run the jar file? Please Help! :cry:
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

BTW: As of version 2.2.0, the JZOS batch launcher supports launching of executable jars. This is done by using arguments "-jar jarname". Is this what you are doing?

Try adding the following to IBM_JAVA_OPTIONS:

"-verbose:class"

It could be that a dependent class is really the problem.
coreymitchell81
Posts: 2
Joined: Thu Apr 17, 2008 10:16 pm
Location: Sioux Falls, SD

executable jars

Post by coreymitchell81 »

Where do I put the -jar? I've tried putting it in the class path and the java class. Here is what I have now. The executable jar file I'm after is datapump.jar. Thanks in advance for your assistance!

JCL Segment
// LEPARM='HEAP(48M,2M,ANYWHERE,FREE)',
// CONFIG='TT', < 00=R1.0, 01=R2.0
// VERSION='14', < JVMLDM VERSION: 14
// LOGLVL='+I', < DEBUG LVL: +I(INFO) +T(TRC)
// ARGS=, < ARGS TO JAVA CLASS
// JAVACLS='datapump.DataPump'

Shell Script Segment
# Customize your CLASSPATH here
#CLASSPATH=${JAVA_HOME}/lib
#CLASSPATH=$CLASSPATH:"${IDS_HOME}":"${WRP_HOME}"/jzosids.jar
CLASSPATH=${JAVA_HOME}
CLASSPATH=$CLASSPATH:"${IDS_HOME}"
# Add Application required jars to end of CLASSPATH
CLASSPATH=$CLASSPATH:"datapump.jar -jar"
CLASSPATH=$CLASSPATH:"classes12.jar"
CLASSPATH=$CLASSPATH:"ssh2.jar"
export CLASSPATH="$CLASSPATH":
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Use:

JAVACLS='-jar myjarname.jar'
Post Reply