Missing classes from the javax.swing package?

Can anyone throw any light on what appears to be a missing class from the javax.swing package?
When CelsiusConverter.java from The Swing Tutorial (code fragment shown below) is compiled the JFrame class can't be found.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CelsiusConverter implements ActionListener {
    JFrame converterFrame;Despite the package javax.swing being imported, the compiler does not seem to be be able to find the JFrame class.
CelsiusConverter.java:14: Class JFrame not found in type declaration.
    JFrame converterFrame;To attempt to solve this issue all the files in jdk1.5.0_02\lib were added to CLASSPATH.
CLASSPATH was set to C:\Program Files\Java\jdk1.5.0_02\lib\dt.jar;C:\Program Files\Java\jdk1.5.0_02\lib\htmlconverter.jar;C:\Program Files\Java\jdk1.5.0_02\lib\jconsole.jar;C:\Program Files\Java\jdk1.5.0_02\lib\tools.jar;C:\Program Files\Java\jdk1.5.0_02\lib;C:\Program Files\Java\jdk1.5.0_02\lib\ir.idl;C:\Program Files\Java\jdk1.5.0_02\lib\jawt.lib;C:\Program Files\Java\jdk1.5.0_02\lib\jvm.lib;C:\Program Files\Java\jdk1.5.0_02\lib\orb.idl;C:\Program Files\Java\jdk1.5.0_02\demo\jfc\SwingApplet\SwingApplet.jar;.;c:\CoreJavaBook

This is extremely strange... If you're sure it's not a problem in your code or with your classpath, the only other thing I can think to suggest is re-downloading / installing java

Similar Messages

  • How do I get class in the javax.* package

    How do I get class in the javax.* package

    If possible don't mess with the javax Package
    I mean I could not get the advantage of getting a class under javax Package
    But for information
    make a folder named javax
    Make your class in that folder with starting code as
    package javax;and then compile it and make a jar file and add it to classpath
    It is very simple
    But I think you should not mess with it
    Is there any special requirement?
    Bye for now
    CSJakharia

  • Where is the javax sound package for download?

    Where is the javax sound package for download? (URL) I got the latest JDK yesterday and tried to compile some audio applet but it looks like all of the Javax stuff is missing from the latest JDK.
    Where do I download the javax sound package ?
    Dan

    This is an audio player that another posted here. I tried to compile and run it but here were the results.
    javac SimplePlayerApplet.javaSimplePlayerApplet.java:9: package javax.media does not exist
    import javax.media.*;
    ^
    SimplePlayerApplet.java:11: cannot find symbol
    symbol: class ControllerListener
    public class SimplePlayerApplet extends Applet implements ControllerListener {
    ^
    SimplePlayerApplet.java:14: cannot find symbol
    symbol : class Player
    location: class SimplePlayerApplet
    Player player = null;
    ^
    SimplePlayerApplet.java:122: cannot find symbol
    symbol : class ControllerEvent
    location: class SimplePlayerApplet
    public synchronized void controllerUpdate(ControllerEvent event) {
    ^
    SimplePlayerApplet.java:44: cannot find symbol
    symbol : class MediaLocator
    location: class SimplePlayerApplet
              MediaLocator mrl = null;
              ^
    SimplePlayerApplet.java:63: cannot find symbol
    symbol : class MediaLocator
    location: class SimplePlayerApplet
              if ((mrl = new MediaLocator(mediaFile)) == null)
              ^
    SimplePlayerApplet.java:68: cannot find symbol
    symbol : variable Manager
    location: class SimplePlayerApplet
                        player = Manager.createPlayer(mrl);
                        ^
    SimplePlayerApplet.java:69: cannot find symbol
    symbol : class NoPlayerException
    location: class SimplePlayerApplet
              } catch (NoPlayerException e) {
              ^
    SimplePlayerApplet.java:130: cannot find symbol
    symbol : class RealizeCompleteEvent
    location: class SimplePlayerApplet
         if (event instanceof RealizeCompleteEvent) {
         ^
    SimplePlayerApplet.java:165: cannot find symbol
    symbol : class CachingControlEvent
    location: class SimplePlayerApplet
         } else if (event instanceof CachingControlEvent) {
         ^
    SimplePlayerApplet.java:166: cannot find symbol
    symbol : variable Controller
    location: class SimplePlayerApplet
         if (player.getState() > Controller.Realizing)
         ^
    SimplePlayerApplet.java:170: cannot find symbol
    symbol : class CachingControlEvent
    location: class SimplePlayerApplet
         CachingControlEvent e = (CachingControlEvent) event;
         ^
    SimplePlayerApplet.java:170: cannot find symbol
    symbol : class CachingControlEvent
    location: class SimplePlayerApplet
         CachingControlEvent e = (CachingControlEvent) event;
         ^
    SimplePlayerApplet.java:171: cannot find symbol
    symbol : class CachingControl
    location: class SimplePlayerApplet
         CachingControl cc = e.getCachingControl();
         ^
    SimplePlayerApplet.java:181: cannot find symbol
    symbol : class EndOfMediaEvent
    location: class SimplePlayerApplet
         } else if (event instanceof EndOfMediaEvent) {
         ^
    SimplePlayerApplet.java:184: cannot find symbol
    symbol : class Time
    location: class SimplePlayerApplet
         player.setMediaTime(new Time(0));
         ^
    SimplePlayerApplet.java:186: cannot find symbol
    symbol : class ControllerErrorEvent
    location: class SimplePlayerApplet
         } else if (event instanceof ControllerErrorEvent) {
         ^
    SimplePlayerApplet.java:189: cannot find symbol
    symbol : class ControllerErrorEvent
    location: class SimplePlayerApplet
         Fatal(((ControllerErrorEvent)event).getMessage());
         ^
    SimplePlayerApplet.java:190: cannot find symbol
    symbol : class ControllerClosedEvent
    location: class SimplePlayerApplet
    } else if (event instanceof ControllerClosedEvent) {
    ^
    19 errors
    So what am I missing ...and where do I get it ??
    Dan

  • Using ExecutorService class from java.util.concurrent package

    Dear java programmers,
    I have a question regarding the ExecutorService class from java.util.concurrent package.
    I want to parse hundreds of files and for this purpose I'm implementing a thread pool. The way I use the ExecutorService class is summarized below:
    ExecutorService executor = Executors.newFixedThreadPool(10);
            for (int i = 0; i < 1000; i++){
                System.out.println("Parsing file No "+i);
                executor.submit(new Dock(i));
            executor.shutdown();
            try {
                executor.awaitTermination(30, TimeUnit.SECONDS);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            executor.shutdownNow();However, the code snippet above creates all the 1000 threads (Dock objects) at once and loads them to the executor, and thus I'm worrying about memory leak. I haven't tested it on 1000 files yet but just on 50 small ones, and even if the program prints out "Parsing file No "+i 50 times at once, it executes normally the threads in the background.
    I guess the write way would be to keep the number of active/idle threads in the executor constant (lets say 20 if the thread pool's size is 10) and submit a new one whenever a thread has been finished or terminated. But for this to happen the program should be notified someway whenever a thread is done. Can anybody help me do that?
    thanks in advance,
    Tom

    Ok I found a feasible solution myself although I'm not sure if this is the optimum.
    Here's what I did:
            ExecutorService executor = Executors.newFixedThreadPool(10);
            Future<String> future0, future1, future2, future3, future4, future5, future6, future7, future8, future9;
            Future[] futureArray = {future0 = null, future1 = null, future2 = null, future3 = null, future4 = null, future5 = null,
            future6 = null, future7 = null, future8 = null, future9 = null};
            for (int i = 0; i < 10; i++){
                futureArray[i] = executor.submit(new Dock(i));
            }I created the ExecutorService object which encapsulates the thread pool and then created 10 Future objects (java.util.concurrent.Future) and added them into an Array.
    For java.util.concurrent.Future and Callable Interface usage refer to:
    [http://www.swingwiki.org/best:use_worker_thread_for_long_operations]
    [http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter10/concurrencyTools.html]
    I used a Future[] Array to make the code neater. So after that I submitted -and in this way filled up- the first 10 threads to the thread pool.
            int i = 9;
            while (i < 1000){
                for (int j = 0; j < 10; j++){
                    if (futureArray[j].isDone() && i < 999){
                        try{
                            i++;
                            futureArray[j] = executor.submit(new Dock(i));
                        } catch (ExecutionException ex) {
                            ex.printStackTrace();
                        } catch (InterruptedException ex) {
                            ex.printStackTrace();
                try {
                    Thread.sleep(100); // wait a while
                } catch(InterruptedException iex) { /* ignore */ }
            executor.shutdown();
            try {
                executor.awaitTermination(60, TimeUnit.SECONDS);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            executor.shutdownNow();
        }Each of the future[0-9] objects represents a thread in the thread pool. So essentially I'm check which of these 10 threads has been finished (using the java.util.concurrent.Future.isDone() method) and if yes I replenish that empty future[0-9] object with a new one.

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • How do I get the javax.servlet package?

    I have a simple question. I downloaded the JAVA platform Standard Edition SDK 1.6.0 and find that it doesn't have the javax.servlet package? From where can I get it and how to install and configure?

    hi,
    you don't have servlet in J2SE... you can get it
    from J2EE ... download the latest J2EE .. the
    package is available in j2ee.jar file..
    ou can download it from:
    http://java.sun.com/javaee/downloads/index.jsp
    -- Abdel Raoof Olakara
    http://olakara.googlepages.com
    You are quite wrong my friend... Servlets don't depend on any J2EE container, the only thing you need is a J2SE edition... check this:
    http://en.wikipedia.org/wiki/Java_Servlet
    MeTitus

  • Extracting specific detial about class from the JAVA API created by Javadoc

    hi ,
    Bacialy I need to get detials of all classes from the Java packages for my project. So i thought getting detials from the Java API document might be one way of doing it. If any one tell me some package or software which can get particulat text from the API document that will be great.
    Thank you,
    Raj

    Hi,
    I think, much easier way would be to write a little doclet. That doclet would take the information you need directly from the Doclet API and generate by it a plain text with the content you wish (for instance, as an SQL script that loads everything into a certain database).
    Obtaining this from the generated HTML documentation just adds one extra step (and a lot more complicated, by the way).
    Also, you can avoid even writing a doclet.
    There is a tool called DocFlex/Javadoc:
    http://www.filigris.com/products/docflex_javadoc/
    It is a template-driven doclet, which can be easily programmed to do the job. (However, a license will be needed).
    Regards,
    Leonid Rudy
    http://www.docflex.com

  • I want to call External Java class from the PL/SQL

    Hi,
    I am using Oracle Apps R11i (11.5.7), I wanted to call external Java class from the PL/SQL. This external Java class is residing in another application server.
    How do I do this.
    I know one way. Develop C routine in Oracle Apps to call external java class and call this C routine from the PL/SQL.
    Is there any simple method available? or any other method?
    Thanks in advance.
    -Venkat

    First of all, this is a Java application you're talking about, right (i.e. it has a main() function)? It's not just a class that you're trying to instantiate is it? If it's an application, you obviously have to start a new virtual machine to run it (rather than using the virtual machine built into the database like stored java). I'm a little leary of your mention of an "application server" as this would more commonly mean that a virtual machine is already over there running with access to this class. In which case, you'd typically interface with SOAP or some other RPC API.
    All that aside, as long as you have physical disc access (through NFS or whatever) to the class file, you could use a java wrapper class with a system call to do this. In fact, there is a thread in just the last day or so on this very forum that has the code to do just that (see " Invoking OS Commands from PL/SQL"). However, it's worth noting that the virtual machine will be running on the database server in this case and not the application server.

  • [svn:fx-trunk] 12883: Remove the skin classes from the halo theme project to avoid redundancy with the airframework /framework swcs.

    Revision: 12883
    Revision: 12883
    Author:   [email protected]
    Date:     2009-12-12 15:53:50 -0800 (Sat, 12 Dec 2009)
    Log Message:
    Remove the skin classes from the halo theme project to avoid redundancy with the airframework/framework swcs.
    QE notes: No
    Doc notes: No
    Bugs: SDK-24293
    Reviewer: Glenn
    Tests run: Checkintests, smattering of Halo and AIR mustella tests
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24293
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as
        flex/sdk/trunk/frameworks/projects/halo/build.xml
    Added Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/WindowBackground.as
    Removed Paths:
        flex/sdk/trunk/frameworks/projects/halo/assets/
        flex/sdk/trunk/frameworks/projects/halo/src/HaloClasses.as
        flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/

  • Accessing object of the main class from the thread

    Hi, I'm having problem accessing object of the main class from the thread. I have only one Thread and I'm calling log.append() from the Thread. Object log is defined and inicialized in the main class like this:
    public Text log;  // Text is SWT component
    log = new Text(...);Here is a Thread code:
    ...while((line = br.readLine())!=null) {
         try {
              log.append(line + "\r\n");
         } catch (SWTException swte) {
              ErrorMsg("SWT error: "+swte.getMessage());
    }Error is: org.eclipse.swt.SWTException: Invalid thread access
    When I replace log.append(...) with System.out.println(..) it works just fine, so my question is do the log.append(..) the right way.

    This is NOT a Java problem but a SWT specific issue.
    It is listed on the SWT FAQ page http://www.eclipse.org/swt/faq.php#uithread
    For more help with this you need to ask your question on a SWT specific forum, there is not a thing in these forums. This advice isn't just about SWT by the way but for all specific API exceptions/problems. You should take those questions to the forum or mailing list for that API. This forum is for general problems and exceptions arising from using the "core" Java libraries.

  • I recently had my computer stolen and not my purchases from I tunes store were backed up. I've been told there is a way that I can re-download my missing tracks from the store without having to pay for them again. Is this true, if so, how do go about it.

    I recently had my computer stolen and not my purchases from I tunes store were backed up. I've been told there is a way that I can re-download my missing tracks from the store without having to pay for them again. Is this true, if so, how do go about it.
    Many thanks
    Arkadi de Rakoff

    Unfortunately, redownloading of past music purchases isa still in beta test and only available in the US right now.
    It's due for everyone this fall.  Downloading past purchases from the App Store, iBookstore, and iTunes Store, http://support.apple.com/kb/HT2519
    If you can't wait, contact the iTunes Store Support Team at this link
    If you get lucky, they may be able to authorize another download now.

  • How can you retieve a list of classes from the Library

    Is it possible to retrieve a list of the Linkage or Export
    Classes from a swf library dynamically?
    I am building an application where I allow the user to load
    an asset swf at runtime, then they can choose to load any Exported
    class from the library of the swf. Currently it works if you know
    the name of the asset, that you want to load, but I would like to
    be able to bring up a chooser list of the assets, rather than
    having to type the Class names.
    So far I have only seen examples where "if you know the class
    name you can load it", but nothing concerning pulling the list.
    There must be a list somewhere in flash, I just want to tap into
    that.

    I saw this before and did not have a chance to go through it
    completely.
    As I was reading it, though it did not seem to be giving me
    the answer, as they seem to extend the Export clips in the library
    by extending the class.
    I'll run through that and see.
    It does give me another idea though.
    (crazy) Idea:
    What if I extend the loader class and add a method, kind of
    like what they are doing on the document class of the loaded swf,
    to pull the class names. They hard code in the class names into the
    array though.... so that is the crux of the issue.
    Somehow I think this concept is doomed to fail but, I will
    also see if that is possible.
    I suppose for the application, I could require that any user
    would use a swf with a document class that has the getAssets()
    method.... also has some problems .... namely dealing with the
    issue of "what if they do not extend" and having it fail
    gracefully.
    oh well, food for thought... I will leave this open for now
    and perhaps I will post some answer.

  • How to remove a static class from the Runtime of the JVM

    I want to remove a static class from the Runtime of the JVM.
    My goal is to clear the cache of the "InetAddress.getByName(String host)" static method.
    Thanks in advance.
    Floweb

    Sorry, It means a class that has been loaded in the JVM by the call to a static method......
    Floweb

  • I am looking to upgrade to the entire CC suite from the Lightroom/Photoshop package. The packages page says the complete suite is available to existing customers for 29.99 monthly. But when I try to upgrade I only get one option for 599.99 yearly. Can I g

    I am looking to upgrade to the entire CC suite from the Lightroom/Photoshop package. The packages page says the complete suite is available to existing customers for 29.99 monthly. But when I try to upgrade I only get one option for 599.99 yearly. Can I get clarification on the $29.99 offer and who it is available for. Thank you

    Hi there
    The 29.99 introductory offer is for existing CS customers ie customers with a CS3-CS6 product (suite or individual product).
    Hope this clarifies matters.
    Thanks
    Bev

  • Development kit which includes the javax.servlet package

    Which java development kit(s) contain the javax.servlet package.v I can't seem to find one. Thanks

    You might want to ask this on the Java forum - but if you want to run a servlet you need a Java EE server - something like Glassfish or WebLogic or Tomcat.
    The Java forums are here:
    https://forums.oracle.com/forums/category.jspa?categoryID=285
    Right now you are in the JDeveloper forum - and by the way, if you download JDeveloper you'll get everything you need to develop and test run your servlet.

Maybe you are looking for

  • Why is the LookUp object in the Flow Task of my SSIS package going red (and not working) ? Sql Server 2008 R2

    I have been working with the Sql Server 2008 R2 SSIS Tutorial at https://msdn.microsoft.com/en-us/library/ms170419(v=sql.105).aspx --specifically -- Lesson 1.  I have been having some problems with this lesson where the source data from the samples d

  • Importing itunes into final cut express

    I just bought an IMAC with Final Cut Express to do all my video editing of my kids activities. I used Pinnacle Studio on my old PC prior to this but it finally gave out. I downloaded some music CD's I had into itunes and then tried importing the musi

  • How do i synce two different ipods with one computer??

    i recently purchased an ipod 5th generation for my other half which i have set up an account for and comes up when i plug in but the home page always comes up with my ipod stuff which is a 4th generation ipod. i have no problem with mine as it stores

  • Transporter - Basic installation and connection questions

    We have never used or installed the Transporter before.  We are currently using Tidal 5.3x and are upgrading a sandbox environment to 6.2.  I have looked at all the transporter documentation I can find and am still missing some very basic questions -

  • E5 not accessing gmail

    my e5 is troubling me as it can't access my gmail account. it started about three weeks ago when my one year old e5 stopped syncing with both ovimail and gmail accounts. after some effort i used manual setting suggested in a thread in this forum. it