Package com.sun.java.swing not found in import

I'm trying to show graphic information but the swing package does not load up don't know what is going on Any help is welcome
THIS IS THE LINE I GET WHEN I TRY TO IMPORT SWING
Package com.sun.java.swing not found in import

I'm trying to show graphic information but the swing
package does not load up don't know what is going on
Any help is welcome
THIS IS THE LINE I GET WHEN I TRY TO IMPORT SWING
Package com.sun.java.swing not found in importThat's an old package reference. Try javax.swing

Similar Messages

  • FirstGUI.java:7: Package java.swing not found in import.

    Hi,
    I am currently taking JAVA at UGA and am trying to learn the GUI part on my own, since our professor is not going to cover this. This is the first error I get when I compile the program. Any help is greatly appreciated...
    Thanks,
    Joe
    Below is the program...
    /* A first GUI. This class creates a label and a button. The count in the label is incremented each
    time that the button is pressed.
    import java.awt.*;
    import java.awt.event.*;
    import java.swing.*;
    public class FirstGUI extends JPanel {
         // Instance variables
         private int count = 0;          // Number of pushes
         private JButton pushButton;     // Push button
         private JLabel label;          // Label
         // Initialization method
         public void init() {
              // Set the layout manager
              setLayout( new BorderLayout() );
              // Create a label to hold the push count
              label = new JLabel("Push Count: 0");
              add( label, BorderLayout.NORTH );
              label.setHorizontalAlignment( label.CENTER );
              // Create a button
              pushButton = new JButton("Test Button");
              pushButton.addActionListener( new ButtonHandler (this) );
              add( pushButton, BorderLayout.SOUTH );
              // Method to update push count
              public void updateLabel() {
                   label.setText( "Push Count: " + (++count) );
         // Main method to create frame
         public static void main(String a[]) {
              // Create a frame to hold the application
              JFrame fr = new JFrame("FirstGUI ...");
              fr.setSize(200,100);
              // Create a Window Listener to handle "close" events
              WindowHandler 1 = new WindowHandler();
              fr.addWindowListener(1);
              // Create and initialize a FirstGUI object
              FirstGUI fg = new FirstGUI();
              fg.init();
              // Add the object to the center of the frame
              fr.getContentPane().add(fg, BorderLayout.CENTER);
              // Display the frame
              fr,setVisible( true );
    class ButtonHandler implements ActionListener {
         private FirstGUI fg;
         // Constructor
         public ButtonHandler ( FirstGUI fg1 ) {
              fg = fg1;
         // Execute when an event occurs
         public void actionPerformed( ActionEvent e ) {
              fg.updateLabel();
    }

    The error is below...
    A:\ENGR1140>javac FirstGUI.java
    FirstGUI.java:39: Identifier expected.
    public static void main(String s[]) {
    ^
    FirstGUI.java:39: 'class' or 'interface' keyword expected.
    public static void main(String s[]) {
    ^
    I don't think the actual error is on line 39, I looked in the book that has the code and line 39 is typed just as it is shown in the book.
    Below is the program...
    /* A first GUI. This class creates a label and a button. The count in the label is incremented each
    time that the button is pressed.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class FirstGUI extends JPanel {
         // Instance variables
         private int count = 0;          // Number of pushes
         private JButton pushButton;     // Push button
         private JLabel label;          // Label
         // Initialization method
         public void init() {
              // Set the layout manager
              setLayout( new BorderLayout() );
              // Create a label to hold the push count
              label = new JLabel("Push Count: 0");
              add( label, BorderLayout.NORTH );
              label.setHorizontalAlignment( label.CENTER );
              // Create a button
              pushButton = new JButton("Test Button");
              pushButton.addActionListener( new ButtonHandler (this) );
              add( pushButton, BorderLayout.SOUTH );
              // Method to update push count
              public void updateLabel() {
                   label.setText( "Push Count: " + (++count) );
         // Main method to create frame
         public static void main(String s[]) {
              // Create a frame to hold the application
              JFrame fr = new JFrame("FirstGUI ...");
              fr.setSize(200,100);
              // Create a Window Listener to handle "close" events
              WindowHandler 1 = new WindowHandler();
              fr.addWindowListener(1);
              // Create and initialize a FirstGUI object
              FirstGUI fg = new FirstGUI();
              fg.init();
              // Add the object to the center of the frame
              fr.getContentPane().add(fg, BorderLayout.CENTER);
              // Display the frame
              fr,setVisible( true );
    class ButtonHandler implements ActionListener {
         private FirstGUI fg;
         // Constructor
         public ButtonHandler ( FirstGUI fg1 ) {
              fg = fg1;
         // Execute when an event occurs
         public void actionPerformed( ActionEvent e ) {
              fg.updateLabel();

  • Build error :package com.sun.javadoc does not exist

    Question from a Turing machine expert who is new to Java.
    Trying to run a sample program from Richardson's book "Java JDK 5 Edition" Chapter 1.
    In Netbeans 5.5 receive build error :package com.sun.javadoc does not exist
    for "import com.sun.javadoc.*;"
    Believe missing classes are in tools.jar in C:\Sun\SDKee5SDK\jdk\lib
    How do I define this to Netbeans and/or JDK?
    Using java_ee_sdk-5_01
    and netbeans-5_5-windows downloads.
    Platform is XP.
    Netbeans has been updated to date.
    Appreciate.

    sony_tj wrote:
    D:\Xyz.java:22: package com.sun.javadoc does not exist
    import com.sun.javadoc.*;After getting this error, I have set my classpath to C:\Program Files\Java\jdk1.5.0_03\lib\tools.jar. But still the error persists. Could anyone please tell me how do I solve this problem.You have failed in setting your classpath in that case.

  • Jdk1.3.1 'com.sun.java.swing does not exist'???

    Thats what the compiler tells me, though it finds javac with no problem in the
    jdk1.3.1 lib directory. Any clue to what I'm missing here? Thanks nt

    Swing used to be in the com.sun.java.swing package in the very earliest releases, but now it is in the javax.swing package.

  • Error in parsing: SAX2 driver class com.sun.xml.parser not found

    Hi I have this exception
    Error in parsing: SAX2 driver class com.sun.xml.parser not found
    when I try to run the examples from the book xml and java
    I have added the following jar files to the class path that i have download form java.sun.com
    xml.jar
    xalan.jar
    jaxp.jar
    crimson.jar
    Please can anyone tell me what is missing or wrong..the code must be right since written by oreilly... please have u any ideA
    XMLReaderFactory.createXMLReader(
    // "org.apache.xerces.parsers.SAXParser");
                        "com.sun.xml.parser");//
    I HAVE ONLY CHANGED THIS LINE FROM THE apache parser..to com.sun.xml.parser
    THIS IS THE ALL CODE
    import java.io.IOException;
    import org.xml.sax.Attributes;
    import org.xml.sax.ContentHandler;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.Locator;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.XMLReaderFactory;
    import org.xml.sax.*;
    * <b><code>SAXParserDemo</code></b> will take an XML file and parse it using SAX,
    * displaying the callbacks in the parsing lifecycle.
    * @author Brett McLaughlin
    * @version 1.0
    public class SAXParserDemo {
    * <p>
    * This parses the file, using registered SAX handlers, and output
    * the events in the parsing process cycle.
    * </p>
    * @param uri <code>String</code> URI of file to parse.
    public void performDemo(String uri) {
    System.out.println("Parsing XML File: " + uri + "\n\n");
    // Get instances of our handlers
    ContentHandler contentHandler = new MyContentHandler();
    ErrorHandler errorHandler = new MyErrorHandler();
    try {
    // Instantiate a parser
    XMLReader parser =
    XMLReaderFactory.createXMLReader(
    // "org.apache.xerces.parsers.SAXParser");
                        "com.sun.xml.parser");// I HAVE ONLY CHANGED THIS LINE FROM THE apache parser..
    // Register the content handler
    parser.setContentHandler(contentHandler);
    // Register the error handler
    parser.setErrorHandler(errorHandler);
    // Parse the document
    parser.parse(uri);
    } catch (IOException e) {
    System.out.println("Error reading URI: " + e.getMessage());
    } catch (SAXException e) {
    System.out.println("Error in parsing: " + e.getMessage());
    * <p>
    * This provides a command line entry point for this demo.
    * </p>
    public static void main(String[] args) {
    // if (args.length != 1) {
    // System.out.println("Usage: java SAXParserDemo [XML URI]");
    // System.exit(0);
    //String uri = args[0];
    SAXParserDemo parserDemo = new SAXParserDemo();
    parserDemo.performDemo("content.xml");
    * <b><code>MyContentHandler</code></b> implements the SAX
    * <code>ContentHandler</code> interface and defines callback
    * behavior for the SAX callbacks associated with an XML
    * document's content.
    class MyContentHandler implements ContentHandler {
    /** Hold onto the locator for location information */
    private Locator locator;
    * <p>
    * Provide reference to <code>Locator</code> which provides
    * information about where in a document callbacks occur.
    * </p>
    * @param locator <code>Locator</code> object tied to callback
    * process
    public void setDocumentLocator(Locator locator) {
    System.out.println(" * setDocumentLocator() called");
    // We save this for later use if desired.
    this.locator = locator;
    * <p>
    * This indicates the start of a Document parse - this precedes
    * all callbacks in all SAX Handlers with the sole exception
    * of <code>{@link #setDocumentLocator}</code>.
    * </p>
    * @throws <code>SAXException</code> when things go wrong
    public void startDocument() throws SAXException {
    System.out.println("Parsing begins...");
    * <p>
    * This indicates the end of a Document parse - this occurs after
    * all callbacks in all SAX Handlers.</code>.
    * </p>
    * @throws <code>SAXException</code> when things go wrong
    public void endDocument() throws SAXException {
    System.out.println("...Parsing ends.");
    * <p>
    * This will indicate that a processing instruction (other than
    * the XML declaration) has been encountered.
    * </p>
    * @param target <code>String</code> target of PI
    * @param data <code>String</code containing all data sent to the PI.
    * This typically looks like one or more attribute value
    * pairs.
    * @throws <code>SAXException</code> when things go wrong
    public void processingInstruction(String target, String data)
    throws SAXException {
    System.out.println("PI: Target:" + target + " and Data:" + data);
    * <p>
    * This will indicate the beginning of an XML Namespace prefix
    * mapping. Although this typically occur within the root element
    * of an XML document, it can occur at any point within the
    * document. Note that a prefix mapping on an element triggers
    * this callback <i>before</i> the callback for the actual element
    * itself (<code>{@link #startElement}</code>) occurs.
    * </p>
    * @param prefix <code>String</code> prefix used for the namespace
    * being reported
    * @param uri <code>String</code> URI for the namespace
    * being reported
    * @throws <code>SAXException</code> when things go wrong
    public void startPrefixMapping(String prefix, String uri) {
    System.out.println("Mapping starts for prefix " + prefix +
    " mapped to URI " + uri);
    * <p>
    * This indicates the end of a prefix mapping, when the namespace
    * reported in a <code>{@link #startPrefixMapping}</code> callback
    * is no longer available.
    * </p>
    * @param prefix <code>String</code> of namespace being reported
    * @throws <code>SAXException</code> when things go wrong
    public void endPrefixMapping(String prefix) {
    System.out.println("Mapping ends for prefix " + prefix);
    * <p>
    * This reports the occurrence of an actual element. It will include
    * the element's attributes, with the exception of XML vocabulary
    * specific attributes, such as
    * <code>xmlns:[namespace prefix]</code> and
    * <code>xsi:schemaLocation</code>.
    * </p>
    * @param namespaceURI <code>String</code> namespace URI this element
    * is associated with, or an empty
    * <code>String</code>
    * @param localName <code>String</code> name of element (with no
    * namespace prefix, if one is present)
    * @param rawName <code>String</code> XML 1.0 version of element name:
    * [namespace prefix]:[localName]
    * @param atts <code>Attributes</code> list for this element
    * @throws <code>SAXException</code> when things go wrong
    public void startElement(String namespaceURI, String localName,
    String rawName, Attributes atts)
    throws SAXException {
    System.out.print("startElement: " + localName);
    if (!namespaceURI.equals("")) {
    System.out.println(" in namespace " + namespaceURI +
    " (" + rawName + ")");
    } else {
    System.out.println(" has no associated namespace");
    for (int i=0; i<atts.getLength(); i++)
    System.out.println(" Attribute: " + atts.getLocalName(i) +
    "=" + atts.getValue(i));
    * <p>
    * Indicates the end of an element
    * (<code></[element name]></code>) is reached. Note that
    * the parser does not distinguish between empty
    * elements and non-empty elements, so this will occur uniformly.
    * </p>
    * @param namespaceURI <code>String</code> URI of namespace this
    * element is associated with
    * @param localName <code>String</code> name of element without prefix
    * @param rawName <code>String</code> name of element in XML 1.0 form
    * @throws <code>SAXException</code> when things go wrong
    public void endElement(String namespaceURI, String localName,
    String rawName)
    throws SAXException {
    System.out.println("endElement: " + localName + "\n");
    * <p>
    * This will report character data (within an element).
    * </p>
    * @param ch <code>char[]</code> character array with character data
    * @param start <code>int</code> index in array where data starts.
    * @param end <code>int</code> index in array where data ends.
    * @throws <code>SAXException</code> when things go wrong
    public void characters(char[] ch, int start, int end)
    throws SAXException {
    String s = new String(ch, start, end);
    System.out.println("characters: " + s);
    * <p>
    * This will report whitespace that can be ignored in the
    * originating document. This is typically only invoked when
    * validation is ocurring in the parsing process.
    * </p>
    * @param ch <code>char[]</code> character array with character data
    * @param start <code>int</code> index in array where data starts.
    * @param end <code>int</code> index in array where data ends.
    * @throws <code>SAXException</code> when things go wrong
    public void ignorableWhitespace(char[] ch, int start, int end)
    throws SAXException {
    String s = new String(ch, start, end);
    System.out.println("ignorableWhitespace: [" + s + "]");
    * <p>
    * This will report an entity that is skipped by the parser. This
    * should only occur for non-validating parsers, and then is still
    * implementation-dependent behavior.
    * </p>
    * @param name <code>String</code> name of entity being skipped
    * @throws <code>SAXException</code> when things go wrong
    public void skippedEntity(String name) throws SAXException {
    System.out.println("Skipping entity " + name);
    * <b><code>MyErrorHandler</code></b> implements the SAX
    * <code>ErrorHandler</code> interface and defines callback
    * behavior for the SAX callbacks associated with an XML
    * document's errors.
    class MyErrorHandler implements ErrorHandler {
    * <p>
    * This will report a warning that has occurred; this indicates
    * that while no XML rules were "broken", something appears
    * to be incorrect or missing.
    * </p>
    * @param exception <code>SAXParseException</code> that occurred.
    * @throws <code>SAXException</code> when things go wrong
    public void warning(SAXParseException exception)
    throws SAXException {
    System.out.println("**Parsing Warning**\n" +
    " Line: " +
    exception.getLineNumber() + "\n" +
    " URI: " +
    exception.getSystemId() + "\n" +
    " Message: " +
    exception.getMessage());
    throw new SAXException("Warning encountered");
    * <p>
    * This will report an error that has occurred; this indicates
    * that a rule was broken, typically in validation, but that
    * parsing can reasonably continue.
    * </p>
    * @param exception <code>SAXParseException</code> that occurred.
    * @throws <code>SAXException</code> when things go wrong
    public void error(SAXParseException exception)
    throws SAXException {
    System.out.println("**Parsing Error**\n" +
    " Line: " +
    exception.getLineNumber() + "\n" +
    " URI: " +
    exception.getSystemId() + "\n" +
    " Message: " +
    exception.getMessage());
    throw new SAXException("Error encountered");
    * <p>
    * This will report a fatal error that has occurred; this indicates
    * that a rule has been broken that makes continued parsing either
    * impossible or an almost certain waste of time.
    * </p>
    * @param exception <code>SAXParseException</code> that occurred.
    * @throws <code>SAXException</code> when things go wrong
    public void fatalError(SAXParseException exception)
    throws SAXException {
    System.out.println("**Parsing Fatal Error**\n" +
    " Line: " +
    exception.getLineNumber() + "\n" +
    " URI: " +
    exception.getSystemId() + "\n" +
    " Message: " +
    exception.getMessage());
    throw new SAXException("Fatal Error encountered");

    I have seen this error when I'm executing inside one of the (j2ee sun reference implementation) server containers (either web or ejb). I believe its caused by "something" having previously loaded the "sax 1 driver class". In my case, I think the container or server is loading the sax parser from a jar that contains a sax 1 version. If you can, ensure that nothing is loading the sax 1 parser from another jar on your system. Verify that you are loading the sax parser from a jar containing the latest version so that you get the sax 2 compliant parser. Good luck!

  • Package com.sun.javadoc does not exist

    D:\Xyz.java:22: package com.sun.javadoc does not exist
    import com.sun.javadoc.*;After getting this error, I have set my classpath to C:\Program Files\Java\jdk1.5.0_03\lib\tools.jar. But still the error persists. Could anyone please tell me how do I solve this problem.

    sony_tj wrote:
    D:\Xyz.java:22: package com.sun.javadoc does not exist
    import com.sun.javadoc.*;After getting this error, I have set my classpath to C:\Program Files\Java\jdk1.5.0_03\lib\tools.jar. But still the error persists. Could anyone please tell me how do I solve this problem.You have failed in setting your classpath in that case.

  • Package javax.swing not found in import!

    I recently installed JDK 1.3.1_02 on WinNT4.0 and I cannot compile javax
    packages without getting the following error:
    Package javax.swing not found in import
    I've tried every combination of modifying the CLASSPATH system variable
    I can think of. I have no problem compiling java packages but not
    javax packages. I followed the installation instructions to the letter.
    What am I missing? Surely someone is running the same version of
    the JDK I am on WinNT 4.0.

    Thanks again!!! I had an older version of javac running on my system any time I ran
    outside of the bin where the latest javac was installed. I removed the older version
    of the jdk and now I can compile from any directory. I really appreciate the help,
    I was wracking my brain.
    By the way, -version is not a valid flag for javac.exe, although it is for java.exe.
    signed,
    grateful in cyberspace

  • Package org.apache.axis.message not found in import.

    Hi,
    I am using axis to give response to another bpel process after any operation is completed of a BPEL process.I am using JDeveloper to deploy my bpel process.It has succesfully deployed process without any error but when bpel server is unpacking it and deploying it to oc4j,it get error:
    Package org.apache.axis.message not found in import.
    06/02/08 12:40:40 import org.w3c.dom.Element;import java.util.Calendar;import java.util.Date;import com.collaxa.cube.engine.ext.process;
    import com.oracle.services.bpel.task.*;import com.oracle.bpel.client.BPELFault;import com.collaxa.cube.xml.schema.XMLSchemaUtils;import com.
    oracle.bpel.client.util.WhereCondition;import com.oracle.bpel.client.Locator;import com.oracle.bpel.client.delivery.IDeliveryService;import
    com.oracle.bpel.client.NormalizedMessage;import com.oracle.bpel.client.IInstanceHandle;import com.oracle.bpel.client.ServerException;import
    com.oracle.services.bpel.Process.*;import org.apache.axis.message.*;import javax.xml.soap.Name;
    I have manually copied all axis jars to
    1)OraBPEL\integration\orabpel\system\appserver\oc4j\j2ee\home\applib
    2)OraBPEL\integration\orabpel\lib
    But no use.
    Can anybody help!

    I've put a lot og jar files in the bpel-inf/lib but it looks as if they are not in the class path when I need them. The result is a ClassNotFoundException? Do I have to specify anything else? I've put a class in the bpel-inf/classes and it looks to me as if it is found by the BPM.

  • Com.sun.java.swing.*; ??

    I have notice these class references in a couple of sample programs.
    Do these come with every installation of the jre. I have 1.4 install
    and when i reference these library..I am told they don't exist..
    What are they ??
    Where do they come from ??
    How do I get them running in my apps.
    aj

    Anything in the
    sun.*
    and
    com.sun.*
    should not be used directly by you (unless the API's say so), yes the L&F's live in this name space, as does the native bits of Java and the basic implementations of stuff you can only get at via factorys but you still should not use them (unless you are going via the factory, and then you should never rely on it being the same between JREs).

  • Deployment problem on WLS8.1sp3: com.sun.javac.Main not found

    Hi,
    I have a curious problem, after adding some simple (logging) code to an Session Bean, the EAR file will not deploy. I get the message below concerning compilation problems. If however I restore the Session Bean to the previous state, and having build a new EAR file, the erro persists. What is this strange behaviour, has this to do with weblogic settings for the EAR file of whatever ?
    NB I also have tried to include the tool.lib jar in the projekt but that doesn't solve the problem.
    Any help would be appreciated,
    Harry van Rijn
    Exception:weblogic.management.ApplicationException: prepare failed for UasEJB.jar Module: UasEJB.jar Error: Exception preparing module: EJBModule(UasEJB.jar,status=NEW) Unable to deploy EJB: UasEJB.jar from UasEJB.jar: Compiler class: 'com.sun.tools.javac.Main', not found at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:274) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407) at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493) at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:762) at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:700) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1317) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule

    hi,
    i am migrating my application from wls7.0sp2 to wls8.1 sp3. i am using weblogic.ejbc to make my ear in my ant build script.
    My Classpath settings are > C:\bea8.1\weblogic81\server\lib\weblogic.jar;C:\j2sdk1.4.2_08\lib\tools.jar;
    My Path Settings are > C:\j2sdk1.4.2_08\bin;C:\j2sdk1.4.2_08\jre\bin;
    i am getting the error message>>
    [java] Compiler class: 'com.sun.tools.javac.Main', not found
    [java] java.lang.ClassNotFoundException: com.sun.tools.javac.Main
    [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    [java] at java.security.AccessController.doPrivileged(Native Method)
    [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    [java] at java.lang.Class.forName0(Native Method)
    [java] at java.lang.Class.forName(Class.java:141)
    [java] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:406)
    [java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328)
    [java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:517)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:146)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:103)
    [java] at weblogic.ejbc.main(ejbc.java:29)
    [java] ERROR: Error from ejbc: Compiler class: 'com.sun.tools.javac.Main', not found
    [java] ERROR: ejbc couldn't invoke compiler

  • Problem wtih deploying EAR: com.sun.javac.Main NOT FOUND

    Hi,
    I have a curious problem, after adding some simple (logging) code to an Session Bean, the EAR file will not deploy. I get the message below concerning compilation problems. If however I restore the Session Bean to the previous state, and having build a new EAR file, the erro persists. What is this strange behaviour, has this to do with weblogic settings for the EAR file of whatever ?
    NB I also have tried to include the tool.lib jar in the projekt but that doesn't solve the problem.
    Any help would be appreciated,
    Harry van Rijn
    Exception:weblogic.management.ApplicationException: prepare failed for UasEJB.jar Module: UasEJB.jar Error: Exception preparing module: EJBModule(UasEJB.jar,status=NEW) Unable to deploy EJB: UasEJB.jar from UasEJB.jar: Compiler class: 'com.sun.tools.javac.Main', not found at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:274) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407) at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493) at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:762) at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:700) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1317) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule

    hi,
    i am migrating my application from wls7.0sp2 to wls8.1 sp3. i am using weblogic.ejbc to make my ear in my ant build script.
    My Classpath settings are > C:\bea8.1\weblogic81\server\lib\weblogic.jar;C:\j2sdk1.4.2_08\lib\tools.jar;
    My Path Settings are > C:\j2sdk1.4.2_08\bin;C:\j2sdk1.4.2_08\jre\bin;
    i am getting the error message>>
    [java] Compiler class: 'com.sun.tools.javac.Main', not found
    [java] java.lang.ClassNotFoundException: com.sun.tools.javac.Main
    [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    [java] at java.security.AccessController.doPrivileged(Native Method)
    [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    [java] at java.lang.Class.forName0(Native Method)
    [java] at java.lang.Class.forName(Class.java:141)
    [java] at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:406)
    [java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328)
    [java] at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:517)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:146)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:103)
    [java] at weblogic.ejbc.main(ejbc.java:29)
    [java] ERROR: Error from ejbc: Compiler class: 'com.sun.tools.javac.Main', not found
    [java] ERROR: ejbc couldn't invoke compiler

  • Com.sun.java.swing package not found

    All my other programs compile fine if they're not using that package

    yea...wrong import....
    use
    import javax.swing.*;notice the X

  • Package com.sun.j3d does not exist (Linux - Fedora Core 6 - jdk 5.0)

    Here's the thing.
    I realize it's probably a classpath issue, but I don't know where to put the libraries. Compiling non-3d code works fine, which leads me to believe that running the j3d installer in the right place ought to put the libraries in the right place and let me use them. Clearly this is not the case.
    Now I've tried to fiddle with the classpath, specifically I've put this into my .bash_profile:
    CLASSPATH=.:$CLASSPATH:$HOME/Libraries/ext:$HOME/Libraries/i386
    export CLASSPATH
    And stored the jars in a libraries folder on my home directory
    Odd thing: echo $CLASSPATH sends out empty, like CLASSPATH isn't even defined. How do I fix that? And if that's true, why is the regular javac working?

    Duplicate, answered here
    http://forum.java.sun.com/thread.jspa?threadID=5197667

  • Package com.sun.j3d does not exist (Linux - Fedora Core 6)

    I posted this on the 3d forums also, but it really has nothing to do with 3d but the classpath (I assume) so posting it here might work better.
    Here's the thing.
    I realize it's probably a classpath issue, but I don't know where to put the libraries. Compiling non-3d code works fine, which leads me to believe that running the j3d installer in the right place ought to put the libraries in the right place and let me use them. Clearly this is not the case.
    Now I've tried to fiddle with the classpath, specifically I've put this into my .bash_profile:
    CLASSPATH=.:$CLASSPATH:$HOME/Libraries/ext:$HOME/Libraries/i386
    export CLASSPATH
    And stored the jars in a libraries folder on my home directory
    Odd thing: echo $CLASSPATH sends out empty, like CLASSPATH isn't even defined. How do I fix that? And if that's true, why is the regular javac working?

    Use
    . .bash_profile
    P.S. Where did you find the information to use
    .bash_profile. I would expect you to set the
    classpath in .bashrc, .profile or, to allow all to
    get the same environment, in /etc/bashrc .I tried . .bash_profile and got this answer:
    bash: CLASSPATH: command not foundAnd I don't recall how I decided to use .bash_profile, but .profile doesn't exist and I don't understand the syntax in .bashrc and it frightens me.

  • Com.sun.java package

    Hi,
    What is the different between javax.swing and com.sun.java.swing package ? Are they the same ?
    Where can I download com.sun.java.swing package ?
    Regards,
    Lim Boon Sun

    The official Sun statement is that one should only use the classes listed in the APIs, i.e. javax.swing.*. Classes in packages such as com.sun.* contain version dependent implementations and are subject to change without notice. So, if you use them in your programs, it is very likely that your programs will not run under future (and previous) versions of the JRE.
    So, just like the other fellow said, STICK TO THE javax.swing.* packages !

Maybe you are looking for

  • Can't open TIF file.

    I've tried to open the file in Preview, but I get this message (as others have): "The file could not be opened.  It may be damaged or use a file format tha Preview doesn't recognize." So then I followed other directions, which said to right click and

  • Urgent Help - OBIEE11.1.1.6 SSO INTEGRATION WITH RSA CLEARTRUST

    Can anyone help me what are the steps that need to be done to integrate OBIEE 11G Single sign on with RSA Clear trust. Any help will be appreciated

  • Problem while sending attachment thru 'SO_DOCUMENT_SEND_API1'

    Hi Experts , I am trying to send two excel files thrugh the function module 'SO_DOCUMENT_SEND_API1' . Attachments are reaching the destination email address successfully , But along with two attacments its sending one more .txt  file also in which em

  • How many Hard Drives ?

    I've been fortunate to receive a PowerMac G4 733mhz (Digital Audio) along with a Sony 20" CRT monitor at no cost and I'm looking to get all the performance that I can out of it. So far I've maxed out the RAM and added an iogear USB 2.0 card along wit

  • Use variable in mapping

    Hi! How to use Variable in mapping ? I've tried #PROJECT_CODE.VARIABLE_NAME but execution ends with an error "Illegal character" With regards, PsmakR