HOW TO COMPILE AND RUN JAVA PROGRAMS IN DIFFERENT OPERATING SYSTEMS???
WINDOWS 7 OR 8
WINDOWS 7 OR 8
- Install latest java by selecting your suitable windows version(64 or 32 bit) from here.
- open setup file and installation proceeds....
- check for environment correctness in your pc by issuing command "javac".
If you get javac is not an internal or external command you need to set "environment variable".
To do this:
- Go to: Control Panel->System and Security->System->advanced settings->environment variables->new
- give “path” for path name and “C:\Program Files\Java\jdk1.7.0_45” for path value
- Value depends on your installed location
- Now write a java program in any text editor like notepad and save it with ".java" extension
- Compile and run it in command prompt.
SIMPLE PROCESS
- Don't want to do all the stuff described above !!!
- Click here for "Net-beans IDK" and just install it and compile as it is a IDE.
LINUX BASED OPERATING SYSTEMS
- open terminal and type below command....
- "sudo apt-get install oracle-java7-installer" (without quotes).
- authenticate with password and you are done....
- In terminal use “nano” command for text editor and compile, run your programs....!!!
- So simple in Linux based OS.. Isn't it ???
No comments:
Post a Comment