Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28
  1. #21
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,777
    Rep Power
    5

    Default Re: Loading and Scaling Images is not working

    I am at a loss. If the DisplayScaledImages is public and you have a main entry point properly defined and no specifically defined package then it should work. Perhaps you should remove the *.class files and recompile. But I really can't explain the error message. You can try the following just to be certain it is not something systemic.

    Java Code:
    public class HelloWorld {
       public static void main(String [] args) {
             System.out.println("Hello, World!");
       }
    }
    Then:

    javac HelloWorld.java
    java HelloWorld

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  2. #22
    speedbump164 is offline Member
    Join Date
    Jun 2013
    Posts
    22
    Rep Power
    0

    Default Re: Loading and Scaling Images is not working

    Quote Originally Posted by jim829 View Post
    I am at a loss. If the DisplayScaledImages is public and you have a main entry point properly defined and no specifically defined package then it should work. Perhaps you should remove the *.class files and recompile. But I really can't explain the error message. You can try the following just to be certain it is not something systemic.

    Java Code:
    public class HelloWorld {
       public static void main(String [] args) {
             System.out.println("Hello, World!");
       }
    }
    Then:

    javac HelloWorld.java
    java HelloWorld

    Regards,
    Jim
    Sorry for the delay...I got the same error message.

  3. #23
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Loading and Scaling Images is not working

    Copy and post the error message here, verbatim.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #24
    speedbump164 is offline Member
    Join Date
    Jun 2013
    Posts
    22
    Rep Power
    0

    Default Re: Loading and Scaling Images is not working

    Quote Originally Posted by DarrylBurke View Post
    Copy and post the error message here, verbatim.

    db
    Remember, I do not have the PATH variable set so I still navigate to the root of my c drive to compile and run. I work directly out of
    Java Code:
    C:\Program Files\Java\jdk1.7.0_21\bin
    and the compiling is working fine when I type
    Java Code:
    javac \HelloWorld.java
    I can see the class it creates and everything. When I go to run it I type
    Java Code:
    java \HelloWorld
    and I get a message that says Error: Could not find or load main class \HelloWorld
    Thanks for the help,
    Jason

  5. #25
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Loading and Scaling Images is not working

    Remove the backslash

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  6. #26
    speedbump164 is offline Member
    Join Date
    Jun 2013
    Posts
    22
    Rep Power
    0

    Default Re: Loading and Scaling Images is not working

    same error...

  7. #27
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Loading and Scaling Images is not working

    Quote Originally Posted by speedbump164 View Post
    same error...
    So, without the backslash you still get this?
    Quote Originally Posted by speedbump164 View Post
    Error: Could not find or load main class \HelloWorld
    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  8. #28
    speedbump164 is offline Member
    Join Date
    Jun 2013
    Posts
    22
    Rep Power
    0

    Default Re: Loading and Scaling Images is not working

    I typed java HelloWorld and got Error: Could not find or load main class HelloWorld It was the same error as before except without the backslash before HelloWorld

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Loading Images
    By wired-in=p in forum New To Java
    Replies: 9
    Last Post: 02-08-2012, 11:53 PM
  2. The problem with scaling images
    By LianaN in forum AWT / Swing
    Replies: 3
    Last Post: 01-18-2011, 08:52 PM
  3. scaling images
    By willemjav in forum Java Applets
    Replies: 7
    Last Post: 06-19-2008, 09:54 AM
  4. Loading Images - Imp
    By Thulasiraman in forum Advanced Java
    Replies: 0
    Last Post: 01-28-2008, 09:33 AM

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
  •