Page 3 of 3 FirstFirst 123
Results 41 to 45 of 45
  1. #41
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,548
    Rep Power
    23

    Default

    Can you copy ALL of the command prompt console showing the contents of the folder and the command that you entered.

    Did you do this:
    Remove the package statement from the source and recompile the program

  2. #42
    petur170 is offline Member
    Join Date
    May 2011
    Posts
    40
    Rep Power
    0

    Default

    Yes i removed the package line and recompiled it. Well, used the automatically compiled class file made by eclipse.
    Java Code:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    C:\Users\petur170>java ImageBrowser
    Exception in thread "main" java.lang.NoClassDefFoundError: ImageBrowser (wrong n
    ame: DesaturateApplet/ImageBrowser)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
    
    C:\Users\petur170>

  3. #43
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,548
    Rep Power
    23

    Default

    Did you read all of what I posted? Here it is again:

    Can you copy ALL of the command prompt console showing the contents of the folder and the command that you entered.

    Did you do this:
    Remove the package statement from the source and recompile the program

    This statement shows that the package statement is still in the source:
    ImageBrowser (wrong name: DesaturateApplet/ImageBrowser
    The bold is from the package statement.

  4. #44
    petur170 is offline Member
    Join Date
    May 2011
    Posts
    40
    Rep Power
    0

    Default

    Hmm. I thought i removed it. I guess its a problem with the automatic compiling in eclipse. I tried it with javac but it says
    Java Code:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    C:\Users\petur170>javac ImageBrowser
    error: Class names, 'ImageBrowser', are only accepted if annotation processing i
    s explicitly requested
    1 error
    
    C:\Users\petur170>
    Anyways, i did show you ALL of my command prompt.

  5. #45
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,548
    Rep Power
    23

    Default

    When you get an error with a program, go to the API doc and read about how to use the command.

    Go to this site, click on javac (in blue on the second row) then click on the Microsoft Windows version.
    Java SE 6 Documentation

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 2
    Last Post: 06-11-2011, 01:54 PM
  2. Replies: 8
    Last Post: 07-30-2010, 05:47 PM
  3. Offline browsing issues
    By stthepan in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 04-16-2010, 07:50 AM
  4. web browsing
    By mihir786 in forum Advanced Java
    Replies: 2
    Last Post: 11-10-2009, 03:43 AM
  5. Replies: 3
    Last Post: 01-23-2009, 12:11 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •