Many programmers prefer to compete in online programming competitions by submitting solutions using Java. But one might wonder what tools are best for competitive java programming. Here i am revealing the tools i use for competitive java programming :
Note that this environment can be setup on all popular OS platforms.
Features/benefits of this configuration are :
- All benefits of Eclipse such as :
- Code Recommenders
- Intelligent importing
- Error highlighting
- Warnings
and much more..... - Enhanced efficiency with VI editor capabilities added to eclipse via Vrapper
Vrapper can be installed inside eclipse as a plugin and it is one of the best plugins to add VI features to eclipse. Having Vrapper means you have all the power of VI editor. - By ensuring the that jdk is installed you can run the 'javac' command and 'java' command right from the command prompt or terminal.
- By using the terminal for compilation and execution gives you the power of directing stdin input from a file and also stdout output to a file. These features are not yet available in eclipse luna. Ironically this feature is very helpful in studying large outputs and inputs and debugging.
Steps for using the environment
1. Create a new java project with any name.
2. In package explorer, right click on its 'src' package and add new class to it. In the New Java Class dialog make sure to set package field empty i.e. default package.
3. Now write your program in the class created in step 2.
4. To run this program make sure jdk is installed properly and the 'javac' command runs properly in the terminal/ command prompt. Now open the terminal/command prompt, compile and run the program using the following command :
javac Solution.java && java Solution <in.txt> out.txtwhere Solution.java is the file name in which code is written and the second command 'java Solution' (where Solution is the name of the class in .java file) runs the compiled program taking input from 'in.txt' in the same folder where Solution.java exists and writes output to out.txt in the same folder
Note that this environment can be setup on all popular OS platforms.
No comments:
Post a Comment