In the JAXB Tutorial, why...

...is comment a global element in the XML schema? It is a simple type based on xsd:string, yet is declared globally and "ref"erenced everywhere it is needed.

are you referring to same example explained in JAXB tutorial issue ( with simple JAXB unmarshelling example) . thread ?

Similar Messages

  • In Java EE 7's Firstcup tutorial, why does does the web tier consume the data from the dukes-age web service?

    In the Firstcup tutorial, the responsibilities of the web tier are listed as:
    dynamically generate content for the client
    collect input from the user
    return results from business tier components
    control the flow of client screens & pages
    maintain session state
    perform basic logic
    hold data temporarily in JavaBeans components
    Which of these responsibilities would retrieving data from a web service fall under?
    The tutorial also lists the technologies used in the web tier, and JAX-RS is not included in that list. The list of technologies used by the business tier does, however, list JAX-RS. I was surprised to find the DukesBDay JavaBeans component (in the web tier) calling the dukes-age web service, instead of the DukesBirthdayBean EnterpriseBean (in the business tier), which uses hard coded value for Duke's birth date.
    Is it typical for the web tier to consume web services in this way? What about when using an application client container, wouldn't that skip the web tier altogether, and in doing so also skip the web service call? Wouldn't DukesBirthdayBean in the business tier benefit from making the call to the web service, instead of having the date hard coded into it, and wouldn't this also solve the problem of the missing web service call when using an application client container?

    Hi Shadab,
    Here is a list of Web service standards supported by SAP in NetWeaver 7.1.1: [Supported Standards|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/624479f7e608fae10000000a422035/frameset.htm] (also in [7.0|http://help.sap.com/saphelp_nw70/helpdata/EN/44/624479f7e608fae10000000a422035/frameset.htm] and [7.0.1|http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/44/624479f7e608fae10000000a422035/frameset.htm]). The Enterprise Services adhere to these standards, and on the provider side you have the tools to configure the authentication settings as needed. On the consumer side, one just has to use a Java release (or any other platform) that supports these standards.
    While I am not a Java developer, there should be [many ways to consume a Web service in Java|http://www.google.bg/search?q=consumewebservice+java].
    Hope this helps,
    Rossen

  • The simplest thing - why it doesn't work?????

    I develop a big application with lots of different panes containing all these controls...
    I want the user to click a menu item and then the corresponding pane will appear, replacing completely in view any pane that appeard before that. I've tried everything - using JFrmae, JPane, JLayeredPane, rootpane, nothing seems to work perfectly .There's always a glitch and the previous pane somehow appears underneath under some circumstances.
    I didn't find anything on that in the java tutorial or in the forums. I hope you guys could help me. Thanks in advance!

    Thanks, that worked!
    I now have all these different classes of panels that I can call from the frame class, but I can't call the frame class from any of the panes...
    This is the error message that I get when I try to call a public method of the frame class from the pane class:
    java.lang.NullPointerException
            at Pane1.workWithFrame(Pane1.java:76)
            at MyFrame$3.actionPerformed(MyFrame.java:137)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    86)
            at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1839)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
            at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1
    113)
            at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
    d(BasicMenuItemUI.java:943)
            at java.awt.Component.processMouseEvent(Component.java:5100)
            at java.awt.Component.processEvent(Component.java:4897)
            at java.awt.Container.processEvent(Container.java:1569)
            at java.awt.Component.dispatchEventImpl(Component.java:3615)
            at java.awt.Container.dispatchEventImpl(Container.java:1627)
            at java.awt.Component.dispatchEvent(Component.java:3477)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
            at java.awt.Container.dispatchEventImpl(Container.java:1613)
            at java.awt.Window.dispatchEventImpl(Window.java:1606)
            at java.awt.Component.dispatchEvent(Component.java:3477)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)This is my frame class:
    import java.util.*;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.util.ArrayList;
    import java.util.Date;
    import java.text.NumberFormat;
    import java.text.DateFormat;
    import java.io.File;
    import java.io.RandomAccessFile;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.math.BigDecimal;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.GridLayout;
    import java.awt.Color;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowListener;
    import java.awt.event.WindowEvent;
    import java.awt.event.KeyEvent;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JMenuBar;
    import javax.swing.JMenu;
    import javax.swing.JMenuItem;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JOptionPane;
    public class MyFrame extends JFrame{
            protected Dimension defaultSize = new Dimension(200, 200);
              public String frameString = "Santa";
              protected static MyFrame frame;
    protected static Pane1 contentPane;
            JScrollPane scrollPane;
            public MyFrame(){
                setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    contentPane = new Pane1(frame);
         scrollPane = new JScrollPane(contentPane,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS
    //Make it the content pane.
    contentPane.setOpaque(true);
    setContentPane(scrollPane);
                JMenu menu = new JMenu("Window");
                menu.setMnemonic(KeyEvent.VK_W);
                JMenuItem item = null;
                //close
                item = new JMenuItem("Close");
                item.setMnemonic(KeyEvent.VK_C);
                item.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        System.out.println("Close window");
                        MyFrame.this.setVisible(false);
                        MyFrame.this.dispose();
                menu.add(item);
                //new
                item = new JMenuItem("New");
                item.setMnemonic(KeyEvent.VK_N);
                item.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                         setNewContentPane(contentPane.getPane2());
                   contentPane.getPane2().addButtons(contentPane.getPane2().toolBar);
                menu.add(item);
                //quit
                item = new JMenuItem("Quit");
                item.setMnemonic(KeyEvent.VK_Q);
                item.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
    setNewContentPane(contentPane);
    contentPane.workWithFrame();
                menu.add(item);
            // Create the menu bar
            JMenuBar menuBar = new JMenuBar();
            // Create a menu
            JMenu servicesMenu = new JMenu("�������-�����");
            menuBar.add(servicesMenu);
           JMenu reportsMenu = new JMenu("�����");
            menuBar.add(reportsMenu);
           JMenu clientsMenu = new JMenu("������");
            menuBar.add(clientsMenu);
           JMenu jobsMenu = new JMenu("�����");
            menuBar.add(jobsMenu);
           JMenu candidatesMenu = new JMenu("�������");
            menuBar.add(candidatesMenu);
            menuBar.add(menu);
           // Create a menu item
            JMenuItem candidateInterviewSubpeneaMenuItem = new JMenuItem("����� �����");
           // item.addActionListener(actionListener);
            candidatesMenu.add(candidateInterviewSubpeneaMenuItem);
            JMenuItem interviewMenuItem = new JMenuItem("�����");
           // item.addActionListener(actionListener);
            candidatesMenu.add(interviewMenuItem);
            JMenuItem changeIntervieweeDetailsMenuItem = new JMenuItem("����� ���� �����");
           // item.addActionListener(actionListener);
            candidatesMenu.add(changeIntervieweeDetailsMenuItem);
            JMenuItem scanResumeMenuItem = new JMenuItem("����� ����� ����");
           // item.addActionListener(actionListener);
            candidatesMenu.add(scanResumeMenuItem);
            JMenuItem buildResumeMenuItem = new JMenuItem("����� ����� ���� �����");
           // item.addActionListener(actionListener);
            candidatesMenu.add(buildResumeMenuItem);
            JMenuItem updatePlacementMenuItem = new JMenuItem("����� ����");
           // item.addActionListener(actionListener);
            candidatesMenu.add(updatePlacementMenuItem);
            JMenuItem newClientMenuItem = new JMenuItem("���� ���");
           // item.addActionListener(actionListener);
            clientsMenu.add(newClientMenuItem);
            JMenuItem updateClientMenuItem = new JMenuItem("����� ���� ����");
           // item.addActionListener(actionListener);
            clientsMenu.add(updateClientMenuItem);
            JMenuItem newJobMenuItem = new JMenuItem("���� ����");
           // item.addActionListener(actionListener);
            jobsMenu.add(newJobMenuItem);
            JMenuItem updateJobMenuItem = new JMenuItem("����� ���� ����");
           // item.addActionListener(actionListener);
            jobsMenu.add(updateJobMenuItem);
            JMenuItem findMatchForJobMenuItem = new JMenuItem("����� ������� �����");
           // item.addActionListener(actionListener);
            jobsMenu.add(findMatchForJobMenuItem);
           JMenuItem interviewsReportMenuItem = new JMenuItem("��� �������");
           // item.addActionListener(actionListener);
            reportsMenu.add(interviewsReportMenuItem);
           JMenuItem candidatesReportMenuItem = new JMenuItem("��� �������");
           // item.addActionListener(actionListener);
            reportsMenu.add(candidatesReportMenuItem);
           JMenuItem clientsReportMenuItem = new JMenuItem("��� ������");
           // item.addActionListener(actionListener);
            reportsMenu.add(clientsReportMenuItem);
           JMenuItem jobsReportMenuItem = new JMenuItem("��� �����");
           // item.addActionListener(actionListener);
            reportsMenu.add(jobsReportMenuItem);
           JMenuItem phonebookReportMenuItem = new JMenuItem("��� �����");
           // item.addActionListener(actionListener);
            reportsMenu.add(phonebookReportMenuItem);
           JMenuItem placementReportMenuItem = new JMenuItem("��� �����");
           // item.addActionListener(actionListener);
            reportsMenu.add(placementReportMenuItem);
           JMenuItem statsReportMenuItem = new JMenuItem("��� ������");
           // item.addActionListener(actionListener);
            reportsMenu.add(statsReportMenuItem);
           JMenuItem evaluationReportMenuItem = new JMenuItem("��� �����");
           // item.addActionListener(actionListener);
            reportsMenu.add(evaluationReportMenuItem);
           JMenuItem rakazReportMenuItem = new JMenuItem("��� �����");
           // item.addActionListener(actionListener);
            reportsMenu.add(rakazReportMenuItem);
           JMenuItem hoursReportMenuItem = new JMenuItem("��� ����");
           // item.addActionListener(actionListener);
            reportsMenu.add(hoursReportMenuItem);
           JMenuItem callsReportMenuItem = new JMenuItem("��� �����");
           // item.addActionListener(actionListener);
            reportsMenu.add(callsReportMenuItem);
           JMenuItem settingsMenuItem = new JMenuItem("������");
           // item.addActionListener(actionListener);
            servicesMenu.add(settingsMenuItem);
           JMenuItem backupsMenuItem = new JMenuItem("�������");
           // item.addActionListener(actionListener);
            servicesMenu.add(backupsMenuItem);
           JMenuItem paperAdsMenuItem = new JMenuItem("������ ������");
           // item.addActionListener(actionListener);
            servicesMenu.add(paperAdsMenuItem);
           JMenuItem todoMsgsMenuItem = new JMenuItem("�����/������");
           // item.addActionListener(actionListener);
            servicesMenu.add(todoMsgsMenuItem);
           JMenuItem todoMsgsLogMenuItem = new JMenuItem("����");
           // item.addActionListener(actionListener);
            servicesMenu.add(todoMsgsLogMenuItem);
           JMenuItem chargeMenuItem = new JMenuItem("�����");
           // item.addActionListener(actionListener);
            servicesMenu.add(chargeMenuItem);
           JMenuItem marketingMenuItem = new JMenuItem("�����");
           // item.addActionListener(actionListener);
            servicesMenu.add(marketingMenuItem);
           JMenuItem reminderMenuItem = new JMenuItem("�������");
           // item.addActionListener(actionListener);
            servicesMenu.add(reminderMenuItem);
           JMenuItem phonebookMenuItem = new JMenuItem("�����");
           // item.addActionListener(actionListener);
            servicesMenu.add(phonebookMenuItem);
           JMenuItem statsMenuItem = new JMenuItem("������ ���������");
           // item.addActionListener(actionListener);
            servicesMenu.add(statsMenuItem);
           JMenuItem diallerMenuItem = new JMenuItem("�����");
           // item.addActionListener(actionListener);
            servicesMenu.add(diallerMenuItem);
           JMenuItem exitMenuItem = new JMenuItem("�����");
           // item.addActionListener(actionListener);
            servicesMenu.add(exitMenuItem);
            // Install the menu bar in the frame
                setJMenuBar(menuBar);
                setSize(defaultSize);
                  pack();
                  setVisible(true);
            public void displayPane2()
                 System.out.println ("********************************************hello***********************************");       }
            public void setNewContentPane(JPanel pane)
                      scrollPane = new JScrollPane(pane,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS
    //Make it the content pane.
    pane.setOpaque(true);
    setContentPane(scrollPane);
    validate();
    repaint();
            public static void main(String[] args)
                  MyFrame frame = new MyFrame();
        }And this is my pane class:
    import javax.swing.JToolBar;
    import javax.swing.JButton;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.JScrollPane;
    import javax.swing.JPanel;
    import java.net.URL;
    import java.awt.*;
    import java.awt.event.*;
    public class Pane1 extends JPanel
                             implements ActionListener {
        protected JTextArea textArea;
        protected String newline = "\n";
        static final private String PREVIOUS = "previous";
        static final private String UP = "up";
        static final private String NEXT = "next";
        private static MyFrame frame;
        private Pane2 pane2;
        public Pane1(MyFrame frame) {
            super(new BorderLayout());
              frame = frame;
    //          frame.displayPane2();
              pane2 = new Pane2(frame);
            //Create the toolbar.
            JToolBar toolBar = new JToolBar();
            addButtons(toolBar);
            //Create the text area used for output.  Request
            //enough space for 5 rows and 30 columns.
            textArea = new JTextArea(5, 30);
            textArea.setEditable(false);
            JScrollPane scrollPane = new JScrollPane(textArea);
            //Lay out the main panel.
            setPreferredSize(new Dimension(150, 110));
            add(toolBar, BorderLayout.PAGE_START);
           add(scrollPane, BorderLayout.CENTER);
        protected void addButtons(JToolBar toolBar) {
            JButton button = null;
            //first button
            button = makeNavigationButton("Back24", PREVIOUS,
                                          "Back to previous something-or-other",
                                          "Previous");
            toolBar.add(button);
            //second button
            button = makeNavigationButton("Up24", UP,
                                          "Up to something-or-other",
                                          "Up");
            toolBar.add(button);
            //third button
            button = makeNavigationButton("Forward24", NEXT,
                                          "Forward to something-or-other",
                                          "Next");
            toolBar.add(button);
    public Pane2 getPane2()
         return pane2;
    public void workWithFrame()
            String fString = frame.frameString;
            System.out.println (fString);
        protected JButton makeNavigationButton(String imageName,
                                               String actionCommand,
                                               String toolTipText,
                                               String altText) {
            //Look for the image.
            String imgLocation = "toolbarButtonGraphics/navigation/"
                                 + imageName
                                 + ".gif";
            URL imageURL = Pane1.class.getResource(imgLocation);
            //Create and initialize the button.
            JButton button = new JButton();
            button.setActionCommand(actionCommand);
            button.setToolTipText(toolTipText);
            button.addActionListener(this);
            if (imageURL != null) {                      //image found
                button.setIcon(new ImageIcon(imageURL));
            } else {                                     //no image found
                button.setText(altText);
                System.err.println("Resource not found: "
                                   + imgLocation);
            return button;
        public void actionPerformed(ActionEvent e) {
            String cmd = e.getActionCommand();
            String description = null;
            // Handle each button.
            if (PREVIOUS.equals(cmd)) { //first button clicked
                description = "taken you to the previous <something>.";
            } else if (UP.equals(cmd)) { // second button clicked
                description = "taken you up one level to <something>.";
            } else if (NEXT.equals(cmd)) { // third button clicked
                description = "taken you to the next <something>.";
      //      displayResult("If this were a real app, it would have "
      //                      + description);
    //       frame.displayPane2();
        protected void displayResult(String actionDescription) {
            textArea.append(actionDescription + newline);
        public static void main(String[] args) {
            //Create and set up the content pane.
            Pane1 newContentPane = new Pane1();
            newContentPane.setOpaque(true);
    }Why can I call the panes from the frame but not the other way around???
    Thanks in advance!

  • Unable to compile the JAXB generated java files

    Hi
    I am using JAXB 2.0 API for binding process.
    I have products.xml file as
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE PRODUCTDATA SYSTEM "products.dtd">
    <PRODUCTDATA>
    <PRODUCT PRODID="P001" CATEGORY="Books">
    <PRODUCTNAME>Gone with the wind</PRODUCTNAME>
    <DESCRIPTION>This is abt American Civil War</DESCRIPTION>
    <PRICE>25.00</PRICE>
    <QUANTITY>3</QUANTITY>
    </PRODUCT>
    </PRODUCTDATA>
    and products.xsd(Schema file) as
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="PRODUCTDATA" type="prdt"/>
    <xsd:complexType name="prdt">
    <xsd:sequence>
    <xsd:element name="PRODUCT" type="prd" maxOccurs="unbounded" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="prd">
    <xsd:sequence>
    <xsd:element name="PRODUCTNAME" type="xsd:string"/>
    <xsd:element name="DESCRIPTION" type="xsd:string"/>
    <xsd:element name="PRICE" type="xsd:positiveInteger"/>
    <xsd:element name="QUANTITY" type="xsd:nonNegativeInteger"/>
    </xsd:sequence>
    <xsd:attribute name="PRODID" type="pid" use="required"/>
    <xsd:attribute name="CATEGORY" type="xsd:string" use="optional"/>
    </xsd:complexType>
    <xsd:simpleType name="pid">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="[p]{1}/d{3}"/>
    <xsd:length value="4"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>
    I am converting these schema file to java files by using binding compiler xjc.
    So that three java files are genearated automatically.
    1) ObjectFactory.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import javax.xml.bind.JAXBElement;
    import javax.xml.bind.annotation.XmlElementDecl;
    import javax.xml.bind.annotation.XmlRegistry;
    import javax.xml.namespace.QName;
    * This object contains factory methods for each
    * Java content interface and Java element interface
    * generated in the testing.jaxb package.
    * <p>An ObjectFactory allows you to programatically
    * construct new instances of the Java representation
    * for XML content. The Java representation of XML
    * content can consist of schema derived interfaces
    * and classes representing the binding of schema
    * type definitions, element declarations and model
    * groups. Factory methods for each of these are
    * provided in this class.
    @XmlRegistry
    public class ObjectFactory {
    private final static QName PRODUCTDATAQNAME = new QName("", "PRODUCTDATA");
    * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: testing.jaxb
    public ObjectFactory() {
    * Create an instance of {@link Prd }
    public Prd createPrd() {
    return new Prd();
    * Create an instance of {@link Prdt }
    public Prdt createPrdt() {
    return new Prdt();
    * Create an instance of {@link JAXBElement }{@code <}{@link Prdt }{@code >}}
    @XmlElementDecl(namespace = "", name = "PRODUCTDATA")
    public JAXBElement<Prdt> createPRODUCTDATA(Prdt value) {
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value);
    2)Prdt.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    * <p>Java class for prdt complex type.
    * <p>The following schema fragment specifies the expected content contained within this class.
    * <pre>
    * <complexType name="prdt">
    * <complexContent>
    * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    * <sequence>
    * <element name="PRODUCT" type="{}prd" maxOccurs="unbounded"/>
    * </sequence>
    * </restriction>
    * </complexContent>
    * </complexType>
    * </pre>
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "prdt", propOrder = {
    "product"
    public class Prdt {
    @XmlElement(name = "PRODUCT", required = true)
    protected List<Prd> product;
    * Gets the value of the product property.
    * <p>
    * This accessor method returns a reference to the live list,
    * not a snapshot. Therefore any modification you make to the
    * returned list will be present inside the JAXB object.
    * This is why there is not a <CODE>set</CODE> method for the product property.
    * <p>
    * For example, to add a new item, do as follows:
    * <pre>
    * getPRODUCT().add(newItem);
    * </pre>
    * <p>
    * Objects of the following type(s) are allowed in the list
    * {@link Prd }
    public List<Prd> getPRODUCT() {
    if (product == null) {
    product = new ArrayList<Prd>();
    return this.product;
    3) Prd.java
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.0 in JDK 1.6
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2008.06.23 at 04:09:25 PM IST
    package testing.jaxb;
    import java.math.BigInteger;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlAttribute;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    * <p>Java class for prd complex type.
    * <p>The following schema fragment specifies the expected content contained within this class.
    * <pre>
    * <complexType name="prd">
    * <complexContent>
    * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    * <sequence>
    * <element name="PRODUCTNAME" type="{http://www.w3.org/2001/XMLSchema}string"/>
    * <element name="DESCRIPTION" type="{http://www.w3.org/2001/XMLSchema}string"/>
    * <element name="PRICE" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
    * <element name="QUANTITY" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/>
    * </sequence>
    * <attribute name="CATEGORY" type="{http://www.w3.org/2001/XMLSchema}string" />
    * <attribute name="PRODID" use="required" type="{}pid" />
    * </restriction>
    * </complexContent>
    * </complexType>
    * </pre>
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "prd", propOrder = {
    "productname",
    "description",
    "price",
    "quantity"
    public class Prd {
    @XmlElement(name = "PRODUCTNAME", required = true)
    protected String productname;
    @XmlElement(name = "DESCRIPTION", required = true)
    protected String description;
    @XmlElement(name = "PRICE", required = true)
    protected BigInteger price;
    @XmlElement(name = "QUANTITY", required = true)
    protected BigInteger quantity;
    @XmlAttribute(name = "CATEGORY")
    protected String category;
    @XmlAttribute(name = "PRODID", required = true)
    protected String prodid;
    * Gets the value of the productname property.
    * @return
    * possible object is
    * {@link String }
    public String getPRODUCTNAME() {
    return productname;
    * Sets the value of the productname property.
    * @param value
    * allowed object is
    * {@link String }
    public void setPRODUCTNAME(String value) {
    this.productname = value;
    * Gets the value of the description property.
    * @return
    * possible object is
    * {@link String }
    public String getDESCRIPTION() {
    return description;
    * Sets the value of the description property.
    * @param value
    * allowed object is
    * {@link String }
    public void setDESCRIPTION(String value) {
    this.description = value;
    * Gets the value of the price property.
    * @return
    * possible object is
    * {@link BigInteger }
    public BigInteger getPRICE() {
    return price;
    * Sets the value of the price property.
    * @param value
    * allowed object is
    * {@link BigInteger }
    public void setPRICE(BigInteger value) {
    this.price = value;
    * Gets the value of the quantity property.
    * @return
    * possible object is
    * {@link BigInteger }
    public BigInteger getQUANTITY() {
    return quantity;
    * Sets the value of the quantity property.
    * @param value
    * allowed object is
    * {@link BigInteger }
    public void setQUANTITY(BigInteger value) {
    this.quantity = value;
    * Gets the value of the category property.
    * @return
    * possible object is
    * {@link String }
    public String getCATEGORY() {
    return category;
    * Sets the value of the category property.
    * @param value
    * allowed object is
    * {@link String }
    public void setCATEGORY(String value) {
    this.category = value;
    * Gets the value of the prodid property.
    * @return
    * possible object is
    * {@link String }
    public String getPRODID() {
    return prodid;
    * Sets the value of the prodid property.
    * @param value
    * allowed object is
    * {@link String }
    public void setPRODID(String value) {
    this.prodid = value;
    Next step is to compile these three files
    So I am compiling these three files it gives me compiler error as:
    testing/jaxb/ObjectFactory.java:31: illegal character: \64
    @XmlRegistry
    ^
    testing/jaxb/ObjectFactory.java:63: illegal character: \64
    @XmlElementDecl(namespace = "", name = "PRODUCTDATA")
    ^
    testing/jaxb/ObjectFactory.java:65: <identifier> expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/ObjectFactory.java:65: <identifier> expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/ObjectFactory.java:65: '{' expected
    return new JAXBElement<Prdt>(_PRODUCTDATA_QNAME, Prdt.class, null, value
    ^
    testing/jaxb/Prdt.java:38: illegal character: \64
    @XmlAccessorType(XmlAccessType.FIELD)
    ^
    testing/jaxb/Prdt.java:39: illegal character: \64
    @XmlType(name = "prdt", propOrder = {
    ^
    testing/jaxb/Prdt.java:44: illegal character: \64
    @XmlElement(name = "PRODUCT", required = true)
    ^
    testing/jaxb/Prdt.java:45: <identifier> expected
    protected List<Prd> product;
    ^
    testing/jaxb/Prdt.java:69: <identifier> expected
    public List<Prd> getPRODUCT() {
    ^
    testing/jaxb/Prdt.java:75: ';' expected
    ^
    testing/jaxb/Prd.java:43: illegal character: \64
    @XmlAccessorType(XmlAccessType.FIELD)
    ^
    testing/jaxb/Prd.java:44: illegal character: \64
    @XmlType(name = "prd", propOrder = {
    ^
    testing/jaxb/Prd.java:52: illegal character: \64
    @XmlElement(name = "PRODUCTNAME", required = true)
    ^
    testing/jaxb/Prd.java:53: <identifier> expected
    protected String productname;
    ^
    testing/jaxb/Prd.java:54: illegal character: \64
    @XmlElement(name = "DESCRIPTION", required = true)
    ^
    testing/jaxb/Prd.java:55: <identifier> expected
    protected String description;
    ^
    testing/jaxb/Prd.java:56: illegal character: \64
    @XmlElement(name = "PRICE", required = true)
    ^
    testing/jaxb/Prd.java:57: <identifier> expected
    protected BigInteger price;
    ^
    testing/jaxb/Prd.java:58: illegal character: \64
    @XmlElement(name = "QUANTITY", required = true)
    ^
    testing/jaxb/Prd.java:59: <identifier> expected
    protected BigInteger quantity;
    ^
    testing/jaxb/Prd.java:60: illegal character: \64
    @XmlAttribute(name = "CATEGORY")
    ^
    testing/jaxb/Prd.java:61: <identifier> expected
    protected String category;
    ^
    testing/jaxb/Prd.java:62: illegal character: \64
    @XmlAttribute(name = "PRODID", required = true)
    ^
    testing/jaxb/Prd.java:63: <identifier> expected
    protected String prodid;
    ^
    25 errors
    I want all three files to compiled successfully.If it is compiled only then I will continue on Unmarshalling process

    I suspect you are trying to compile the files one by one. You may also be trying to compile them disregarding the package structure.
    From your post, I gather these files are in the package: com.geindustrial.sqms
    Therefore, if they are not so already, put them under a directory structure:
    com/geindustrial/sqms
    and then compile with:
    javac com/geindustrial/sqms/AddCtq.java com/geindustrial/sqms/Ctq.java com/geindustrial/sqms/VariableData.java
    (The above is all on one line.)
    HTH,
    Manuel Amago.

  • Is there a bug in the WebService tutorial for JDeveloper 9i?

    In reading through the JDeveloper 9i tutorial for building a web service, the final step generates the DateTimeServiceStub.java, but the testing that follows does not use this class, it uses the DateTimeService class.
    I built a Web Service based on the this tutorial and when I test with "MyClass.java" it works fine, but when I try to use "MyClassStub.java" it throws the ClassNotFound Exception below:
    java.lang.NoClassDefFoundError: HTTPClient/ModuleException
         at mypackage.RandomQuoteStub.<init>(RandomQuoteStub.java:21)
         at mypackage.RandomQuoteServlet.doGet(RandomQuoteServlet.java:27)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    If we are supposed to use the Stub methods, any thought as to why it fails?
    If we are NOT supposed to use the Stub methods, any thought as to why they are generated.
    (Yes, I am a bit new to Web Service development).
    Thanks in advance for any answers,
    RB

    Hi Richard,
    I ran into another problem when I tried to create a web service and call this web service following the tutorial from Oracle9i JDeveloper Release 2.
    The following error message occured after I ran DateTimeClient class:
    [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type &quot;text/html&quot;, must be: &quot;text/xml&quot;. Response was:
              &lt;DIV class=Section1&gt;
              &lt;P class=MsoNormal
              style=&quot;mso-list: none; mso-list-ins: &apos;&apos; 19991102T2025&quot;&gt;&amp;nbsp;
              &lt;/P&gt;
                  &lt;TABLE border=1 cellPadding=0
              style=&quot;BORDER-BOTTOM: 4.5pt outset; BORDER-LEFT: 4.5pt outset; BORDER-RIGHT:
              4.5pt outset; BORDER-TOP: 4.5pt outset; WIDTH: 100%; mso-cellspacing: 1.5pt&quot;
              width=&quot;100%&quot;&gt;
              &lt;TBODY&gt;
                 &lt;TR&gt;
                 &lt;TD     
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;22%&quot; valign=&quot;top&quot;&gt;
              &lt;P class=MsoNormal&gt;&lt;B&gt;Problem Report&lt;/B&gt;&lt;/P&gt;
                 &lt;/TD&gt;
                 &lt;TD
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;78%&quot; valign=&quot;top&quot;&gt;
              &lt;P class=MsoNormal&gt;The Web proxy was not able to authenticate you through
                    the authentication server because:&amp;#32&amp;#32&lt;b&gt;General authentication failure due to bad user ID or authentication token.&lt;/b&gt;
                    You will not be able to browse the Web through this proxy until your
                    credentials can be retrieved and verified.&lt;/P&gt;
                 &lt;/TD&gt;
                 &lt;/TR&gt;
                 &lt;tr&gt;
                 &lt;td
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;22%&quot; valign=&quot;top&quot;&gt;
              &lt;p class=MsoNormal&gt;&lt;b&gt;Message ID&lt;/b&gt;&lt;/p&gt;
                  &lt;/td&gt;
                  &lt;td
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;22%&quot; valign=&quot;top&quot;&gt;
              &lt;p class=MsoNormal&gt;PROXY_AUTH_FAIL_OTHER
              &lt;p&gt;&lt;/p&gt;
                  &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;TR&gt;
                  &lt;TD
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;22%&quot; valign=&quot;top&quot;&gt;
              &lt;P class=MsoNormal&gt;&lt;B&gt;Problem Description&lt;/B&gt;&lt;/P&gt;
                  &lt;/TD&gt;
                  &lt;TD
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;78%&quot; valign=&quot;top&quot;&gt;
              &lt;P class=MsoNormal&gt;The user verification was not successful.&lt;/P&gt;
                  &lt;/TD&gt;
                  &lt;/TR&gt;
                  &lt;TR&gt;
                  &lt;TD
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              ADDING-TOP: 0.75pt&quot; width=&quot;22%&quot; valign=&quot;top&quot;&gt;
              &lt;P class=MsoNormal&gt;&lt;B&gt;Problem Cause&lt;/B&gt;&lt;/P&gt;
                  &lt;/TD&gt;
                  &lt;TD
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;78%&quot; valign=&quot;top&quot;&gt;
              &lt;P class=MsoNormal&gt;This might be due to transient network problems or due to the
                    user&apos;s not being authorized to use this Web proxy.&lt;/P&gt;
                 &lt;/TD&gt;
                 &lt;/TR&gt;
                 &lt;TR&gt;
                 &lt;TD
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;22%&quot; valign=&quot;top&quot;&gt;
              &lt;P class=MsoNormal&gt;&lt;B&gt;Possible Solution&lt;/B&gt;&lt;/P&gt;
                 &lt;/TD&gt;
                 &lt;TD
              style=&quot;PADDING-BOTTOM: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt;
              PADDING-TOP: 0.75pt&quot; width=&quot;78%&quot; valign=&quot;top&quot;&gt;
                          &lt;P class=MsoNormal&gt;Contact your network support team
                                  if this problem persists, and provide the team your
                                  account information.&lt;/P&gt;
                 &lt;/TD&gt;
                 &lt;/T
         java.lang.String org.apache.soap.rpc.Call.getEnvelopeString(org.apache.soap.transport.SOAPTransport)
         org.apache.soap.rpc.Response org.apache.soap.rpc.Call.invoke(java.net.URL, java.lang.String)
         java.lang.String datetimeclientpackage.DateTimeClientStub.getDate()
         void datetimeclientpackage.DateTimeClient.main(java.lang.String[])
    Exception in thread main
    Process exited with exit code 1.
    By the way, I got the correct information when I tried to load:
    (1) http://159.249.94.139:8888
    (2) http://159.249.94.139:8888/soap/servlet/soaprouter
    which means that oc4j and SOAP server are running properly.
    Do you have any idea what went wrong?
    Thank you in advance.
    - Hao

  • Problem with the firstcup tutorial

    Hi, I'm a developer that is new to Java. I walked through the "firstcup" tutorial using the netbeans 6.5.1 ide and glassfish 2.1 server.
    I thought I had successfuly completed all the code and xml config files.
    When I got to p14.html, "Building, Packaging, Deploying, and Running the firstcup Enterprise Application", I run into a problem trying to run the tutorial app.
    Posted below is the error I get in the webpage. The server log file error is too long to post because of the character limit of this forum.
    If anybody could point me in the right direction I would appreciate it. Also if this question should be posted on a different forum please advise,
    Thanks,
    Paul
    WEBPAGE ERROR
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Cant instantiate class: com.sun.firstcup.web.DukesBDay.. com.sun.firstcup.web.DukesBDay
    root cause
    javax.faces.FacesException: Cant instantiate class: com.sun.firstcup.web.DukesBDay.. com.sun.firstcup.web.DukesBDay
    root cause
    java.lang.ClassNotFoundException: com.sun.firstcup.web.DukesBDay
    note The full stack traces of the exception and its root causes are available in the Sun GlassFish Enterprise Server v2.1 logs.

    Paul,
    What does the below diagnostic message mean to you?
    java.lang.ClassNotFoundException: com.sun.firstcup.web.DukesBDayTell me, I'll confirm or repudiate... and then we'll looking to why that might be the case, leading to what to do about it.
    <aside>
    If you're new to Java then jumping straight into J2EE probably isn't the way to go... especially if you're totally new to programming, especially web-programming... The serverside EE-technology-stack builds on the core Java langauge and API's (J2SE)... and without at-least a basic understanding of the Java language itself I predict that you're going to really really struggle with the EE tutorials... and that therefore you'll probably give up in disgust.
    They call this page [getting started|http://java.sun.com/docs/books/tutorial/getStarted/index.html]... I (for one) think it's aptly named... Nobody gets to skip HelloWorld, or the universe will implode, or something ;-)
    </aside>
    Cheers. Keith.

  • Importing the Ravenna Tutorial Site

    Hello, I was able to import the RVH Tutorial Site and everything went as planned, EXCEPT after it installs then I go and run the Indexer because the doc says that needs to be done before you can view the site in teh browser. Well I went in to the Repository Manager and Ran the "Collection Rebuild Cycle" it Finished and is now sitting idle. I now try to go to the site and I get page not found.
    http://myserver/rvh
    WHY? What am I missing?
    I also went to the files where that folder exists and there is no index.htm like the doc says, I only see the follow:
    sitenavigation.hda 22-Apr-2009 15:35 1.6K
    sitenavigation.js 22-Apr-2009 15:35 9.4K
    sitenavigation.xml 22-Apr-2009 15:35 6.0K
    sitenavigation_co.hda 22-Apr-2009 15:35 1.7K
    sitenavigationfuncti..> 22-Apr-2009 15:35 11K
    Is this correct?
    Any help would be greatly appreciated. Thank you.
    BrettM

    Hi
    I'm still not able to view my site in the Browser.
    here are the Apache conf file settings that i have made:
    LoadModule IdcApacheAuth C:/oracle/ucm/idcm1/shared/os/win32/lib/IdcApache22Auth.dll
    IdcUserDB idcm1 C:/oracle/ucm/idcm1/data/users/userdb.txt
    Alias /idcm1 C:\oracle\ucm\idcm1\weblayout
    <Location /idcm1>
    Order allow,deny
    Allow from all
    DirectoryIndex portal.htm
    IdcSecurity idcm1
    </Location>
    <Location /WH_Nabtrade>
    Order allow,deny
    Allow from all
    DirectoryIndex index.htm
    IdcSecurity idcm1
    </Location>
    <Location /WH_Nabtrade>
    IdcSecurity idcm1
    </Location>
    UseCanonicalName off
    Edited by: Gary on Jun 10, 2010 5:09 AM

  • Life after the DiveLog tutorial

    I have been learning java for a while now, I have studied sun's Java Tutorial and other similar sites. Then after getting a grasp of the basics I moved on to example applications, such as the DiveLog application. My question is 'where do I go from here'? I was wondering if any readers know of any online example application tutorials (similar to the DiveLog or maybe slight more advanced). I found this method of learning more beneficial, (showning the principles being put in action). I am particularly interested in seeing how a java project develops from design to implementation using as much theory as needed and putting it in a form that is interesting to read and practice. Any links to similar projects would be greatly appreciated.
    Incidentally, I am aware the DiveLog tutorial is not yet complete (only up as far as part 4). So if the authors of the tutorial happen to read this article, it would be worth letting the readers know when the next parts will be posted.
    The divelog tutorial has been an excellent tutorial to learn from. Its method of explaining concepts as they were being implemented in a real project provided a more interactive and interesting way of learning than simply explaining theory page by page like most. Hope to see the next parts soon! If there are other similar tutorials out there, in terms of the method of teaching, on whatever subjects of java, please let me know. Thanx for any help.

    This may not be exactly what you are looking for, buy why not consider volunteering some time to help write java for a project that interests you?
    I learned alot about java by volunteering to help write java code for an internet game. It was a fun way to learn, the people were very helpful with any questions I had, they also gave me space on their server, gave me software, etc....
    If that sounds like something you want to look into, check out http://sourceforge.net/
    Look over the list of current projects, maybe something will interest you.

  • I'm stuck! Following the Java Tutorial

    I'm confused :=Q
    I am following the Java tutorial and am trying to do the ClickMe applet. The html file was saved as text in notepad. I downloaded the ClickMe and Spot source files. They compiled without errors along with the html file. I double checked my DIR and saw that I had the class files. When I went to run the applet, the little window appeared without any spot and said something about Clickme class in the heading border and then in the box it said applet not initialized. So, I went through the forum and looked for anything similar and I saw that someone said to compile like:C:\jdk1.3.1_01 javac ClickMe.java Spot.java
    So, I tried that, and I still have class files, but now I don't have the applet box showing anymore and I don't get any errors. I was successful when I did the Hello World applet, so I know it's not a class path problem or text prob. I was using typing appletviewer ClickMe.html
    I'm getting so hungup on trying to get the applets to work I am losing track of how and why they are supposed to work. It is so discouraging especially when there doesn't seem to be anyone in particular to ask.
    Does anyone have anything encouraging to offer?
    I am using JDK 1.3 on WinXP (Java has been totally enabled without using the plug in) It has worked successfully.
    Thanks in advance once again for your help.
    Karen

    I'm learning with the tutorial also ;)
    Makes about 3 months I'm doing so, and from my experience, it is much more fun to create Programs than Applets.. I always work with Swing and it is a pain to use it inside Applets (but Swing is really great to create GUIs..) Learning how to build Jar and how to use Swing helps you building up Jar files that run like EXEs ;) That gives good results!

  • HT4997 I want to burn a movie to a dvd with iMovie but idvd doesn't show up in the "share" menu--why?  My SuperDrive indicates that my DVD+R can be written to.  Please Help.

    I just spent a week creating an iMovie and wanted to burn it to a DVD.  The instruction tutorial said to go to the "Share" menu and select "iDVD", however there is no "iDVD" listed in that memu.  I checked to see that my DVD+R was writeable in my SuperDrive--it is?  Why doesn't "idvd" show in the "share" menu?  Please help, thank you.  Fustrated Mark.

    I may have found a way around this issue. I have the old style mouse with a wired usb connection. I've learned from other discussions that by holding down the 'Control' key and pressing the mouse button on an Apple a menu similar to the right-click menu of a PC will appear. When I tried this from the 'Project Library' on iMovie on my iMAC, a menu appears that DOES contain the export to iDVD choice. This choice is still not visible from the 'Share' menu in the menubar. This appears to be some glitch in the Apple software, but my computer is currently formulating the iMovie into the iDVD format. I have my fingers crossed.

  • How to print the Swing Tutorial

    what's the best practise to print e.g. Creating a GUI With JFC/Swing tutorial ?
    Are the Sun Java Tutorials available in PDF format also ?

    opera02 wrote:
    what's the best practise to print e.g. Creating a GUI With JFC/Swing tutorial ?I think the best practise is to download the entire Java tutorial to your local disks so it can be consulted any time you want, complete with links and the browser ability to 'find' text in the pages.
    Or better still, create a build file that will stamp out the Java Tutorial as a Java Help document set. It is not only viewable, but easily searchable for keywords etc.
    The only thing I can see that makes the tutorial in any way printable, is that it apparently has a print stylesheet attached that hides the links on the left of the the page.
    Why kill more trees, over something that is better viewed using a browser or (the JavaHelp) HelpSet viewer?
    Edit 1:
    BTW - Welcome to the Sun forums.
    Edited by: AndrewThompson64 on Mar 6, 2010 2:30 AM

  • Question about scope in the enum example in the Java Tutorial

    Hi,
    On page http://java.sun.com/docs/books/tutorial/java/javaOO/enum.html of the Java tutorial the enumeration MONDAY is not prefixed with the enum name when it is used in the function tellItLikeItIs.
    public class EnumTest {
         Day day;
         public EnumTest(Day day) {
              this.day = day;
         public void tellItLikeItIs() {
              switch (day) {
                   case MONDAY: System.out.println("Mondays are bad.");
                                  break;
                   case FRIDAY: System.out.println("Fridays are better.");
                                  break;How does the compiler know that MONDAY is the same as Day.MONDAY? Is it because of
    switch(day)Then later in the main MONDAY must be prefixed with Day. I removed Day. and it did not compile. Why is Day. necessary in main but not in tellItLikeItIs?
    public static void main(String[] args) {
              EnumTest firstDay = new EnumTest(Day.MONDAY);
              firstDay.tellItLikeItIs();Thank you.

    swtich is a special case.
    The label for each 'case' of a switch
    will infer based on the type of switch value
    switch(d) {
    case MONDAY:
    case TUESDAY:
    will automatically refer to the MONDAY and TUESDAY
    corresponding to d's type.

  • In the year view, why is iCal coloring the boxes?

    In the year view, why is iCal coloring the boxes and what does each color mean and how do we change it?  It makes no sense or has any rhymn or reason according to what is in my calendar.

    By default it is colored by the number of entries for each day. From white for no entries through yellow to orange and then red for the most entries.
    Hope this helps.

  • I am new to macbook pro, what is the best tutorial video to watch

    I am new to Macbook Pro, what is the best tutorial video to watch?

    There are a lot of videos to watch if you are new to Mac. Apple has got a lot of tutorials and videos in their website > http://www.apple.com/support/macbasics They will help you use OS X.
    Also, you can ask here. We will be glad to answer all your doubts about OS X and your MacBook Pro. Finally, welcome to the Mac

  • I am trying to backup my Itunes onto my external hard drive. I am at the step where I on Itunes, click on File - Library - Organize library. I am suppose to check mark both boxes there, It won't allow me to check mark the second box, why? How to fix this.

    I am trying to backup my Itunes onto my external hard drive. I am at the step where I on Itunes, click on File ->Library ->Organize library. I am suppose to check mark both boxes there, the first being "Consolidate Files" & the second being "Reorganize files in the folder 'Itunes Media'. I am able to checkmark the first box but It won't allow me to check mark the second box, why? How can i fix this? Please help!

    Well you must have made a mistake somewhere. The last instruction of step four reads:
    When you've found your iTunes library folder, drag that folder to your external hard drive. This will begin the iTunes backup. The amount of time the backup will take depends on the size of your library. When the transfer is done, your backup is complete and your external hard drive can be disconnected.
    Normally dragging content from to a new location on a different drive will result in a copy action which is what you were supposed to do. At a guess you somehow managed to move the iTunes folder. Then when you started iTunes it created a new blank library for you assuming it had just been installed rather that raising a warning.
    Close iTunes. Rename the iTunes folder on the internal drive as iTunes (Empty) then copy the iTunes folder from the external back into the User's Music folder. Start iTunes. All should be well.
    When you've made sure it all works please read my User Tip and use that method to backup in future. Since you already have a folder with the backup in place you can skip the "Make New" operation in the fourth step and simply choose the external folder.
    tt2

Maybe you are looking for

  • Spreadsheet will no longer open in iCloud

    Just yesterday a file I've been working on for months will no longer open in Numbers.  The file is in iCloud and the first error I received was a warning on my Mac that the file could not be Autosaved.  I tried to save it manually (to the cloud) but

  • Urgent: please help for DB recovery

    We lost our Oracle database 10g 10.2.0 server hard drives. The OS is Windows Server 2003. I only have the following files in a backup flash_recovery_area on my external drive. Can I recover the data? Serval backup files like: O1_MF_NCSN1_TAG20081023T

  • How do I fix %E2%80%8% when pasting in Address Bar?

    Whenever I copy a nonhyperlinked web address to a specific image, video, forum post, etc. and paste it in the address bar and press return, the page does not display. When I view the history it is adding characters %E2%80%8% in the sublink informatio

  • My 4th Gen iPod touch freezes often and doesn't allow me to play any media.

    I had a replacement for my 4th Gen and after a few months it would play a video but the sound would cut off and for some time it wouldn't play any media and was very unresponsive but came back to normal soon after. However just a few days ago it has

  • IPhoto opens and a white screen appears with no photos

    Hi when I open iPhoto it appears on my screen but is white with no photos and then it shuts down. I was just using iphoto last night and everything worked fine. I have over several thousands of photos and do not want to lose them. I know the photos h