Can't get even a hello world program to work

Hello,
I am new to java and have written the following and saved it
to hello.java:
public class hello
public static void main(String[] args)
System.out.println("Hello, world");
Then I run javac as follows:
javac hello.java
No errors, so I type:
java hello
and I get
Exception in thread "main" java.lang.NoClassDefFoundError: hello
I have been careful for upper and lower case.
What am I missing?
I just installed java on this machine.
Thanks,
Mike

Do this instead:java -cp . hello... note the dot following the '-cp' flag. The Java virtual machine needs to
know where your classes are stored, i.e. it doesn't assume a concept
of a 'current working directory'. The '-cp' flag is followed by a list of dirs
(here it's just the current directory '.') that store .class files.
kind regards,
Jos

Similar Messages

  • How can I get outgoing mail in Mail program to work consistently?

    Some times using Mail messages can be sent immediately on any of my several accounts including a gmail account. Other times no mail can be sent perhaps until the next day. It just read sending. If I transfer my outgoing gmail messages to gmail on safari I can send it immediately. I am changing no settings and incoming mail is coming in without difficulty. This is most frustrating if I am trying to response to a message and I can't get it out until the next day. Any suggestions? Thank you

    I have had sbcglobal dsl and now Uverse and periodically have had the problem of outgoing mail being rejected by the smtp server. The problem has been changes made at the server by the isp. I make no changes and things go from working to not working. Over the last 6 years I have gotten pretty good and "fixing" the problem by deleting accounts and reentering the data in the Mail program and at the AT&T website. A process they call verification is involved. Now it is broken and it is unfixable.
    I have spent the better part of the last 3 days trying to get a third party or vanity email address to verify. The panels say I have successfully verified my address but it will not send. Along the way I have read a lot of stuff on various forums and am thinking that the issue may be the same between at&t and other big providers... they shut down 3rd party address on smtp in their war on spam.
    So we called att support and were told we would have to pay for premium support. We asked instead to cancel our service. We signed up with a local dsl service (Houston) and discovered to our dismay that DSL does not equal DSL. The local service has never been able to swap over a Uverse dsl service. So we were back to Uverse to have Uverse dsl canceled and regular at&t dsl installed.... it is like dealing with two different companies. Along the way we discover that at our location we will lose the 6 Mbps service and only be able to get 1.5 Mbps... our modem will have to be changed out and at this point we are sad and weakened. The Uverse rep offers to lower the premium support charge from $30 to $15 so we gave in and signed up for it. The next day I get the very polite and seemingly competent Paulo on the line. We get set up for him to take over the cursor and we start reviewing my settings. Bottomline. I had all my settings perfect... practice, practice etc. They were absolutely correct on every panel. Paulo got to see that the verification does not work and that it is not possible to set up a "reply to" third party address that will work. Paulo was very nice and very baffled. He invited me to call back but he really had no idea about what to do to get things working.
    By this time I am feeling pretty defeated and trapped... I cannot reasonably move to another provider and no one at AT&T can make it work. There is a happy ending for me in this though and this could work for someone else which is why I am making this long post. My vanity email is from an email forwarding service where I have had an account for 12 years. My isps change as my job has moved me overseas and back and across the US several times... my email address does not change. The company I use is pobox.com I was looking around at their website and noticed that my service includes use of their smtp server. I printed off the instructions, which they have for about 20 mail clients, pc, mac, et al and within 10 minutes I was sending mail from [email protected]. I got no error messages and when the mail arrived it showed from [email protected] and when we replied to that email it put [email protected] in the to:. Man am I happy! This fix did not cost me incremental $ and it was easy. The service costs $20 per year for a single year subscription... I have a 5 yr which runs me $15 per year. There are other benefits to the service... decent spam filtering and url forwarding.
    If you are having a problem with a vanity address not working through your isp smtp server and you can stomach $20 per year, go on over to pobox.com and tell them Pam sent you.
    ps the other thing that I got to work was sending mail out from my mobileme account using their smtp server. Mobileme will not allow me to use my vanity address but I am happier having .mac in my return address than att or sbcglobal.

  • While running hello world program for 12.1.3, getting error

    We followed the instruction given in dev tutorial and set the 12.1.3 jdev.
    When try to run the “Hello World” program, got error
    “You have insufficient privilege”
    Solution:
    I changed the setting as below and it worked.
    Jdeveloper -> Tools -> Embedded OC4J server setting -> start up
    Choose option: Default IP address
    And issue got resolved.
    I want to share this with everyone.

    We followed the instruction given in dev tutorial and set the 12.1.3 jdev.
    When try to run the “Hello World” program, got error
    “You have insufficient privilege”
    Solution:
    I changed the setting as below and it worked.
    Jdeveloper -> Tools -> Embedded OC4J server setting -> start up
    Choose option: Default IP address
    And issue got resolved.
    I want to share this with everyone.

  • How to compile a simple "Hello World" program in Java by using Netbeans

    Hi all, I am very new to java programming arena. i am trying to learn the most demanding language for the time being. To program, i always use IDE's as it makes programming experience much easier by underline the syntax errors or sometimes showing codehint. However, I am facing some problem when i use Netbeabs to compile a simple "Hello world" program. my problem is whenever i write the code and press compile button, netbeans says "main class not found". Consequently,i am becoming frustated. So, i am here in this forum to get some kind help on How i can compile java programs in Netbeans. Please help me out, otherwise i may lose my enthusiasm in Java. please help me, i m stuck

    Go to http://www.netbeans.org/
    You should find tutorials there.

  • Steps To execute Simple Hello world programs of struts

    Hi,
    Can u tell me how to execute the simple hello world programs in struts by using eclipse ID..
    and send me the screen shots and what all the jar files we have to copy in lib folder.

    >
    Can u tell me how to execute the simple hello world programs in struts by using eclipse ID..
    and send me the screen shots and what all the jar files we have to copy in lib folder.
    >
    No. Post the question in an Eclipse forum.

  • Can I get help downloading already purchased programs Adobe Creative Suite5 Design Premium and Adobe Acrobat X Pro onto my new mac computer?

    Can I get help downloading already purchased programs Adobe Creative Suite5 Design Premium and Adobe Acrobat X Pro onto my new mac computer?

    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.7.1| 5 | 4 | 3 | 2.7(win),2.7(mac)
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.window using the Lightroom 3 link to see those 'Important Instructions'.

  • I can not get the flash player plug in to work with Internet Explorer

    I can not get the flash player plug in to work with Internet Explorer

    Zoltan71 wrote:
    I just bought this computer. My Internet Explorer is version 11.0.1
    I have the box checked to Install new version automatically, but it has not done any upgrading.
    I can't get the computer to update anything as far as I can see.
    The flash plug in does work with the Crome browser but it will not work with Internet explorer.
    I looked in the manage add-ons and it says enabled.
    I also went into the safety tab and deselected
    Active X filtering.
    Restarted and still does not work.
    I need help.....
    Chrome uses a different and separate plug-in.
    There are things about IE you need to know, especially 11. Specifically:
    "User-Agent Strings"
    That doesn't mean a lot, I'm sure, but it's the root of your problems, and Flash Player has nothing to do with it.
    Microsoft "rewrote" the User-Agent Strings for the abomination they call their latest and greatest browser. User-Agent Strings are what websites use to identify the browser you're using and provide the proper content for it's browser engine, like ActiveX stuff, and Flash or HTML5 video. Thanks to the geniuses in Redmond, WA, the User-Agent Strings for IE11 (which has a Trident engine), ID it as either "Gecko" (Firefox) or "Webkit" (Chrome). Problem is: when the site the directs to the content for one of these two engines, the Trident engine in IE can't intepret it and the site then sees IE as an "unidentified" browser.
    The problem with an unidentified browser is that the plug-ins in that browser aren't recognized either, so even though you're up to date, it says you need the latest Flash Player when you use IE11. YouTube... has converted to HTML5 video so if it doesn't detect Flash Player, it can display HTML5 (MP4) video which requires no plug-in to play. Facebook can't do that, because HTML5 doesn't apply to games... only video.
    Microsoft has no plans to "fix" the mess they've created because they think it's a great idea to block you out of the websites you visit.
    They recommend using "Compatibility View" and pretending that you're using an older verison of IE... Problem with that is that it's seen limited success, and you have to enable it for EVERY page that has problems... individually.
    I'm not big on "pretending" so I recommend actually using another browser.
    Firefox (from Mozilla)
    Opera (from Opera)
    Safari (from Apple)
    Chrome (from Google)
    ANY of those will work where IE11 won't, with the Flash Player Plug-in (For all other browsers), and Chrome doesn't even need that because it has its own Flash Player plugin built in.

  • What app can i get to have my dell v515w printer work with my iMac

    what app can i get to have my dell v515w printer work with my iMac

    Dell has some really great drivers -- for Windows and Linux. But none for any version of Mac OS X.
    LinuxPrinting.org does not llist that as a printer supported by any of their drivers -- not even badly supported.

  • Can't get Canon iR-ADV C5250 printer to work on Yosemite

    Can't get Canon iR-ADV C5250 printer to work on Yosemite; keep getting "printer is not responding."
    I did try and install the driver for Mavericks first. I *have* deleted printer and appropriate /Library files. And re-installed using "UFRII_v10.06.00_Mac.dmg" which is the equivalent of what worked on the previous Macbook Air.
    We do use Dept. ID Management. I know how to set that up.  Although we do not use a PIN.  Again in other macs and computers that's not an issue.
    PAHU? :-)
    Thanks!
    David

    Hi David,
    Sorry for the late reply. Printer not responding is typically an issue with the protocol or the wrong network address. Easiest way to check that the correct IP address has been used is to enter the IPv4 address into a web browser on the Mac. This should result in you connecting to the internal web page of the C5250. If this does happen, then you know the IP address used to create the printer was correct.
    As for the protocol, the UFR2 driver supports LPD and HP Jetdirect-Socket. It does not support IPP. And there have been some users who have found even the LPD protocol will not communicate with the printer, so check that you are using HP Jetdirect-Socket. If you cannot remember what protocol was used when creating the queue, then you can open System Information (Applications > Utilities) and then select Printers in the left column. If you have more than one printer on this Mac, the top right pane will list them. Select the C5250 to see its information in the bottom right pane. Then look for the entry of URI. This is the print queue. It should show socket://ip-address, indicating the HP Jetdirect-Socket was used. If it shows lpd or ipp then you know one of the other protocols was used.
    Hope this helps. Reply if you need more assistance.
    PaHu

  • Can I get my HP F4500 wireless printer to work with my Ipad?

    Can I get my HP F4500 Wireless Printer to work with my Ipad....It is an IOS 4.3.2

    Philip-
    I don't see a 4500 HP printer on the list of AirPrint printers, so you will most likely need an alternate way to print to it.
    One way is to use an iPad App such as Print n Share.  It has its own browser, mail, photo and text programs that can print to some non-AirPrint printers.  I don't know if it can print from within other iPad Apps.
    Another way is to use a computer to share the printer as AirPrint over WiFi, using a program like Printopia for the Macintosh.  For a free solution, search the web for AirPrint Activator.
    I recommend you try the free iPad App, HP iPrint Photo.
    Fred

  • How can I get my HP Officejet Pro 8100 to work. I had HP  on the phone for over two hours and thought it was fixed. Now it just will not print at all.

    How can I get my HP Officejet Pro 8100 to work.
    I'm using an  iMac (21.5-inch, Late 2013) running Yosemite. I spent hours on the phone with HP who did their best and thought they had solved the problem Now it has stopped printing completely. Just says 'idle' or' connecting to printer' but never does.

    Greetings paulr.paulr,
    Welcome to the Apple Support Communities!
    I understand that you are unable to print from your Mac running Yosemite on your HP Officejet Pro 8100. I know that printer issues can be very frustrating, but I believe the information in the attached article will be able to assist you. I would suggest reading over and systematically working your way through the suggested troubleshooting steps located in the following article. If any issues arise as you work your way through the steps, or if you work your way completely to the end and reset the printing system and the issue continues, please let me know. 
    OS X Yosemite: Printing troubleshooting
    Cheers,
    Joe

  • I can't get some song on my iphone they work off of the computer but they wont show up on my phone they are in the "on my iphone" section but they gray and have a gray dotted circle next to them i have tried every thing I just want them on my phone HELP!

    I can't get some song on my iphone they work off of the computer but they wont show up on my phone they are in the "on my iphone" section but they gray and have a gray dotted circle next to them i have tried every thing I just want them on my phone HELP!!!

    You have posted to the iTunes Match forum, which your question does not seem to be related to. Is your question concerning iTunes Match or syncing with iTunes via USB?

  • I recently bought a new macbook pro and set it up using the migration assistant and my mac mini.  I can't get the text message forwarding feature to work with both computers.

    I recently bought a new macbook pro and set it up using the migration assistant from my mac mini.  I can't get the text message forwarding feature to work with both computers.  It keeps saying that I only have 2 devices setup, my iPad and my macbook pro.  When I mess with the setting on my mac mini, it goes from saying that that is one of the devices to my macbook pro being the 2nd device.  I think that something happened as a result of my using the migration assistant and now it thinks that my macbook pro and my mac mini are one and the same computer.  Any ideas?

    Thanks, Sig.
    The old computer is a 2.6 Ghz Intel Core 2 Duo
    The new one is a 2.3 GHz intel core i7
    In going over this, thanks to "tallking it out" with you, I did discover the Text Edit problem.  Because I've still been unable to get the new computer text size (fonts or whatever) to match the old computer, I did not notice that the curser is now different--the line midway down the curser has to be placed on the line I am working upon, otherwise the edits go elsewhere on the page.  Now, with a bit of difficulty, I am able to get Text Edit to work correctly.
    If you have any ideas as to why my menu bar and Text Edit type are still so slow, I'd love to have them. 
    (I went through the process you suggested earlier, re my Trackpad preferences, and found no improvement.)

  • I have aperture 3.2.4 on my laptop and have the serial number, but just bought a new MAC and I can't get the Ver 3.0 link to work. Anyone know how to move it from my laptop to our new mac?

    I have aperture 3.2.4 on my laptop and have the serial number, but just bought a new MAC and I can't get the Ver 3.0 link to work. Anyone know how to move it from my laptop to our new mac?

    I am talking about the Ver 3 download link that came with the purchase email.
    That link is no longer available. Use "Migration Assistant" to copy your Applications from your old mac to the new Mac, then immediately run software update. Aperture Version 3.2 will not run on your new mac with Mavericks, you will have to Upgrade to version 3.4.5 at least - you can download this update from the Support page: Aperture 3.4.5
    Then launch Aperture and enter your registration key and try now too update from version 3.4.5 to 3.5 from the AppStore. The AppStore will change your Aperture registration to an AppStore version, so you will able to reinstall by downloading from the AppSTore in future.
    If you want transfer only Aperture and no other applications, do it manually: You will have to copy not only the application but folders from the libraries as well:
    /Applications/Aperture.app
    /Library/Application Support/Aperture/
    ~/Library/Application Support/Aperture/
    Leonie

  • I just got my cable company to switch my wireless router to a wired one considering now I have the wireless airport device (the newest one) but now I can't get a wireless signal. The router works when directlyplugged in,the aiport wireless device is green

    I just got my cable company to switch my wireless router to a wired one considering now I have the wireless airport device (the newest one) but now I can't get a wireless signal. The router works when directlyplugged in,the aiport wireless device is green. I've tried going through my new MacBook Pro settings and it the diagnostics check, it says network changes detected, I tell it that it "yes" does connect to a cable modem, it tells me to restart it, after I do it asks if there are any other devices hooked up ( firewall) and when I say no it tells me that it can't fix the problem.
    Now I know that I probably have a new IP address because of the cable company switching the boxes but it was working fine with the other box, now there isn't a signal to be had on it!
    Please anybody out there that can help!!!??

    Any time you change networking hardware it is always a good idea to perform a complete power recycle with the new equipment. Check out the following AirPort User Tip. Please post back your results.

Maybe you are looking for