A step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.
A C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.
This tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.
Creating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.
Getting Started with JavaStart Programming with Java, first sample code and some additional details |
On Tuesday, May 25th 2004 at 03:52 PM By Sina Marandian Hagh (View Profile) ![]() ![]() ![]() ![]() (Rated 4.4 with 32 votes) |
||
|
In the first article I generally described the usages and abalities
After installing JDK (Java Develepment Kit) do the following setting on your Windows: 1. Go to the folder you have installed JDK and creat a new folder in the root called "Programs". 2. Right-click on My Computer icon in your Windows Desktop. 3. Go to Properties/Advanced/Envierment Variables/ 4. In the User variable,press New. Set the Variable Name to: "path" 5. Set the Variable Value to bin folder on the path you've installed JDK. ( for example: C:\Java\bin\ ) 6. Press OK. 7. In the System variable,press New. Set the Variable Name to: "Class path". 8. Set the Variable value to the path of the folder you have recently created. ( for example: C:\Java\Programs\ ) 9. Press OK. Note: You can download final version of JDK from following link: https://jsecom16.sun.com/ECom/EComActionServlet/LegalPage:~:com.sun. sunit.sdlc.content.LegalWebPageInfo;jsessionid=jsecom16.sun.com- 1386d%3A40b1909d%3A57cbd686844da024 ******************************************************************** Running the first Program: In order to compile your first Java program, type Sample1 code in a simple text editor such as Windows Notpad. Atention: Don't use Wordpad or such stuffs to do the job. Additionally don't use any IDE to type and compile your code. You'd better to learn to do it even without IDEs. Then save the file in the Programs folder you've created as "startingJava.java". Run the Command Prompt and change the current path to the JDK's Progams folder. Type the following command and press Enter key: javac startingJava.java After a few seconds, Command Line would appear again while your first Java program have been compiled. JVM (Java Virtual Machine) now have created a class file for the program called startingJava.class . The class file contains BYTE CODEs which is clearly similar to Assembly codes. So there wouldn't be any .EXE file (executable file) after compiling. For the next step, type the following command and press Enter key: java startingJava.class (or) java startingJava Now the JRI (Java Runtime Interpreter) changes the byte codes to the processors commands. You can see the output in this way: This is my first Java Program. Close the Command Prompt Window. Cogratulations ! You made and compiled your first Java Program. Now at the end of this article let me ask some question. I'm going to answer them in the next article: 1. At first, why did we do those settings on Windows ? 2. While Interpreting .class file, why do you can type in the both of the following ways? : java 3. Why does the Java compiler make byte code instead of Assembly code ? In the next article we are going to start learning the Java's Basisc. |
|||
Digg It!
Del.icio.us
Reddit
StumbleIt
Newsvine
Furl
BlinkList
|
|||
|
|||
Current Commentsits good
Adding path to User variables didn't work out on XP. Had to set path in command window.
Had to use public static void main(String[] args) instead of just public static void main to get rid of an error.
Overall, very good instructions.
its really very good but i am not able to go to next page i suggest you to please provide next button to continue to next page
"error: cannot read: startingJava.java"
Wtf?
its very good.is it always necessary to write String ar[] coomand line argument?
thats really great
thats really great
its very good
thats really great
its very good
thats really great
its very good
VERY GOOD
good..but in the prog there is an error if we don\'t give the
main(string args[])
overall very friendly..
Related Tutorials
Related Source Code
Java Job Search