Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
I m very new to java..! Posted by javakumaran on 26 Oct 2005 at 8:57 AM
I have installed java on to my pc.But i cannot compile a single program yet.could anyone tell me how to compile ?
Report
Re: I m very new to java..! Posted by electra_pr on 26 Oct 2005 at 1:44 PM
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...
Report
Thanks electra!But..! Posted by javakumaran on 26 Oct 2005 at 9:53 PM
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 !

Report
Re: Thanks electra!But..! Posted by electra_pr on 27 Oct 2005 at 11:41 AM
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... :)
Report
Re: Thanks electra!But..! Posted by Liree on 27 Oct 2005 at 11:28 PM
: 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.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.