I m very new to java..! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

I m very new to java..!

javakumaranjavakumaran Posts: 3Member
I have installed java on to my pc.But i cannot compile a single program yet.could anyone tell me how to compile ?

Comments

  • electra_prelectra_pr Posts: 9Member
    in unix
    --------------

    compilation: javac filename.java
    run: java filename (without .java or anything else)

    you can also write java code in eclipse(program) but it's recommended
    if you know the basics first...
  • javakumaranjavakumaran Posts: 3Member
    yes i have tried to compile my file .For eg the file name is "test.java".When i compile using javac test.java nothing is happening.Means no error message or nothing.Also when entered simply javac there should be displayed something.Right?But nothing is displayed in tht case as well.
    Hope you can help me in this !

  • electra_prelectra_pr Posts: 9Member
    hi,
    i forgot to mension in my previous reply mail that you might have to change some instructions or path (so that you can work in java)on the operating system you are using. e.g i'm working on unix/linux and i have changed a path in my .cshrc file..
    i hope you can work this out but be very careful not to do any damage on your pc... :)
  • LireeLiree Posts: 33Member
    : yes i have tried to compile my file .For eg the file name is "test.java".When i compile using javac test.java nothing is happening.Means no error message or nothing.Also when entered simply javac there should be displayed something.Right?But nothing is displayed in tht case as well.
    : Hope you can help me in this !
    :
    :

    If you compile a correct .java file. (no warnings and errors) you won't get notified. You can try "javac -verbose test.java". Then you get messages about what is compiled.
    Look at the directory of your compiled file. there shoud be a ".class" file meaning success.

Sign In or Register to comment.