First time Java user- please help!

This is my first time using Java. I'm trying to teach myself the language and ran across a problem. Here is what my screen looked like:
c:\jdk1.4\bin>javac -source 1.4 OurFirstProgram.java
error: cannot read: OurFirstProgram.java
1 error
I would really appreciate any help I can get on this. Thanks.

That's because your OurFirstProgram.java isn't in the directory c:\jdk1.4\bin. Thank goodness - it shouldn't be.
First of all, make sure you've got two environment variables set. I'll assume you're running Windows on an NT/2000/XP box. Go to the Control Panel->Settings->System and set these:
(1) set JAVA_HOME=c:\jdk1.4
(2) set PATH=%JAVA_HOME%\bin;%PATH%
Once you have those, open a command shell, navigate to the directory where OurFirstProgram.java is, and type:
javac *.javaThat should put OurFirstProgram.class in the same directory as your .java file. Then type this to run it:
java -classpath . OurFirstProgramSee if that helps. - MOD

Similar Messages

  • First time compressor user, please help!

    Hi,
    I deal with raceway video and have recently switched editing platforms. I've figured Final Cut out O.K., but every time I use compressor, my video comes out looking horrible. My projects are usually two hours long. What I've been doing is going to the best quality 120 minute setting. What I'm confused about is when I go to the Quality tab after I've selected that option, at the bottom of the tab it says "allows up to 94 minutes of video". Now, I've never tried compressing on the best quality 120 minute setting without changing the bitrate because it seems to me the file size would be too big if the bit rate "allows up to 94" minutes. My usual action is to adjust the average bitrate until it says "allows up to 126 minutes of video" to give my self a little room, but the video looks HORRIBLE. I've heard many different things from different people and I think I'm officially lost. My previous editing platform didn't have a problem putting two hours of video on a dvd without much quality loss, but the video I'm getting from compressor isn't acceptable.
    All I want to know is how to get two hours of video and a menu onto a DVD without horrible quality. I know I have to be doing something wrong.
    Thanks for listening to my noob question,
    TT58

    I appreciate your problem.
    Many people who use these systems are not putting out such long programmes and obviously they do not understand these problems and so this is a neglected area.
    I have posted on this before and no one up to now has satisfactorily explained this:before the mac I have made DVDs of longer events (1.5 -2 hours) using a stand alone DVD recorder on SP. I am not saying the pics were perfect but they are a jolly sight better than what I am getting out of this system. No one can explain why the compression seems to take so much out of the quality. And the way you have to calculate what settings to use to try to get as much on in the best quality is bizarre and very hit and miss. You never really know whether it is going to fit until you see that little icon in DVD pro with the total gigabyte count and even that is a bit vague.
    As a newish user, this has been my only gripe with the mac system which otherwise is fantastic. However, the customer only sees the finished result so this issue is important.
    If you are not bothered about fancy menus for your kind of work, you might be better just playing out through a break out box into a stand alone DVD recorder - the Panasonics are excellent (PAL)- however be warned that there is a problem with the Miglia Director's Cut box on the G5 - my only other frustration!
    So like you, at the moment I am putting out inferior quality to what I was doing before and not finding many answers. Your problem is made worse because you will have a lot of fast moving stuff.
    There has been talk on the forums that compressor is not that good and we should be looking at other software - can someone recommend something specifically?
    Pete Snowdon

  • Disappointed: First time IPOD user needs help

    This is the first time I have decided to take the plunge and purchase an IPOD. I decided to go all out and get the Touch. After tryng for a week to get it running and reading all of these posts, I am coming to the conclusion that this was a huge mistake!! It has been NOTHING but a headache.
    Like other posters, my Touch is frozen with the USB cable logo. I tried ALL suggestions posted and in troubleshooting topics. I get as far as iTunes recognizing my device and saying I need to restore. However, every time I restore, it seems to be working but it never can finish and a window pops up saying unable to restore, and error occurred (1604).
    Is there a way to get a hold of these people to get help? This is ridiculous and I am extremely disappointed! I thought Apple was supposed to be very user friendly. Any advice would be appreciated.

    Hi there - Definitely give AppleCare support a chance. Use this page to locate the appropriate contact information for them: http://www.apple.com/contact/.
    In the meantime, regarding your error message:
    I'd attempt a clean reinstall:
    Go into Control Panel > Add/Remove Programs
    Remove these applications:
    1. Apple Software Update
    2. Apple Mobile Device Support
    3. iTunes
    4. QuickTime
    Restart the computer
    Download & Install the Windows Installer Cleanup Utility:
    http://support.microsoft.com/kb/290301/
    Launch the Utility: Start > Programs > Windows Install Clean Up
    Select any of the above mentioned applications, and click Remove
    Restart the computer again
    Download & install iTunes again from here: http://www.apple.com/itunes/download/
    Prior to attempting to restore the iPod again, disconnect any and all non-essential USB devices you have connected to your computer... for example, disconnect printers/scanners but you can leave your mouse or keyboard.
    I also recommend the steps in this article:
    http://support.apple.com/kb/TS1275
    CG

  • First time socket programming please help

    can some one give a example code that can download a file such as mp3 from internet and save it in the local machine.
    what kind of classes should i use for that?

    java.net.HttpURLConnection
    http://java.sun.com/docs/books/tutorial/networking/index.html

  • First time motion use, please help.

    I have recently installed Final Cut Studio 3 and currently using motion, following an online tutorial.
    I have also downloaded Noise FxFactory.
    Can someone please tell me how i can import Noise FxFactor (or any other material for that matter) into my Apple Motion Library.
    Thanks
    Jordan

    hi,
    if you have followed the installation instructions for FxFactory then all the bits and pieces should be put in the correct places. the filters should all appear in the filters list, either in the pop up menu form the tool bar, or in the Library pane under filters. All Noise Industry filters appear in a folder starting with the letters NI. The generators appear in the generators section of the library.
    Are you not seeing this?
    adam

  • Installing Tiger 10.4 for the first time with 4Gb (PLEASE HELP)

    Ok hey, I would like to install Tiger on my mac g5 but there is a problem I have about 4 GB of hard drive space left on my drive. Will this cause a problem? or will it actually free up space once I installed it.
    I also have some files that I would not like to become altered (music songs in logic etc) when I install this system is there a possibility I could lose work or subject to structure change?

    And HFS+ just hates having less than 15% free space, too. The more fragmented, the more likely you could lose the directory itself.
    When you restart etc the system flushes any unsaved writes out to disk, and it could just die there.
    At less than $0.50/GB for storage, buy some backup drives
    And with 4GB of RAM, and swap files (files, they start at 64MB and double) it is unlikely during an install there will be ANY. Always good to restart before even running updates. RAM helps with the install to decompress files, not disk drive - because during an install, you are booted from DVD and it can't write to DVD or to hard drive for swap files. Temp files, yes, and usually it can be 3x larger than the file.
    250GB drive should have more like 40GB free unfortunately. And that is based on MicroMat's in-house testing. They use to have a forum on MacFixit, unfortunately that is gone and moved to their own site and they didn't migrate their own thread discussions (wealth of info there I use to link to).

  • PLEASE help me!!! I,ve been all over looking for help/store or whatever to down load adobe flash player to open a certain website.  I need that app or something similar. I am a first time iPad user and not that swift on a computer either

    Please!!
    help me down load adobe flash player or something similar for my iPad. I want to open a certain website and it's required. I don't know where to go. i am a first time iPad user and not to swift on a computer either. Thank you

    Allan Eckert wrote:
    You are going to have to get Steve Jobs to change his opinion about Flash which will be like getting a Baptist to drink beer, next to impossible.
    Allan
    Funny you mentioned that analogy... because John the Baptist was a heavy drinker... (could steve jobs be secretly accessing flash content on his ipad?)

  • I have just opened my brand new Macbook Pro and I'm a first time mac user. I have tried to download flash to enable me to watch you tube clips, but on trying to download it, it says I need to close Safari but after doing so, it still won't respond.

    I have just opened my brand new Macbook Pro and I'm a first time mac user. I have tried to download flash to enable me to watch youtube clips, but on trying to download it, it says I need to close Safari but after doing so, it still won't respond. Any tips? Help?

    Actually you need to quit Safari which is different from closing.  With Safari open go the menu bar for Safari/Quit Safari. 
    Mac 101:  Get Started Using A Mac 

  • Displaying Picture in a Java APPLICATION please help!!

    I have been trying to write a method that Displays a .jpg file when called. However I have not gotten far, every book I have tell you how to display pictures in an applet but not an application. I did find some code that is supposed to be for an application, but It does not compile right. Any help would be apprecidated!
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class PictureIt{
    public void makeImage() {
    //***Image Output Stream
    String imgFile
    = "d:\\temp\\TestImage.jpeg";
    out = new FileOutputStream(imgFile);
    BufferedImage image = null;
    image = (BufferedImage)createImage
    (panelJpeg.size.width, panelJpeg.size.height);
    Graphics g = image.getGraphics();
    panelJpeg.paintAll(g);
    }

    Displaying Picture in a Java APPLICATION please help!!
    Hope this helps.There is going to be two classes compile seperatly first class is what does the drawing
    here it is
    import javax.swing.*;
    import java.awt.*;
    public class draww extends JPanel {
    Image ball;
    int width1 = 100;
    int height1 = 100;
    public draww() {
    super();
    Toolkit kit = Toolkit.getDefaultToolkit();
    ball = kit.getImage("pic1.gif");
    public void paintComponent(Graphics comp) {
    Graphics2D comp2D = (Graphics2D) comp;
    comp2D.drawImage(ball, 20, 20, width1, height1, this);
    sound class is the container JFrame here it is
    import javax.swing.*;
    import java.awt.*;
    public class drawing extends JFrame {
    public drawing() {
    super("draw");
    setSize(400,400);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container pane = getContentPane();
    draww d = new draww();
    pane.add(d);
    setContentPane(pane);
    setVisible(true);
    public static void main(String[] args) {
    drawing drawing1 = new drawing();
    PS Hope this helps and see you around

  • I'am a first time mac user, can any explain to me how to transfer file i.e. iTunes ,pictures, other files.

    I'am a first time mac user, can any explain to me how to transfer file i.e. iTunes ,pictures, other files.

    Select a file you want to transfer and drag it to the desired destination.
    If you need help with the basics of OS X you can:
    Select Mac Help (or Help Center) from the Finder's Help menu and enter a search keyword. For your question you might search for "copy," "file copy," or "drag and drop" for example.
    See Apple - Support - Mac 101
    Visit the Apple website where you will find additional information and tutorials on how to use OS X.

  • I just got an ipad 2 and I felt in love with it. first time apple user. Thererofe, now I want to repalce all my PC product that I have. Could someone tell me if the IMac is touch screem such the ipad? thanks

    I just got an iPad 2 and I felt in love with it. First time Apple user! Unfortunatelly, now I want to replace all my PCs products that I have. Could anyone tell me please if the I Mac desktop has touchscreem and works like the iPad 2?
    Thanks

    The iMac does not include touch screen capability.
    With an iMac, you can choose between a Magic Mouse or a Magic Trackpad. If you want both, there is an additional cost.
    http://www.apple.com/imac/design.html

  • Adobe flash CS6 crashes when using the type tool or Editing word all the time... please help!

    Adobe flash CS6 crashes when using the type tool or Editing word all the time... please help!

    Nobody can tell you anything without proper system info or other technical details. The standard answer with all text issues simply is, that you have a "bad font" on your system and need to get rid of it.
    Mylenium

  • I bought a iPhone and I was able to log into my iCloud with no problem and when I tried to update it it kicked me out and now it's asking me for the old apple user please help what can I do...?

    I bought a iPhone and I was able to log into my iCloud with no problem and when I tried to update it it kicked me out and now it's asking me for the old apple user please help what can I do...?

    Contact the original owner, and ask them to remove the device from their icloud.
    http://support.apple.com/kb/PH13695
    HTH

  • First time iPhone user. How to sync?

    Finally gave in to purchasing an iPhone. So my first order of business is syncing stuff that I've downloaded to my phone. I've had my friend download some contents to it prior to this. So here are my questions:
    1. Will syncing erase the contents of my phone?
    2. Can I sync just certain type of contents that I want and not everything that's loaded on my iTunes?

    ljcool wrote:
    First time iPhone user.
    Then I suggest you read the manual:  http://support.apple.com/manuals/

  • I am not able to update my iphone 4 ,when ever i tried to update it its show 1309 error...and at times 9006 error ,please help me ..

    i am not able to update my iphone 4 ,when ever i tried to update it its show 1309 error...and at times 9006 error ,please help me ..

    Hey alkarim2008,
    If you are having an issue with being unable to update or restore your iPhone, I would suggest that you troubleshoot using the steps in this article - 
    Resolve iOS update and restore errors in iTunes - Apple Support
    Thanks for using Apple Support Communities.
    Happy computing,
    Brett L 

Maybe you are looking for

  • How to connect an old ADC flat panel to the new Mac mini?

    I am thinking of getting one of these new Mac mini's for the kids in the den and I have an old 20" flat panel ADC from Apple that is still going strong. Is there an adapter that will work with this configuration? Thanks, West

  • New install of Leopard 10.5.8 install

    Hi, Can anyone answer this question? I have recently taken over the responsibility of looking after an OS X server that is running Leopard Server v10.5.8. The server was originally set up pretty badly in my eyes, the main problem being DNS, as the se

  • Microphone

    I would like to experient with dictation on this mini.  It's a mid-2010 Mini (2.4 GHz Intel Core 2 Duo).  Somewhere in storage I have an old microphone left over from a previous computer, most likely the IIsi.   I tried plugging that microphone into

  • My site

    http://www.sundere.nu (it's danish for healthier.now) I've used the spry detail master page in "koncept" and put the links for the different koncepts to different rows in the xml file, along with putting it all in a nice accordion widget. The front p

  • Short text from notification not to be copied in maintenance order

    Hi My user requirement is that when a notification is created , the short text of notification is NOT TO BE COPIED IN work order as short text and first operation of work order. Any one have any idea .