Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Using Classpath on AS400

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

  • Using Classpath on AS400

    If your class is in the default classpath and the IFS directory that .class file resides in is in the CLASSPATH environment variable, then you would just do java Hello to run it.
    Code

  • #2
    Using Classpath on AS400

    Thx for the hint Robert! It seems to work that way! I find it strange, where's my advantage of working with packages? When you do the call you need to add the package name instead of a directory name.... mmm I guess I need to read up on that one!?! I need to call a class from RPG code witin an EDI environment. A Message-Broker is sending data and is written in JAVA, so for the AS400 to know when to start processing the streamedfile the java program can kick off the RPG, ones done the RPG could kick off a JAVA Class telling the message broker we're done processing. All needs to go very quick. I hope I am on the right track trying to use a java call from RPG... AND I need to get my classpath right! So thx again! If you have any more tricks of the trade to share to keep me from falling?... GreetZ Hans

    Comment


    • #3
      Using Classpath on AS400

      Hi, I am experiencing a strange problem. I created the simple Hello.class No sweat right? (Even used CRTJVAPGM for optimization) I had set a ENVVAR CLASSPATH to the IFS dir in which my freshly created class resides. There is NO WAY my AS400 looks at the classpath. If I use -verbose it only verifies the "QIBM/ProdData" stuff. Also using java -cp /"Path to class-file" Hello.class results in a class definition not found error. I have also tried to switch to the directory in which the class resides still no success. I have created a .profile in my home dir which sets the class path using export -s "Path to class-file" still NO SUCCESS. The only way I can call a .class is if it resides in my home dir.... WHAT THE .... AM I DOING WRONG?????? AS400 - type S20 OS400 - V5.1 JDK - 1.3 Hope someone can help me clarify this! Hans Geerdink
      Code

      Comment

      Working...
      X