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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

Eclipse JET Guide
Previous Page Home Next Page

<java:resource>

Standard JET2 Java Tags

resource

Create a file within a Java package.


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

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

Optional Attributes
package
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.
srcFolder
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.
replace
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.
encoding
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.
derived
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.

Example
<%-- create resource Messages.properties in package org.example in source folder myProject/src --%>
<java:resource name="Messages.properties" package="org.example" srcFolder="myProject/src" template="myprops.jet"/>

<%-- resource Messages.properties in package org.example in source folder myProject/src --%>
<ws:project name="myProject">
  <ws:folder path="src">
    <java:package name="org.example">
      <java:resource name="Messages.properties" template="myprops.jet"/>
    </java:package>
  </ws:folder>
</ws:project>


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