How to actually run a program...

Is entering "java NameOfProgram.java" all you need to do to run a java program, or is this just for testing purposes?

It is unlikely that you would use NameOfProgram.java.true. java.exe does not work on .java files. It works on .class files, as specified below. use javac.exe to get .class files
It is more likely you would use NameOfProgram
m without the .java. It is more correct to say "java
NameOfClass"

Similar Messages

  • I have downloaded elements to my mac and it has installed. how do I run the program?

    I have downloaded elements to my mac and it has installed. How do I run the program.

    Hi David,
    You can simply click on the application to launch it from the 'Applications' folder.

  • Downloaded the pdf converter to word....how do I run the program?

    downloaded the pdf converter to word....how do I run the program?

    Hi seang449,
    Please let me know which software you purchased and for what OS? Is it Adobe Acrobat or Create PDF service?
    After downloading the software you need to run the .exe file (WIN) / .dmg file (MAC) to install the application.

  • I compiled now how do I run the program

    Hi,
    I have installed J2SE. I have written a .java file that successfully compiles in MS DOS (I have a Windows 2000 platform). This program has JPanes, Jpanels etc. How do I run this program? I am guessing it is not through DOS.
    Seems so simple but I don't know how and can't find the answer on Sun's website.
    Can anyone help?
    C.C.

    thanks but when i try that i get the following error mesage;
    Exception in thread "main" java.lang.NoClassDefFoundError: DiveLog (wrong name:
    divelog/DiveLog)
    at java.lang.ClassLoader.defineClass0(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.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 java.lang.ClassLoader.loadClassInternal(Unknown Source)
    It compiles fine but gives this message when i try to run the program. What are these error messages trying to tell me?

  • How do i run a program ni-488.2

    How do you run a program GBIB NI-488.2 in visual basic

    Yes, this will be a good place to find some programs. These are located under your \National Instruments\NI-488.2\Languages\Visual Basic directory.
    Also, some examples might be found on our website. Please let know if you are trying to do any specific application.
    Good luck with your project. Again, thank you for choosing National Instruments!
    Swapnil P.
    National Instruments Engineer

  • How do I run a program after login, but before the desktop?

    How would I run a program right after the initial login using gnome/JDE?
    With CDE I could edit the ~/.dtprofile to get the desired effect, but dtprofile is a CDE configuration file.

    There used to be sn automator action that might have gotten the job done. It was on http://automatorworld.com/ but I can't seem to find it now.
    I haven't test this under Lion but there is a system preference pane called "Do Domething When" that should get the jeb done. http://www.azarhi.com/Projects/DSW/
    I have taken the opposite approach. My iTunes library and I have the same problem if it has not been mounted when iTunes launches. I created an Automator app that mounts the music then launches iTunes. Try mounting the drive the launch Automator to create the following workflow.
    1. Connect to server and select the external drive.
    2. Us the Launch Application step to launch iTunes.
    Unmount the external drive and test the workflow. If it works save the workflow as an app and use that to launch iTunes.

  • How do I run Windows programs on my iMac and my MiniMac?

    I have a new iMac and a new MiniMac at the office. Can I run Windows programs on these computers, such as QuickBooks? If so, how do I do it?

    If you want to run MS Windows applications on your iMac and Mac Mini you need a license of MS Windows at a minimum. Then you need to decide how you want to run the apps, you can use Boot Camp which allows you to install MS Windows on your computer and then boot your computer as either a MS Windows machine or OS X machine. The advantage of this is there is no cost (except for MS Windows) as Boot Camp comes with every Mac. You will find Boot Camp Setup Assistant in (Applications - Utilities - Boot Camp Setup Assistant). The other solution is virtualization software such as Parallels or VM Ware Fusion. The advantage of virtualization software is you can run MS Windows and OS X simultaneously. This is ideal if you are not doing graphics intensive applications such as 3D gaming, CAD/CAM or 3D renderings. For applications like QuickBooks it would be great.
    The downside of running MS Windows on your Mac is that portion of the computer will be susceptible to all the problems PC's have such as Virus's and other malware. So whatever solution you get you need to also get anti-virus software and other anti-malware. The upside is if Windows becomes diseased this in no way affects OS X.
    Finally your best solution is to look for OS X versions of your applications. I know there is a OS X version of QuickBooks however I have no idea how Intuit's licensing works, you would need to contact Intuit to ask that question.
    Roger

  • How do i run windows programs on mac

    How do i run a windows program on my mac? Is there a particular application for it? or do i need to download and install a virtual windows software? - if so, can anyone suggest any names for software. I've heard about virtual box.

    Why ask here instead of the ones for Macbook series, or for Windows on Mac, aka Boot Camp.
    VirtualBos is just the VM free for running Windows as guest OS under Mac OS, and then why exclude what or type program? Maybe game that needs to run natively, or that your notebook would have troubke with disk spa e, RAM, or your processor.
    Windows runs hotter, too, so that is another concern.
    Mire Q's than answers.

  • How can I run my program on command line?

    I'm having some trouble trying to run my program on command line.
    I get a message saying "Exception in thread
    "main" java.lang.NoClassDefFoundError: Rectangle
    <a href="http://img145.imageshack.us/my.php?image=untitled2copylh2.jpg" target="_blank"><img src="http://img145.imageshack.us/img145/3002/untitled2copylh2.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a>
    import java.util.Scanner;
    public class Rectangle
    public static void main(String[] args)
    int width;
    int height;
    int count = 1;
    Scanner scan = new Scanner (System.in);
    System.out.println("Please enter the width of the rectangle: ");
    width = scan.nextInt();
    System.out.println("Please enter the height of the rectangle: ");
    height = scan.nextInt();
    while (count <= width)
    if(width < 1 || width > 30)
    throw new IllegalArgumentException("The numbers must be in range");
    if(height < 1 || height > 30)
    throw new IllegalArgumentException("The numbers must be in range");
    for (int star = 1; star <= height; star++)
    System.out.print("*");
    System.out.println();
    count++;
    }

    What doesn't work?
    When you type javac Rectangle.java do you get error messages? Does it create the file Rectangle.class? If yes, type java Rectangle and your program should run. If you get an error post it but if you followed earlier advice you should be able to solve the problem yourself.

  • Everytime I try to open a creative cloud product, the program closes. I need to use both illustrator and indesign for school and I was wondering if anyone had any advice on how to actually make the program work?

    If anyone has any advice on how to make creative cloud programs work please let me know!
    Any help is appreciated.

    These questions below may be for a different product... but the KIND of information you need to supply is the same, for the products you use
    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840

  • How can i run a program outside of Forte? (Forte and java/class files)

    im making a program with forte... and i have a bunch of class files, i form file and a java file... how can i put these in one file so poeple without forte can run it...
    thanks

    jmburns wrote:
    I am trying to do a silent install of a program I built using LabVIEW 8.5.  I also need to call an exe after the installation, so I am using the "run executable after installation" option on the Advanced tab of the installer.  I then pass the following command lines to the setup.exe:
    /qb /acceptlicenses yes /r
    This installs the LabVIEW program successfully, but does not then run the additional exe afterward.  If I run the setup.exe normally (with no command line parameters), the additional exe gets run.
    Thanks,
    Jason
    This problem is fixed in a future release of LabVIEW. Here's the CAR ID 67549 for tracking purposes.
    Message Edited by Bob P on 07-10-2008 09:10 AM

  • How can I run C programs under a Java GUI?

    Hi
    I'm looking for some info on how to run a command line program written in another language behind a Java GUI, any advice greatly appreciated, particularly in how to transfer data between the two.
    Thanks

    Runtime.getRuntime().exec(...)
    Transfering info is more complicated. Maybe write and read status from disk?

  • How can I run other programs using java program

    hi experts,
    I am trying to execute a set of commands from java program
    eg: from command prompt
    java CommandExecutor c:\winnt\notepad.exe c:\some.exe c:\onemorecommand.exe
    and inside the CommandExecutor main method..
    public static void main(String []arg)
    for(i = 0; i < arg.length; i++)
    Runtime.getRuntime().exec(arg(i));
    the above code is executing all the command one after the other, but I want to execute the above commands squentially, i.e I want to execute the second command only after finishing the first command and the third after finishing the second and so on depending upon the arguments passed, how can I acheive this...
    I have tried to use the Process which is returned by the exec(arg) method but the exitValue() returns same value before execution and after execution.
    thanks,
    krishna

    Did you try to get the process returned and then try
    process.waitFor() method. This waits for the process to finish.
    After that try the next execution

  • How do I run cd programs on my macbook air?

    I have a CD-Rom program that I want to run on my Macbook Air, but I don't want to purchase an external CD-Rom drive since I only need to run the disk on the initial install ( for the setup.exe component).  I have a Toshiba laptop with a CD-drive in it running Windows XP.  Please help!

    You can buy an external CD/DVD writer for around $25-$35 on ebay.  I bought one and it works fine.  Or you can buy the Apple external for around $80.
    I realize you said you only needed to do this one time.  However, down the road there is always another need for the same thing.  I think it's worth it to have the external drive handy.

  • How can I run a program at shutdown

    I want a program to run automatically at shutdown (or logout, since this computer has a single user...so I think that will work).
    I have searched for an answer, but I can't find it. I can find startup items, but not shutdown items.
    Anyone?

    Create a 'Stay Open' AppleScript app containing only a quit handler (i.e. no idle handler):
    on quit
        -- desired actions here
        continue quit
    end quit
    (Don't omit "continue quit"). Put it in your Login Items. It will stay running but consuming no CPU and will be triggered when you log out or shutdown.
    =-=-=-=-
    You could make it dual purpose:
    say "Good to see you back [[[emph -]]]brian"
        -- or anything else at login
    on quit
        -- desired actions here
        continue quit
    end quit

Maybe you are looking for

  • Help! Zen no longer shows up in media player or playcent

    Help! I've had my zen for a couple years now (its the old 0GB version) and never had any problems..until today. Tried to upload some new mp3s onto the player, hooked player up to laptop via USB, I can still hear the little sound it makes when its con

  • Can not set up print option to print multiple pages in interactive pdf document

    I have created a multipage document --- acutally it is set up as two layers with one layer that is hidden and an interactive button can be pressed to view it.  I want it to  so both pages print, and I am unsure how to do this  I am working in acrobat

  • Missing tools help - not helping

    Under my windows menu, my "Tool" is checked, but it's not visable. I've done all of the things suggested under the topic "Missing toolbars & panels" and I still can't find it. Any other ideas would be greatly appreciated.

  • How does one stop Firefox asking to update password on secondary signin pages?

    Many websites use both a user name/password and a 'secret question' for sign in. The second part usually involves entering the answer to a randomised question, like 'mother's maiden name'; 'place of birth' etc. Whenever this happens, Firefox asks if

  • Can't use flash drive with new iMac

    We are new Mac users.  My husband downloaded a zip file of aviation charts.  He needs to transfer the zip file to a flash drive and then to a portable device so that he can use the charts when he flies.  We plugged in a flash drive, but it doesn't sh