3 - Java 3: Odds & Ends Advanced Programming Techniques...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
    Advanced Programming  Techniques
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    javac options -deprecation to get deprecation  information -d to specify the destination for class  files -verbose for more detailed output -O for optimization
Background image of page 2
    java options Use –D to specify properties Some often used properties: http.proxyHost http.proxyPort Use –X to specify non-standard  properties:  -Xms<size>        set initial Java heap size See java documentation for more info
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Security manager -Djava.security.manager installs the default security manager (very  restrictive) -Djava.security.policy specifies the policy file Use policytool utility to generate policy  files
Background image of page 4
    jar Use jar utility to create jar files Command format like tar File format like zip, but includes a  manifest file MANIFEST.MF Jar files can be made executable by  adding a Main-Class line to the manifest
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    javadoc javadoc utility generates an HTML  documentation, API, with all the classes’  information Uses the code and the special javadoc  comments /** starts the special doc comment */ ends it
Background image of page 6
    javadoc continued @author – author name (for class) @param – parameter name and description  (method) @return – description of return value  (method) @exception – exception name and  description @deprecated – an item is obsolete and  shouldn’t be used (class, method, or variable)
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    javadoc example package stars.ui; import java.awt.*; /** * A Viewer for text. * * @author Thomas Funck * @version 1.0 * * @see Viewer */ public class TextViewer extends Frame implements Viewer { /** The TextArea used to display text */ private TextArea text; /** Creates a new TextViewer */ public TextViewer() {. .. } /** Sets the object to be viewed. * @param o the object to be viewed * @exception ClassCastException thrown when the specified object * is not of type String */ public void setObject(Object o) throws ClassCastException { … }
Background image of page 8
    Java threads Use the built-in Thread class in Java. You need to supply the programming that  the thread will follow in order to do multi- threaded programming.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 28

3 - Java 3: Odds &amp; Ends Advanced Programming Techniques...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online