Creating and editing Java source files
You can create and edit Java™ source files in a number of ways: using IBM® i Access for Windows, on a workstation, with EDTF, and with SEU.
With IBM i Access for Windows
Java source files are American Standard Code for Information Interchange (ASCII) text files in the integrated file system.
You can create and edit a Java source file with IBM i Access for Windows and a workstation-based editor.
On a workstation
You can create a Java source file on a workstation. Then, transfer the file to the integrated file system by using file transfer protocol (FTP).
To create and edit Java source files on a workstation:
- Create the ASCII file on the workstation by using the editor of your choice.
- Connect to your server with FTP.
- Transfer the source file to your directory in the integrated file system as a binary file, so that the file remains in ASCII format.
You can edit files from any file system using the Edit File (EDTF) CL command. It is an editor that is similar to the Source Entry Utility (SEU) for editing stream files or database files. See the Edit File (EDTF) CL command for information.
touchto create an empty stream file with the an ASCII CCSID and then use the EDTF command to edit the file. For example, to create an empty stream file
/tmp/Test.javawith an ASCII CCSID of 819, use the following command:
QSH CMD('touch -C 819 /tmp/Test.java')
With Source Entry Utility
You can create a Java source file as a text file by using source entry utility (SEU).
To create a Java source file as a text file by using SEU, perform the following steps:
- Create a source file member by using SEU.
- Use the Copy To Stream File (CPYTOSTMF) command to copy the source file member to an integrated file system stream file, while converting the data to ASCII.
If you need to make changes to the source code, change the database member by using SEU and copy the file again.
For information about storing files, see Java-related files in the IFS.