com.ibm.as400.vaccess

Class VJavaApplicationCall

  • java.lang.Object
    • java.awt.Component
      • java.awt.Container
        • javax.swing.JComponent
          • com.ibm.as400.vaccess.VJavaApplicationCall
  • All Implemented Interfaces:
    java.awt.event.KeyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener

    Deprecated. 
    Use Java Swing instead, along with the classes in package com.ibm.as400.access

    public class VJavaApplicationCall
    extends javax.swing.JComponent
    implements java.awt.event.KeyListener

    Provides a visual interface to JavaApplicationCall. The visual interface consists of two components: an input field where the program to run is specified and input is sent to the program, and an output text area where the output from the program is displayed.

    GUI output generated by the Java program running on the system is not handled by this class. As in JavaApplicationCall, the Java program running on the system receives input via standard. The output text area displays output the system java program writes to standard out and standard error. GUI input/output must be handled via another mechanism such as Remote AWT.

    There are two ways to set up the system Java environment:

    1. VJavaApplicationCall must have a JavaApplicationCall object. After creating the JavaApplicationCall object, the application can set environment parameters on the JavaApplicationCall, object, then construct the VJavaApplicationCall object passing it the JavaApplicationCall object. The advantage to this method is the application sets up the environment instead of the user.
    2. The environment can be set up via set commands entered in the GUI. For additional information on these commands, see the on-line help for the Java command. Valid commands are:
      • Classpath - the value of the CLASSPATH environment variable. Directories are separated by colons.
      • DefaultPort - the default port for communicating standard in, standard out and standard error between the client and the system java environment.
      • FindPort - indicates if the client should search for a free port if the default port is in use.
      • Interpret - indicates if all Java class files should be run interpretively.
      • Optimize - the optimization level for classes not yet optimized.
      • Options - additional options used when running the Java class.
      • SecurityCheckLevel - the level of warnings given for directories in the CLASSPATH that have public write authority.
      • GarbageCollectionFrequency - the relative frequency that garbage collection runs.
      • GarbageCollectionInitialSize - the initial size, in kilobytes, of the garbage collection heap.
      • GarbageCollectionMaximumSize - the maximum size, in kilobytes, that the garbage collection heap can grow to.
      • GarbageCollectionPriority - the priority of the tasks running garbage collection.
      For example, to send the optimization level to 30, enter
      set optimize=30
      

    You start the Java application using the java command. The syntax for this command is much like the syntax when running the command on the client. It is

    java [-classpath=value] [-verbose] [-Dproperty=value -Dproperty=value [...]] class [parm1 parm2 [...]]]
    
    Note, this class correctly sets the standard in, standard out and standard error properties so os400.stdin, os400.stdout or os400.stderr properties are ignored. For example, to run Java application
    java -classpath=/myClasses:/myClasses/lib/package.jar myProgram parm1 parm2
    
    To use this class you simply create a frame to contain the class then call the load() method to run the start the application. For example,
    AS400 system = new AS400("myAS400");
    
     JavaApplicationCall javaCall  = new  JavaApplicationCall(system);
    VJavaApplicationCall vJavaCall = new VJavaApplicationCall(javaCall);
    
    JFrame f = new JFrame ("JavaApplicationCallExample");
    f.getContentPane().setLayout(new BorderLayout ());
    f.getContentPane().add("Center", vJavaCall);
    f.pack();
    f.show();
    
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      • Fields inherited from class javax.swing.JComponent

        accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addErrorListener(ErrorListener listener)
      Deprecated. 
      Adds a listener to be notified when an error occurs.
      void addNotify()
      Deprecated. 
      Notification to VJavaApplicationCall that it now has a parent component.
      void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
      Deprecated. 
      Adds a listener to be notified when the value of any bound property changes.
      void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
      Deprecated. 
      Adds a listener to be notified when the value of any constrained property changes.
      void addWorkingListener(WorkingListener listener)
      Deprecated. 
      Adds a listener to be notified when work starts and stops on potentially long running operations.
      protected void finalize()
      Deprecated. 
      Stops all threads.
      JavaApplicationCall getJavaApplicationCall()
      Deprecated. 
      Returns the access class which defines the Java application to run.
      javax.swing.JTextArea getOutputText()
      Deprecated. 
      Returns a reference to the JTextArea object.
      void keyPressed(java.awt.event.KeyEvent keyEvent)
      Deprecated. 
      A key is pressed.
      void keyReleased(java.awt.event.KeyEvent keyEvent)
      Deprecated. 
      The key is released.
      void keyTyped(java.awt.event.KeyEvent keyEvent)
      Deprecated. 
      The key is typed.
      void removeErrorListener(ErrorListener listener)
      Deprecated. 
      Removes an error listener.
      void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
      Deprecated. 
      Removes a property change listener.
      void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
      Deprecated. 
      Removes a vetoable change listener.
      void removeWorkingListener(WorkingListener listener)
      Deprecated. 
      Removes a working listener.
      void setJavaApplicationCall(JavaApplicationCall javaApplicationCall)
      Deprecated. 
      Sets the JavaApplicationCall object.
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • VJavaApplicationCall

        public VJavaApplicationCall()
        Deprecated. 
        Constructs a VJavaApplicationCall object.
      • VJavaApplicationCall

        public VJavaApplicationCall(JavaApplicationCall javaApplicationCall)
        Deprecated. 
        Constructs a VJavaApplicationCall object. A JavaApplicationCall object defines the Java program to run.
        Parameters:
        javaApplicationCall - The access class which defines the Java application to run.
    • Method Detail

      • addNotify

        public void addNotify()
        Deprecated. 
        Notification to VJavaApplicationCall that it now has a parent component. The windowing system calls this method when VJavaApplicationCall gets a parent frame. When called VJavaApplicationCall requsts input focus be given to the input field.

        Since this method is called by Swing at the appropriate time, application code should not call this method.

        Overrides:
        addNotify in class javax.swing.JComponent
      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
        Deprecated. 
        Adds a listener to be notified when the value of any bound property changes.
        Overrides:
        addPropertyChangeListener in class java.awt.Container
        Parameters:
        listener - The listener.
        See Also:
        removePropertyChangeListener(java.beans.PropertyChangeListener)
      • addVetoableChangeListener

        public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
        Deprecated. 
        Adds a listener to be notified when the value of any constrained property changes.
        Overrides:
        addVetoableChangeListener in class javax.swing.JComponent
        Parameters:
        listener - The listener.
        See Also:
        removeVetoableChangeListener(java.beans.VetoableChangeListener)
      • addWorkingListener

        public void addWorkingListener(WorkingListener listener)
        Deprecated. 
        Adds a listener to be notified when work starts and stops on potentially long running operations.
        Parameters:
        listener - The listener.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Deprecated. 
        Stops all threads.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable - If an error occurs during cleanup.
      • getJavaApplicationCall

        public JavaApplicationCall getJavaApplicationCall()
        Deprecated. 
        Returns the access class which defines the Java application to run.
        Returns:
        The the com.ibm.as400.access.JavaApplicationCall object which defines the Java application to run.
      • getOutputText

        public javax.swing.JTextArea getOutputText()
        Deprecated. 
        Returns a reference to the JTextArea object. Standard output and standard error information from the system Java program are displayed in this text area. The application can use the reference to the JTextArea to modify attributes such as the size of the text area or the font used to display text in the text area.
        Returns:
        The JTextArea object which displays standard output and standard error from the system Java program.
      • keyPressed

        public void keyPressed(java.awt.event.KeyEvent keyEvent)
        Deprecated. 
        A key is pressed.
        Specified by:
        keyPressed in interface java.awt.event.KeyListener
        Parameters:
        keyEvent - The key event.
      • keyReleased

        public void keyReleased(java.awt.event.KeyEvent keyEvent)
        Deprecated. 
        The key is released.
        Specified by:
        keyReleased in interface java.awt.event.KeyListener
        Parameters:
        keyEvent - The key event.
      • keyTyped

        public void keyTyped(java.awt.event.KeyEvent keyEvent)
        Deprecated. 
        The key is typed.
        Specified by:
        keyTyped in interface java.awt.event.KeyListener
        Parameters:
        keyEvent - The key event.
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
        Deprecated. 
        Removes a property change listener.
        Overrides:
        removePropertyChangeListener in class java.awt.Component
        Parameters:
        listener - The listener.
        See Also:
        addPropertyChangeListener(java.beans.PropertyChangeListener)
      • removeVetoableChangeListener

        public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
        Deprecated. 
        Removes a vetoable change listener.
        Overrides:
        removeVetoableChangeListener in class javax.swing.JComponent
        Parameters:
        listener - The listener.
        See Also:
        addVetoableChangeListener(java.beans.VetoableChangeListener)
      • removeWorkingListener

        public void removeWorkingListener(WorkingListener listener)
        Deprecated. 
        Removes a working listener.
        Parameters:
        listener - The listener.
      • setJavaApplicationCall

        public void setJavaApplicationCall(JavaApplicationCall javaApplicationCall)
                                    throws java.beans.PropertyVetoException
        Deprecated. 
        Sets the JavaApplicationCall object.
        Parameters:
        javaApplicationCall - A com.ibm.as400.access.JavaApplicationCall object which defines the Java application to call.
        Throws:
        java.beans.PropertyVetoException - If the change is voted.