Howdy, Stranger!

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

Categories

I m very new to java..!

javakumaranjavakumaran Member Posts: 3
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 Member Posts: 9
    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 Member Posts: 3
    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 Member Posts: 9
    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 Member Posts: 33
    : 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.