Set CLASSPATH does not work, how do I run java.exe?

Hi guys,
I have a problem running the java.exe and I'm using Win XP. Here is my problem:
Under the command prompt, I set the path: path = C:\Program Files\Java 2\j2sdk1.4.2_05\bin
Then I created a folder in E:\Hello. I save my Hello.java in that folder, and I compiled it:
javac Hello.java
Now, there is a Hello.class created in that folder.
Then I try to run it: java Hello
but I got an error: "Exception in thread "main" java.lang.NoClassDefFoundError: Hello"
So, I try to set CLASSPATH, however, the problem remains, no matter how hard I try.
Any ideas?

None of the suggestion worked, I wonder why???
Here is my location for the JDK:
C:\Program Files\Java 2\j2sdk1.4.2_05\bin
Here is my location for my Java project file:
E:\JavaProject\Hello
Here is the file name:
Hello.java
Here is the command prompt:
C:\Documents and Settings\Alex Ngai> e:
E:\> cd JavaProject
E:\JavaProject> cd Hello
E:\JavaProject\Hello> path = C:\Program Files\Java
2\j2sdk1.4.2_05\bin
E:\JavaProject\Hello> javac Hello.java
E:\JavaProject\Hello> java Hello
Exception in thread "main"
java.lang.NoClassDefFoundError: Hello
E:\JavaProject\Hello> java -cp Hello
// Does not work, it lists all of the options for java
E:\JavaProject\Hello> set CLASSPATH =
E:\JavaProject\Hello
CLASSPATH="C:\Program
Files\Java\j2re1.4.2_04\lib\ext\QTJava.zip"
E:\JavaProject\Hello> java Hello
Exception in thread "main"
java.lang.NoClassDefFoundError: Hello
// I have tried a lot more, none of them won't work!!
Now what should I try in the following command prompt?
E:\JavaProject\Hello>Given the above there is only one possible explaination.
You have a file named "Hello.java".
In that file you have a non-public class which is NOT named "Hello". Instead it is named something like "HelloWorld" or even "hello" (case matters.)

Similar Messages

  • I just upgraded to the New OS on my Mac Book Pro and now my trackpad does not zoom in or out.  I looked at system settings on trackpad and it is set, but does not work How do I get it started?

    I just upgraded to the New OS on my Mac Book Pro and now my trackpad does not zoom in or out.  I looked at system settings on trackpad and it is set, but does not work How do I get it started?

    This is really unfortunate. I'm sorry that nothing works. I was going to mention holding down the power button and doing a force shutdown but you already did that. You might need to take it into the Apple store. I don't know if booting into safe mode would help. You would have to turn off the machine again, hit the start button and hold down the shift key after you hear the tone, but normally you would let go of the shift key when you see the apple logo and spining wheel. Maybe by holding down the shift key after you here the tone will cause the screen to come back on? The other option is to start up from the 'install disk' if your machine came with one. You would insert the disk, then shut down the computer, and hold down the C key right after hitting the start button.
    Here's the link for the safeboot
    http://support.apple.com/kb/HT1564?viewlocale=nl_nl

  • I DON'T WANT TO UPGRADE OR HAVE AN ADD ON EVER, DISABLING UPDATES DOES NOT WORK, HOW DO I KILL ALL MEASAGES FOR UP GRADES AND ADD ON'S FOR EVER, ONCE AND FOR ALL, COMPLETELY, THE END AND NEVER BE BOTHERED AGAIN EVER!

    I DON'T WANT TO UPGRADE OR HAVE AN ADD ON EVER, DISABLING UPDATES DOES NOT WORK, HOW DO I KILL ALL MESSAGES FOR UP GRADES AND ADD ON'S FOR EVER, ONCE AND FOR ALL, COMPLETELY, THE END AND NEVER BE BOTHERED AGAIN EVER! ALSO IF I KILL MYSELF I WILL HOLD YOU PERSONALTY RESPONSIBLE.edit

    There is a world of information in these forums if you use the search function near the top right of this page. Just type in NAS for example and you get many threads on the subject (marked with a green checkmark if it solved the question) another example would be Airport Exterme and sound system. Once you formulate your ideas better then specific questions can be addressed one at a time. You may find that a less expensive choice for a server might be a mac mini. Good luck with your project, ask more specific questions and update you systems profile.

  • My iphone 5 the volume bottom does not work  how to replace it in apple sotre

    My iphone 5 the volume bottom does not work  how to replace it in apple sotre
    i read sb said they only replace the iphone by pay more 210 quid is this ture ?

    Hi Austin XQ,
    Thanks for visiting Apple Support Communities.
    Based on the information you have provided, it sounds like your iPhone needs to be serviced. The following link should help you get started with the process and has links with additional information on topics such as warranty and service pricing, battery replacement, and express replacement service.
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipho ne
    Best,
    Jeremy

  • My imessage does not work how do i fiz it ?

    my imessge does not work how do i fix it?
    it says waiting for activation but never works ever since i got my new i phone and this applys to my facetime too

    Hello rachelspinelli
    If you are having issues with iMessage activation, check out the article below for some troubleshooting steps to resolve the issue.
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G. 

  • I redeemed my itunes card, but everytime i try to buy a song it does not work, how do i fix it?

    i redeemed my itunes card, but everytime i try to buy a song it does not work, how do i fix it?

    Have you tried first redeeming the cart into your account?
    iTunes Store: How to redeem a code
    Next contact iTunes
    Contact iTunes

  • Resizing with my mouse using touch pad mac book pro does not work. how can i correct this problem?

    resizing with my mouse using touch pad mac book pro does not work. how can i correct this problem?

    See:
    * [/questions/777886]

  • TS3212 itunes64 setup does not work, how do i download itunes32 setup?

    itunes64 setup does not work, how do i download itunes32 setup?

    Some older scanners don't support presets. If this is the case, you can try this workaround as taken from this technical note Error: Bad Parameter | Acrobat.
    In the Configure Presets dialog, choose the scanner attached to your computer from the Scanner pop-up menu.
      From the File menu, choose Create > PDF from Scanner > Configure Presets.  
      In the Configure Presets dialog, click the pop-up menu to the right of the Scanner field and choose the scanner connected to your computer.
      Click OK, and then choose Create > PDF From Scanner.

  • My program does not work properly. I run the program but it is not capable of adding any of my ebooks and when I connect my ereader, it recognises the device but  it does not add any ebook either.  I uninstalled the program and reinstalled again but nothi

    my program does not work properly. I run the program but it is not capable of adding any of my ebooks and when I connect my ereader, it recognises the device but  it does not add any ebook either.
    I uninstalled the program and reinstalled again but nothing gone better-
    What should I do?
    Best regards

    Do you have Logitech gaming software installed on the PC? If so, perhaps try the suggestion from the following post:
    Re: Everytime I close Itunes it loads back up

  • I updated my ad to iOS 6 and now my App Store app does not work, how can I get it back

    I updated my iPad 2 with the latest iOS 6 and now my App Store application does not work right.  The only part that does work is the genius, and the purchased, but I cannot search for any new apps now have the categories come up.  I don't know how else to search for apps, and I don't know how to download this as it was pre installed.

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds). Ignore the "Slide to power off".

  • Flickr set up does not work

    When I try to upload a photo to Flickr this message keeps appearing:
    "Do you want to set up iphoto to publish to flickr?"
    I have followed the set up process a dozen of times, but iPhoto keeps asking the same question. In Flickr I can see the permission to use iPhoto uploader, but iPhoto doesn't seem to recognize it.
    I have searched all over the internet and cannot find a solution.

    Exact same problem here.
    Environment:
    - iPhoto '09, running on Leopard 10.5.8.
    - I did not have a Flickr account yet.
    Steps to reproduce:
    1) Clicked the "Flickr" button in iPhoto 09, received popup "Do you want to set up iPhoto to publish to Flickr".
    2) Clicked "Set Up", got redirected to Yahoo Flickr in Safari.
    2) Created my Yahoo account as prompted.
    3) Clicked "Flickr" button in iPhoto 09 again. Got same popup, clicked "Set Up" again.
    4) In the newly opened Safari window, entered my Yahoo credentials. When asked, confirmed that I wanted "iPhoto Uploader" to have full access to my Flickr albums.
    5) Verified that iPhoto Uploader had indeed been added to the access list in Flickr using the link provided on the Flickr webpage.
    Actual result:
    * Popup disappears from iPhoto, but immediately re-appears asking for same "Set Up" procedure.
    I followed this endless loop about 5 times, each time entering my Yahoo credentials, each time verifying that iPhoto Uploader had been granted access to Flickr.
    Conclusion:
    * iPhoto 09 has high-severity bug, Flickr functionality does not work at all.

  • Program Files (x86) 32 bit iexplore.exe does not work--how do I fix/install

    HP Pavilion Model #: p6404y
    Product #: BK168AA-ABA
    Software Build #: A1NAv6PrA6
    OS: Windows 7 Home Edition 64 bit
    Error Message:  Installation Error
    Problem/Issue:  when attempting to activacte new Anti-virus program I purchased, the system is trying to use Internet Explorer in the Program Files (x86) 32 bit iexplore.exe (that does not work).  The 64 bit -  Program Files/Internet Explorer/iexplore.exe does work... How do I fix/install 32 bit version of IE back to my system (in this directory)? 

    Hi,
    Try the following.
    Click the Start Menu and select Control Panel.  Open Programs and Features, Click 'Turn Windows features on or off' and remove the tick next to Internet Explorer 9  Click Yes then OK and then when done, restart the PC.
    When Windows has restarted, click the Start Menu and select Control Panel.  Open Programs and Features, Click 'Turn Windows features on or off' and re-enter the tick next to Internet Explorer 9.  Click Yes then OK and when this has finished installing, restart the PC again.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Adobe Reader does not work-how to use adobe reader on Lion

    I was trying to print an international label on eBay via Adobe Reader, and was very dissapointed and shocked that it does not work on Lion.
    I was so happy that I figured out how to use adobe reader on Lion, and hope I can help anyone else who is frusterated too.
    Step 1. Download Google Chrome
    Step 2. Printe your international label, or whatever you need to do that uses Adobe Reader

    Thanks Shelly! I too was having trouble and thought it was something wrong with my Mac. I still have a big though. When I try to print the saved pdf file, I get a pop-up that says "The document could not be printed. There are no selected pages to print" even though I am looking at the complete doc. It's there and in my print prompt "all pages" are selected to print. The way I got around this, is by emailing the pdf file to a gmail address and viewing the attachment via Google Docs. It loads perfectly and prints without a problem.
    Carla

  • Despite my spell check being set, it does not work in Hotmail and some other websites.

    I have the setting for spell check set up but it does not work on some sites like hotmail. I go to the spell check button in hotmail and it tells me that my browser will automatically check as I type but it doesn't. I've searched to override this or to get the spelling checked independently but without any luck, Any suggestions?

    Not all locales come with a dictionary installed for licensing reasons.
    If you do not have the en-US locale then check that you have a dictionary installed (Tools > Add-ons > Extensions).
    You can see which dictionary is selected if you right-click in a text area and open the ''Languages'' submenu.
    Also make sure that [[X]"Check Spelling" in the right-click context menu has a tick.
    You can also try to toggle the "Check Spelling" item off and on again.
    See http://kb.mozillazine.org/Spell_checking and [[Using the spell checker]]
    See also http://kb.mozillazine.org/Dictionaries
    You can look here for more dictionaries:
    https://addons.mozilla.org/firefox/browse/type:3
    https://addons.mozilla.org/en-US/firefox/addon/3366 (English (British))

  • My Norton tool bar No longer is visable and does not work, how can I fix this

    My Norton 360 that saves all my passwords for me does not work on fire fox 4.0. How can I go back to the previous version? I was not given a warning that Norton 360 wouldn't work until after I had already down loaded 4.0, or I would not have downloaded it!
    I did not know that the tool bar was going to disappear!

    Norton says they are going to update 360 in April for the Firefox 4.0.
    You can get Firefox 3.6.16 here: <br />
    http://www.mozilla.com/en-US/firefox/all-older.html
    http://support.mozilla.com/en-US/kb/Installing+a+previous+version+of+Firefox

Maybe you are looking for

  • Get substring of file name up to the last underscore

    I have filenames and I want to get a substring of the file name up to the last underscore if it exists and if not up to the last period. Create table FileNames (fileName varchar(40)) insert into FileNames values ('this_is_a_long_filename.ext') insert

  • PDF Text

    Hi All, We are trying to write many lines in a pdf document and we are able to achieve the same using PDF text. But our requirement is to create duplication of the written content on right hand side of the pdf document also using some spacing. i.e th

  • Inbound IDOC not Triggering Immediately

    I am processing an inbound idoc using startrfc, EDI_DATA_INCOMING.  It posts the idoc, but stuck with status 64.  Partner profile set to Trigger immediately.  Why will it not process immediately?  I can execute the RBDAPP01 to handle, but prefer imme

  • Retain item in Inbox and confirm end of processing

    HI All, I am trying to implement retaining item in inbox if user selects to cancel. I was told confirm end of processing is best otpion, when I try to change the task using pftc it still shows the confirm end of processing and background processing a

  • Qt applications over ssh tunnel: very slow redrawing

    Regularly I do not use many Qt applications, mostly Skype. I run it over ssh tunnel from another computer within the same local network for long time. After recent system update I noticed it became very slow refreshing its graphics. I checked several