Problem:
You cannot run a Java applet using the following command line from FTP/400:
c:\java\bin\appletviewer
c:\java\demo\Animator\appletviewer\example4.html
Solution:
The Windows user must be in the same directory as the Java applet before you can run the applet with the Java Applet Viewer from a command line.
To run a Java Applet from a command line, either in Microsoft Windows or FTP/400:
- In the C:\JAVA\BIN directory, create a PC batch file named RUNAPPL.BAT.
- Copy the following commands into the .BAT file:
@REM - Run Selected Java Applet from Command Line
@REM - Parm 1 - Applet Viewer Program
@REM - Parm 2 - Drive Letter
@REM - Parm 3 - Directory for Applet on Drive Letter
@REM - Parm 4 - Applet HTML Launch Page
@REM Change to Drive
%2
@REM Change to Directory
CD %3
@REM Launch Applet
%1 %4
@ECHO Applet has completed.
@PAUSE
- Make sure the directory C:\JAVA\BIN is in the PC search path.
- To run the same applet command as above, use the following command:
FTPRUNPC CMD('c:\java\bin\runappl.bat c:\java\bin\appletviewer c: \java\demo\Animator\ example4.html') OPTION(*SHELL)
- If the command works, remove the @PAUSE statement from RUNAPPL.BAT to stop the .BAT file from pausing.
Last Modified On:
No, open a new Support Case