Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

CLASSPATH ON AS/400

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CLASSPATH ON AS/400

    One way is the ADDENVVAR like you mentioned. Used in a CLP as such: ADDENVVAR ENVVAR(CLASSPATH) + VALUE('/JTOpen/lib/jt400.jar:/QIBM/ProdData+ /Java400/jt400ntv.jar:/otherJarFiles/activation+ .jar:/otherJarFiles/mail.jar:/otherJarFiles/pop3.ja+ r:/java_applets/') REPLACE(*YES) JAVA CLASS(com.myco.Util.Admin.MyProgram) + PARM(&IF_ANY &JOBNAME &JOBUSER + &JOBNUMBER) OPTIMIZE(30) + PROP((java.version 1.3)) If you submit the program you must remember to specify the CPYENVVAR(*YES) for example; SBMJOB CMD(CALL PGM(JVCLMAIL) PARM(&TO &FROM + &SUBJECT &MSG)) JOB(MAIL) JOBQ(MYJOBQ) + CPYENVVAR(*YES) MSGQ(MYMSGQ) Hope that helps, Mike

  • #2
    CLASSPATH ON AS/400

    Thanks Mike for the tip... did set the classpath using the addenvvar cmd....but i set it for *sys ....but each time i wanted access it , the *job var. came up and didnt wuite reflect my changes. I got it set now and it is all up and running...thanks again.

    Comment


    • #3
      CLASSPATH ON AS/400

      Another way to set the default classpath is to create a file named .profile and place it on the IFS under the folder /home/. This will set the environment for you when you start QShell. You can also set the default environment for all users when they start the QSH environment. I would recommend taking a look at the IBM manual referencing the QShell environment. This environment is a unix-like environment and has some siginificant differences from OS/400. Mike

      Comment


      • #4
        CLASSPATH ON AS/400

        Hi, Can someone tell me how to set the classpath on AS400? I tried to set the env. variable, CLASSPATH, using the addenvvar command. I pointed it to the jt400.jar, tools.jar and db2_classes.jar, all in diff directories in the IFS. I am not able to use the toolbox driver even after I did this (jt400.jar actually contains the AS400JDBCDriver class.), as it gives me an error "ClassNotFound.." among other things... Now i changed to the native driver, but it gives me the error, saying the database is not a relarional database... Is this the right way to set the classpath at all or did i mess up somewhere??? Please let me know - more important how to set the classpath. Thanks, Sridevi.

        Comment


        • #5
          CLASSPATH ON AS/400

          Use WRKENVVAR on the command line and prompt. This will give the option of working with either the system or the job environment variables on a screen from which you can add change and delete them. Happy Java trails, Cliff

          Comment

          Working...
          X