User Tools

Site Tools


en:configuration

Configuration

For some configurations and extensions you need administrative rights. To get them just call the context menu of the Java-Editor link on your desktop with a right mouse click and select execute as administrator.

Open the configuration window with the command configuration in the window menu or just use the symbol from the toolbar and choose the desired configuration node in the left tree.

With the Check button you check the existence of all configured folders and files. If a folder or file doesn't exist the corresponding edit field is colored red.

The Dump button exports the whole configuration in a text file. The first lines show which registry entries or ini files are used for configuration. The detailed information can be used to detect configuration problems or to make global presettings in a classroom situation.

Save an edited configuration. Almost all changed configurations are in use then. Only some special things need a Java-Editor restart.

Java

The configuration settings in the Java section are protected. They can only be changed with administrative rights. If you installed the Java-Editor with use of the windows registry the settings are stored in the HKEY_LOCAL_MACHINE (HKLM) hive, else in the ini file JEMachine.INI.

The other configuration settings are stored for each user separately, in the HKEY_CURRENT_USER (HKCU) hive or the ini file JEUser.ini.

Interpreter

First select the folder with the Java Development Kit (JDK). This folder is used for all depending java tools.

The Classpath-Admin is usually protected.

With Classpath-User you can expand the classpath with jar-files or folders.

In the JavaDoc-Folders field you can set additionally folders with JavaDoc documentations. These are also used for code completion.

The Java-Editor writes a batch file RunJava.bat to start a java program. The button opens the last RunJava.bat file. So you can inspect and modify easily this file in case of unexpected problems. Change @ECHO OFF to @ECHO ON and add more PAUSE commands. Then open with the window menu a new DOS window and start the batch file by input of RunJava.bat. This is an easy way to diagnose problems if a program doesn't start.

Compiler

Here you configure the paths and parameters for the javac compiler.

Use the Make-Modus if automatically all open java source files shall be compiled which are younger than their corresponding class files.

Programs

Here you configure the debugger and javadoc tool from the JDK.

Applets

On this page you configure the handling of applets. The Appletviewer belongs to the JDK. You can use a browser or the appletviewer to run an applet. Usually the appletviewer is better during program development, because it doesn't use a cache. For flexible handling it's suggested to use the option Appletviewer for java-files and Browser for HTML-files. If your active window contains a java file and you start the applet the appletviewer is used. But if your active window contains the HTML-file of the applet the browser is used instead.

Alternatives are

  • use always the Appletviewer
  • use always the Browser

Disassembler

By default the disassembler javap.exe from the JDK is used. A better choice is the jad disassembler. Select jad.exe from the disassembler combobox. Then you can install automatically the jad disassembler, provided you have administrative rights (see General aspects).

Jar

On this page you configure the jar tool from the JDK. Usually there is no need to change the options Parameter and Manifest. These options are used for all jar commands. But be aware of the options Create and Pack.

  • The start menu contains the command Jar-File Create. This command produces an executable jar file with all files from the current folder with the here configured file extensions. By default only .class files are included. If necessary expand the list of extensions, for example .class .png
  • The start menu contains also the command Jar-File Pack. This command packs an archive file (like a zip file) from all files you configure here. Specify your selection or choose one of the options
    • all open files
    • .java *.jfm *.uml
    • .java *.jfm
    • .java
    • .*

The pack operation supports easy exchange of files between pupils and teacher. A packed jar file can easily be uploaded to a learning-platform or emailed to the teacher.

Editor

Options

The editor doesn't use tab characters. If a source file contains tab characters they are replaced by the number of space characters you set here. Keyboard input of a tab character is translated to space characters as well.

The indent value is used for indenting automatically generated source code, for example insertion of a control structure or GUI component. By default the value is 2.

Width and height of new Frame, JFrame and Applet windows are set here.

For the default encoding of new source files you have the choice between ANSI, UTF-8 and UTF-16. Search and replace operations are faster if you use the ANSI encoding.

  • Indent help with tabulator - the tab key indents to the next word of the previous line
  • Automatic line indent - the return key indents to the first non space character of the previous line
  • Cursor right of the end of line allowed - the cursor can be positioned beyond the end of a line
  • Complete bracket } automatically - if you input a { character the corresponding } character is inserted as well
  • Line numbering - a new created source file shows line numbers
  • Show structure lines - shows dotted structure lines between mating brackets
  • Show bracket pairs - if the cursor is before or after a bracket the mating bracket is marked as well
  • Show toolbar - shows the toolbar on the left side of an editor window

Code

Activate the Code-completion and Parameter-hints. The default delay value to show the code completion window or parameter hints is 75 ms. You can change the font of the code completion window with the Font button.

Code completion and parameter hints are only available if the documentation is installed.

Colors

With this page you configure the colors for syntax-highlighting of Java and HTML files as well as structure lines and pairs of brackets.

If you select a syntax element on the left side its current foreground and background color and text attributes are shown. Change them as requested with the left button for the foreground and the right one for the background color. The Default button sets the default colors and text attributes.

Comment

Every new java source file has an introductory comment.

Select the comment style:

  • JavaDoc - default JavaDoc style as shown in the picture
  • Short - two lines with Author: %AUTHOR% and Date: %DATE%
  • Free - free style

Write your name in the author field. It is used as value for the %AUTHOR% variable. The %DATE% variable gets its value from the system date of your computer during creation of a new java source file.

Templates

There are many different views about the layout of a java program. If you don't like the templates which are used by the Java-Editor you can specify your own templates, otherwise let the template fields empty. To change a template first download this template collection. Edit the desired one, save it in the template folder and select it on this page.

In a template file you use the variables %NAME% as the file and class name, as well as %AUTHOR% and %DATE%. Place the character | at the initial cursor position. The template should contain start and end sections for inserting of attributes, gui components and methods.

You can use a template file for control structures too. As all control templates are in this template file key of the type #while mark the beginning of a new control template

Keyboard

This page shows the shortcuts of the editor and menu-system.

Additionally you can select a text file with shortcut definitions of code templates. In the templates subfolder of your java editor installation folder you find the file JEKeyboard.txt which explains, how to define a shortcut. Use this file for defining your own code templates.

Browser

You can use the internet-explorer to show the documentation in internal windows of the Java-Editor. The configured external browser is then only used for running applets. Activate “Use only one browser window” if only one internal browser-window shall be used.

With External browser you can configure a browser like Internet Explorer, Firefox or Opera. For the external browser you have to set Browser title and Keys for “Open Address” in browser. If you don't use the internet explorer internally the configured external browser is used to show html files.

The proxy configuration is used for the update function and the http access to the java documentation.

Documentation

The java manual doesn't belong to the JDK, so you have to install it additionally. The installed java manual gives you easy access to the api documentation. Type the F1 key to get documentation to the text the cursor is on. The documentation is also needed for code completion and parameter hints.

The original http://www.oracle.com/technetwork/java/javase/downloads/ java documentation from Sun] contains more than 300 MB in about 13000 files. You can get the documentation in just one chm file of just 50 MB from https://javadoc.allimant.org/. Select chm from the manual combobox, than you can download and install this chm file with the Install button. Using the chm documentation is especially recommended if you use the Java-Editor as portable software from an usb stick. Check wether it is possible to open the chm-file with doubleclick from windows desktop. If necessary you have to allow to open the chm-file.

For direct online access to the java documentation you can use http addresses like http://download.oracle.com/javase/7/docs/api/index.html. In this case the used documentation files are cached, that means locally saved.

The Tutorial exists as

German users can install a html based java book from http://www.javabuch.de. Mail me if you know an alternative for your language.

The Cache folder is used if you use direct http access to the java documentation.

Search again is used for the search in the original java documentation.

Printer

Here you set the print borders, define header and footer line and the using of line numbers.

The header and footer line are partioned in left, middle and right band, which are printed left-justified, centered respectively right-justified. The bands are separated by the # character. You can use the following variables in the header and footer line.

%FILE%   the file name
%PATH%   the file path
%DATE%   the print date
%TIME%   the print time
%PAGE%   the number of the print page
%PAGENUMBER%   the total number of print pages

Mindstorms

The lego mindstorms models can be programmed with the Java-Editor. Install the Lejos system to the Lejos-Folder. If you do it with the Install button the Lejos documentation is installed as well.

You can use a separate template file for your mindstorm programs. In this template you can use the same variables as in other templates.

Select the used port for the infrared transmitter, usually USB, and your mindstorms brick RCX, NXT or EV3.

For mindstorms programming set the Mindstorms-mode. Then

  • the console symbol gives you a mindstorms template
  • the compiler symbol compiles in mindstorms mode
  • the symbol downloads the Lejos firmware for RCX-modells or opens the NXT-Options menu.
  • the run symbol downloads the program to your brick.

Concepts of embedding Lego Mindstorms into curricular can be found at Learning with Robots.

Language

Select the desired language file from the language subfolder. With the help of a language-file you can change used terms.

To create a new language file make a copy of the file english.ini, name it with your language and select it as new language file. If you open the new language file you see that the lines have the structure name=value. Translate the value parts.

The Translate button supports the creation of a new language file. It compares your file with the english.ini file and marks all lines which are identical in both files. Identical lines are not translated or sometimes should not be translated.

To update a language file use the compare tool from the tools menu and compare the old with the new language file.

Options

This page is for configuring miscellaneous settings.

  • Deactivate DOS-Window - some teachers don't want that pupils can open a DOS-Window, this setting is therefore protected
  • Show components-toolbar - handicapped persons, who can not use a mouse, don't need then components toolbar, they use the component menu instead
  • Show borderLayout-toolbar - the borderLayout toolbar is only necessary if you want to use a layout manager to create a gui form
  • Show component-menu - handicapped persons, who can not use a mouse, can use the component menu to create a gui form
  • Load files when starting - load last open files at program start
  • Close console-window manually - close console programs automatically or manually
  • Log debugger - log the debugger output to a text file
  • Save as renames class - if you save a class with a new filename, the class name is renamed as well

  • Start programs without console-window - without check of console or GUI-program, run java-programs always without console-window
  • Start programs independent from Java-Editor - reduces cpu-load while running java-programs, output to console will not be shown
  • Remove write protection automatically - in case of saving a file
  • Create bak-files when saving - create a backup file when saving a file
  • Link java-files with Java-Editor - java files are opened with the Java-Editor (needs administrative rights)
  • Open message-window automatically - if an error occurs during compilation
  • Save files automatically - if not selected always use the save as dialog
  • Show file-tabs in multiline - if you open a lot of files the file-tabs are arranged in multiple lines
  • Codepage for console programs- set the codepage if console programs shall show country specific characters (German: 850)
  • Additional file filters - the open dialog shows also files witch match the additional file filters
  • Font-size in component bar - set the desired font-size for the component bar, default font size is 9
  • Folder for temporary files - this must be a folder with write access, use Default

UML

On this page you configure the layout of classes and objects for the uml window.

To give visual feedback whether a class has an up-to-date class file (valid class) or needs to be compiled (invalid class) use different colors.

Usually a class has a rectangular head and an object a rounded one.

Their are six different possibilities to show the head of an object.

  • Private attributes editable - the context menu of an object allows editing of attributes, but you can exclude the privates ones
  • Show empty attribute- and method-rectangles - if their are no attributes or methods the corresponding uml rectangles can be shown or hidden
  • Show function values in interpreter window - or in a separate function value window

Tools

Checkstyle

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. Look at http://checkstyle.sourceforge.net/ for further information.

You can automatically install the Checkstyle package and a configuration file mycheckstyle.xml. This configuration is not as strict as the configuration file sun_checks.xml from Sun.

Jalopy

Jalopy is a source code beautifier. Checkstyle only checks whether the source code meets the coding standard, whereas Jalopy rewrites the source code according to the desired coding standard.

The homepage of the Jalopy project is at http://jalopy.sourceforge.net/. For the Java-Editor you need the Console-Plugin.

The automatic Jalopy installation also installs a xml file with a coding standard suitable to the Java-Editor. Execute the preferences.bat file if you want to change this standard.

Subversion

Subversion (SVN) is a version control system. It is used to maintain current and historical versions of source code files. The subversion homepage is at http://subversion.apache.org/. Due to affordable e-mail-registration there is no automatic install process.

After installation the tools menu is expanded with a subversion menu.

en/configuration.txt · Last modified: 2017/08/08 12:45 by roehner