Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse JET Guide
Previous Page Home Next Page


Standard JET2 Java Tags


Create a Java class with the specified name and write its contents by evaluating the supplied template.

Tag Summary
required <java:class name="value" template="value"/>
full tag <java:class name="value" template="value" package="value" srcFolder="value" replace="value" encoding="value" derived="value"/>

Required Attributes
The name unqualified name of the Java class.
A project-relative path of a JET template to execute. The template provides the class file's contents.

Optional Attributes
The name of the java package. If not specified, then the name of the containing 'java:package' tag is used, otherwise, the default package is used.
The a path of source folder. If a relative path, this relative to any containing 'ws:project' or 'ws:folder' tags. If absolute, it is treated as a workspace relative path. If omitted, the first source folder of the containing project is used.
A boolean ('true' or 'false') value. If 'true', the tag will overwrite an existing file, otherwise it will not. If omitted, a value of 'true' is assumed.
The character encoding of the file. If omitted, then the Eclipse workspace determines the encoding. If provided, then the encoding is changed to the specified value. A value of '#default' restores the encoding of the file to the workspace determined default.
A boolean value ('true' or 'false') determining the value of the workspace 'derived' attribute for the file. If omitted, a value of 'false' is assumed.

<%-- create class Foo in package org.example in source folder myProject/src --%<
<java:class name="Foo" package="org.example" srcFolder="myProject/src" template="myJava.jet"/>

<%-- create classes Foo & Bar in package org.example in source folder myProject/src --%>
<ws:project name="myProject">
  <ws:folder path="src">
    <java:package name="org.example">
      <java:class name="Foo" template="myFoo.jet"/>
      <java:class name="Bar" template="myBar.jet"/>

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire