مراحل کامپایل و اجرای برنامه در جاوا

1-برنامه جاوا در یک ادیتور نوشته می شود و با پسوند java. روی دیسک ذخیره می شود.

2-کامپایلر فایل با پسوند java. را می گیرد و فایل با پسوند class. تولید می کند که bytecode است و آن را روی دیسک ذخیره می کند.

3-Class Loader عمل انتقال Bytecode ها به حافظه را انجام می دهد.

4-Bytecode Verifier صحت Bytecode ها را بررسی می کند و کنترل می کند که قوانین java security نقض نشده باشد.

5-interpreter بایت کد ها را می خواند و آنها را به زبانی که کامپیوتر بداند ترجمه می کند.

Constructor in java

in java each class has a constructor. If you declare the constructor, you will lose default constructor.

Bytecode Verifier in Java

1-bytecode verifier verifies codes before JVM runs them.

2-All imported class files also pass through the bytecode verifier.

چند نکته در مورد bytecode و JVM در جاوا

1-Compiler gets sourcecode and produces bytecode.

2-bytecode is machinecode instructions for the JVM.

3-bytecodes are stored in .class files.

4-JVM does Garbage Collection.

5-at runtime JVM loads the bytcodes, checks them  and runs them in an interpreter.


چند نکته در مورد Applet ها در جاوا

Applet ها برنامه هایی هستند که به زبان جاوا نوشته می شوند و دارای خصوصیات زیر می باشند:


1-Reside on web servers
2-Download by browser
3-Run by browser
4-Small in size
5-invoked by HTML Webpage