Setting up the Java JDK Compiler

Find Tips and tricks on how to better use the Zeus editor. Feel free to post your own tips but please do not post bug reports, feature requests or questions here.
Post Reply
Site Admin
Posts: 2471
Joined: Fri Aug 13, 2004 5:10 pm

Setting up the Java JDK Compiler

Post by jussij » Tue Aug 27, 2013 5:14 am

To do any Java development requires the JDK to be installed on the machine.

If this is not the case download and install the JDK found here: ... index.html

Choose the JDK that suits your needs:

JavaSE (Standard Edition) - This is the core Java programming platform and is usually all you need.

JavaEE (Enterprise Edition) - As the name suggest this version adds enterprise level functionality.

JavaME (Micro Edition) - This is for developing applications for mobile devices.

NOTE: The installer puts the location of javac.exe into system PATH so you will not need to set this by hand.

To run the Java compiler from inside Zeus do the following:

1) Start Zeus.

2) Select the Templates Panel on the left, select the Java Document Type from the drop down list at the top, double click on the New File template to create the following Java code:

Code: Select all

class Application
    public static void main (String args[])
        System.out.print("Hello World!\n");
3) Save that code to the file.

Note: For the code shown above the Java compiler creates an Application.class files so make sure the code is saved to the file (for the tool setup that follows).

4) Use the Zeus Compiler, Compile menu to compile the file.

The resulting class file can be run using a Zeus tool item. To configure that tool just do the following:

a) Use the Options, Document Type menu to edit the Java Document Type.

b) Select the Tools section and define the following tool:

Code: Select all

          Text: Execute '$fb' Class
  Command Line: java.exe
     Arguments: -cp . $fb
Work Directory: $fdd
Note: The -cp . value used in the arguments field adds the current folder to the class path.

For more details on the classpath refer to this link: ... spath.html

Without this option running the tool will result in this Java runtime error:
Error: Could not find or load main class Application
c) To run the file make, that file the active file and select the newly created tool from the Tools panel on the left or from the Tools menu.

Running the tool will result in the following output:

Code: Select all

Hello World!

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 1 guest