tag:blogger.com,1999:blog-79374443857639848662024-02-19T08:58:23.527-08:00Programming StuffSMShttp://www.blogger.com/profile/13165230624920939704noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7937444385763984866.post-63033033943383359012011-08-09T22:51:00.000-07:002011-08-09T22:51:46.183-07:00Configuring the JCreatorIf you install the program properly, when you start the JCreator the first time, you will see these screen.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik5jZsKAqcxeVLlgmno-eoy5VhGRr2jcPG6vlYBZhOh8JFvLwsb7Iw-K171b0qI_OIRgDZQEUT1PI0Cz8xAhNxQmx4mo_jVnOEF6D8PoPIyXaaSQCsIFL2_GNvNltjfoNKM8yJsspM9t4/s1600/configure1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik5jZsKAqcxeVLlgmno-eoy5VhGRr2jcPG6vlYBZhOh8JFvLwsb7Iw-K171b0qI_OIRgDZQEUT1PI0Cz8xAhNxQmx4mo_jVnOEF6D8PoPIyXaaSQCsIFL2_GNvNltjfoNKM8yJsspM9t4/s400/configure1.jpg" width="400" /></a></div><div style="text-align: center;"> Choose save setting per user. Click Next</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0h28zroFbXNznlpLhyhiK7bj8ms3zQb2gt185x7EHoju_hHVG-QrfFs6egHSNaqytEhaDREur2xWqOdo36gfUkzr7xeOZ_1jY4u9PixWNXX8a60DmyEZQlOcWrTFJhcc5cA6ruHBqKok/s1600/configure2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0h28zroFbXNznlpLhyhiK7bj8ms3zQb2gt185x7EHoju_hHVG-QrfFs6egHSNaqytEhaDREur2xWqOdo36gfUkzr7xeOZ_1jY4u9PixWNXX8a60DmyEZQlOcWrTFJhcc5cA6ruHBqKok/s400/configure2.jpg" width="400" /></a></div><div style="text-align: center;"> Choose Java Source File. Click Next.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8C3D4bMk6oDaZdvs0pmHpwz7UL-ETSp_oUkq_Y8b0HkM7K4rEFBkuAvDzfaZAYCGf9LUozqMTDjJw9AAaKntxem_j_ry6P_JrmwDHML9L29AwNqQqO6VN0d2uHb6lvspuhiQQKbh8bzQ/s1600/configure3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8C3D4bMk6oDaZdvs0pmHpwz7UL-ETSp_oUkq_Y8b0HkM7K4rEFBkuAvDzfaZAYCGf9LUozqMTDjJw9AAaKntxem_j_ry6P_JrmwDHML9L29AwNqQqO6VN0d2uHb6lvspuhiQQKbh8bzQ/s400/configure3.jpg" width="400" /></a></div><div style="text-align: justify;">If you install properly, you should see something in the JDK home directory. If you made a mistake and its empty, click Browse.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeAiE9Y9u8vuwD0DqOqwDHzWyGZ75zNE4MqpECLW5QKzSdR6YoW0ktsLwSIDFgSscr5IxGHuILJyjWO6xDvN4fVhF92Ve__OQeXGUutBg5NrgtfzqNHGCrC_8nyeBgPRJIm6ZKFUb6lSc/s1600/configure4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeAiE9Y9u8vuwD0DqOqwDHzWyGZ75zNE4MqpECLW5QKzSdR6YoW0ktsLwSIDFgSscr5IxGHuILJyjWO6xDvN4fVhF92Ve__OQeXGUutBg5NrgtfzqNHGCrC_8nyeBgPRJIm6ZKFUb6lSc/s400/configure4.jpg" width="400" /></a></div><div style="text-align: center;">The Java folder is commonly under the Program Files, so look there for the Java folder.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn1-gTYJLKDNYFmqJqEC7IjOBkBhVmSHQ64OQPkz1B60ax-dFGqZKJAq2Bi6bavAg_2cHuJK8qng_0NgJE2hlX0wWAF7JUncPoK3pdUo3FOJ-rfzoUCkcD_OjF1rX4BA0OJdUXbYie_SE/s1600/configure5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn1-gTYJLKDNYFmqJqEC7IjOBkBhVmSHQ64OQPkz1B60ax-dFGqZKJAq2Bi6bavAg_2cHuJK8qng_0NgJE2hlX0wWAF7JUncPoK3pdUo3FOJ-rfzoUCkcD_OjF1rX4BA0OJdUXbYie_SE/s400/configure5.jpg" width="400" /></a></div><div style="text-align: justify;">Select the jdk folder. The number might not be the same, depending on your jdk version. Then click OK.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha4LxUlPA9_gJkxosHE0dC191B02YP0eWJodJYv-RZ0L1zCFeBBJWUjmkoGppWsxy3rjQ35pQkDkkTf_mneI1jFroLj5XPC4UQdc9YvsAOk-7KpsgGkTySkz2sgrqMKXk-y-_Pt0HBdmk/s1600/configure6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha4LxUlPA9_gJkxosHE0dC191B02YP0eWJodJYv-RZ0L1zCFeBBJWUjmkoGppWsxy3rjQ35pQkDkkTf_mneI1jFroLj5XPC4UQdc9YvsAOk-7KpsgGkTySkz2sgrqMKXk-y-_Pt0HBdmk/s400/configure6.jpg" width="400" /></a></div><div style="text-align: center;">Leave the JavaDocs empty and just click Finish. This is how you configure the JCreator.</div>SMShttp://www.blogger.com/profile/13165230624920939704noreply@blogger.com0tag:blogger.com,1999:blog-7937444385763984866.post-3574428631026722002011-08-07T22:42:00.000-07:002011-08-07T22:42:56.635-07:00The thing about Java..introduction<div style="text-align: justify;">Basically Java is a programming language. Like any programming language, you need to know the syntax of it. Programming is not difficult, the problem is when the error come out, you have to settle it.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">There are many Java editors, I am going to use JCreator. To install JCreator, you need two things basically.</div><div style="text-align: justify;">1. You need a JDK file that can be downloaded from Oracle website</div><div style="text-align: justify;">2. You need the JCreator installer.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">You need to install the JDK file first before installing the JCreator, or you will have problem building a file later.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Another thing, when a Java file is compiled, it does not create an exe file like C or C++. It creates a class file.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">C++</div><div style="text-align: justify;">Program.cpp when compiled will produce Program.exe.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">Java </div><div style="text-align: justify;">Program.java when compiled will produce Program.class.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">But java has a peculiar habit where the class name MUST be the same as the file name, otherwise there will be an error when you try to compile the file.</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">public class Program {</div><div style="text-align: justify;">public static void main(String args[]) {</div><div style="text-align: justify;"><br />
</div><div style="text-align: justify;">}</div><div style="text-align: justify;">}</div><div style="text-align: justify;">This piece of java code MUST be saved as Program.java. Any other name, even lowercase program.java will give you error when you compile it.</div>SMShttp://www.blogger.com/profile/13165230624920939704noreply@blogger.com1