Results 1 to 5 of 5
  1. #1
    gogledgeak is offline Member
    Join Date
    Apr 2009
    Rep Power

    Default compiling with comand prompt

    Could someone please tell me how to compile a program with comand prompt. ive tried for 5 or 6 hours today and one minute it works one mnute it doesnt

    Note that the compiler is named java not javac
    What do i have to type in please

    Ive tried many ways one was

    dir c;\

    prompt java:\documents/helloworldframe.class
    class exicute but does not work could you exsplain how and tell me preciacly what comands i should type in please it been a year and still cant get vista to do it.

    I got it to wotk once by fluke but i tried and tried and cant get it to work PLEASE SAVE ME

    Ive done the jframe i think its right

    //CODE IS
    Import javax.swing.*;
    Import javax.swing.frame.*;
    import java.util.*;

    public class swingframe exstends jframe() {
    public static void main(String[] args) {
    Frame f = new Frame("this is a swing frame");
    f.setsize(new dimensions(200, 200));
    piublic void createrunnableclass() {
    runnable = new runableclass(swingframe.class)

  2. #2
    markw8500's Avatar
    markw8500 is offline Senior Member
    Join Date
    Jul 2008
    Pennsylvania, USA
    Rep Power


    Do you have the JDK installed... If not install it and your apps should work...
    Who Cares... As Long As It Works...

  3. #3
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Rep Power


    try compiling a simple hello world program first. then report back all errors. also include your path and classpath. and don't forget to install the jdk. what version are you using?
    Get NotePad++ (free)

  4. #4
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Rep Power

    Default huh?

    Note that the compiler is named java not javac
    The above does not compute. Why in the world is it called different? And if the compiler executable is "Java", then what is the command to run the app? In this case, it couldn't be "Java".
    prompt java:\documents/helloworldframe.class
    public class swingframe exstends jframe() {
    I may be missing something here but the name of the class and the class file name have to be EXTACTLY the same (case sensitive).
    helloworldframe != swingframe.
    Also, in the above, "extends" is misspelled.

    I would suggest installing the JDK and using the correct commands to compile and run your app.

    to compile: javac
    to run: java MyJavaProgram

    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  5. #5
    azzaiel's Avatar
    azzaiel is offline Member
    Join Date
    Feb 2009
    Rep Power


    if you have already installed JDK 1.X maybe you havent configured your run time environment.. right click mycomputer goto advance then click a button w/ the word run time environment then edit the path put a ";" at the end of the path then paste your java bin path... you ate using windos right?
    It's easy to write a code that computers can understand...
    ... the challenge is to write a code that humans can understand

Similar Threads

  1. Replies: 2
    Last Post: 12-03-2008, 01:24 PM
  2. help me!!!! about command prompt..
    By kureikougaiji in forum New To Java
    Replies: 2
    Last Post: 11-13-2008, 06:15 PM
  3. input prompt
    By angelbaby21 in forum New To Java
    Replies: 8
    Last Post: 08-25-2008, 04:22 AM
  4. Replies: 0
    Last Post: 07-02-2008, 08:00 PM
  5. How do I show * in a password prompt?
    By tanalyw in forum New To Java
    Replies: 3
    Last Post: 04-16-2008, 02:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts