Friday, March 28, 2014

Java දැනගමුද part 2

                        දැන් අපි බලමු කොහොමද JAVA වැඩ කරන්නෙ කියලා



Java Programming Languages එකෙදි සියළුම Source code  ලියන්නෙ “Java” extension එක සහිත සරල වාක්‍ය විදිහටයි.
ඊට පස්සේ  Source File  සියල්ල ‘.class’ලෙස හඳුන්වන file බවට compile (සකස්කරනවා) කරනවා. එය compile කරන Software එක Java තුලමයි තියෙන්නෙ. ඒකට අපි කියන්නෙ Java Compiler කියලා. Class File එකක් තුල Code එකක් අඩංගු වන්නෙ නැහැ. ඒ වනුවට එහි අඩංගු වන්නෙ Byte code කියලා හඳුන්වන තොරතුරු සමූහයකි.

මෙය .exe file එකක් වගෙ කෙලින්ම Operating System  එකක් මත කියාත්මක කල නොහැකි අතරමැදි අවස්ථාවයි. එම නිසා මෙම byte code එක ධාවනය කිරීමට විශේෂෙයන් අවශ්‍ය පරිසරය වන්න් JRE –java Runtime Environment එකයි.එක් එක් Operating System එකකට ගැලෙපන විදිහට JRE කීපයක්ම තියන නිසා ඕනෑම Operating System එකකට, ඊට හරියන JRE එක පමණක් Install කිරීෙමන් අනතුරුව Java වලින් සෑදූ Application එකක් ඕනෑම Operating System එකක එක වගෙ කියාත්මක කරන්න පුළුවන්.

 Bytecode Application එක හෙවත් ‘.class’ file එක computer එකටතේරුම් ගැනීමට හැකි ආකාරයට සැකසීමක් ඉන් අනතුරුව සිදුෙවනවා. එය සිදුවන්නෙ Java virtual machine හෙවත් Java VM වැඩ සටහන මඟිනි

 Java වල තිබෙන, ඕනෑම operating system එකක් මත වැඩ කිරීෙම් ගුණය සහ hardware වල වෙනස්කම්වලින් බාධා නොවීෙම් ගුණය ඇතිකර දෙන්නෙ JVM කොටෙසේ කියාකාරිත්වය මඟිනි. Byte code කියලා කියන්නෙ Java Virtual machine එකට හදුනාගත හැකි තොරතුරු සැකසුමකි. එනම් machine language එකයි. මෙය මඟින් අප භාවිතා කරන Operating System එකට, platform එකට වටහා ගත හැකි ආකාරයට Program එක නැවත සකසනවා.

                                         

        
                                                මෙ තියෙන්නෙ ජාවා වල වැඩේ වෙන  විදිහ


  • අපි ලියපු source code එක
  • ඊලඟට එය java compiler Software එක හරහා compile කරනවා
  • ඊලඟට එය .class extension එක සහිත file එකක් ලැබෙනවා
  • ඊට පසු එය JVM එක මඟින්, අපි වැඩ කරන Operating System එකට හදුනා ගන්න පුලුවන් විදිහට හරවනවා

JAVA වල තවත් තිබෙන සුවිශේශතා

  • Java Platform
 ඕනෑම Computer Program එකක් වැඩ කරන්නෙ hardware සහ software වල එකතුවකින්. එ වගෙ පරිසරයක් අපි හදුන්වන්නෙ platform කියලයි. උදාහරනයක් තමයි වින්ඩොස්, මැක්, ලිනක්ස් වගෙ එවා.
නමුත් Java වල platform එක හැදිලා තියෙන්න software වලින් විතරයි.එය අනික් hardware පදනම් වුන platform මත තමයි වැඩ කරන්නෙ.

Java platform එක කොටස් 2කට බෙදෙනවා.
  1. Java Compiler - (javac)
  2. Java Virtual Machine – (JVM)
 හමුවෙමු ඊලග කොටසින්

Java දැනගමුද part 1

                                                      Java ගැන හැදින්විමක් මුලින්ම








Java කියලා කියන්නෙ programming language එකක්. 1991දී ජේම්ස් ගොස්ලින් විසින් නිර්මාණය කල java programming language එක Sun Microsystems සමාගමටයි අයිති වෙන්නේ.

ජේම්ස් ගොස්ලින්ගේ මූලික අරමුණ වුන low cost, Hardware Independent Language එකක් C++ උපෙයෝගි කරගෙන develop කිරීමයී. තාක්ෂණික ගැටලු මත මගදී එය අසාර්ථක වුනා.මෙකෙ ප්‍රතිපලයක් විදිහට platform independent programming Language එකක් Oak නමින් developed වුනා.

Java develop වුෙන් C++ වල තිබුනු සමහර features ඉවත් කරලයි.1994 දී World Wide Web concept එක පැමිණීමත් සමඟ Oak කියල හදපු programming Language එක , Java කියලා නමකින් හැදින්වුවා.
Java සම්බන්ධ වන්ෙන් Object Oriented Programming සමඟයි. OOP

අපි දැන් Java ඉගෙන ගන්නනෙ යන්නෙ .. ඒක නිසා අපි දැන් බලමු Java ඉගෙන ගත්තට පස්සේ Java වලින් අපට කරන්න පුළුවන් මොනවද කියලා.
  • Web pages නිර්මාණය කිරීම සඳහා සර්ව්ලට් (Servlets ) හෙවත්
    JSP – Java Server Pages නිර්මාණය කිරීමට Java Programming Language එෙකන් පුළුවන්.
  • ජංගම දුරකතන හා PDA (Ex. pocket pc) උපාංග වලටApplications ලිවීමට Java Programming languages එක යොදා ගන්න පුළුවන්.
     

Monday, August 12, 2013

My Mini Project for the 3rd year in SUSL



University Time Table Evaluation and Finding the Geographical Position

Tuesday, July 9, 2013

Plants vs Zombies

මෙන්න නියම game එකක්.පහසුවෙන් බාගෙන සෙල්ලම් කරන්න පුලුවන් game එකක්

zombiesලා එනවා පාරෙන් එහා පැත්තෙ ඉදන්. අපිට තියෙන්න වවා ගෙන උන්ව විනාශ කරන එකයි






Windows 2000/XP/Vista
1.2GHz Processor
512MB RAM
65MB Hard Disk Space
DirectX 8
128MB Video Card



Download

Top of the world

Such a feeling's coming' over me
There is wonder in most every thing I see
Not a cloud in the sky, got the sun in my eyes
And I won't be surprised if it's a dream

Everything I want the world to be
Is now coming' true especially for me
And the reason is clear, it's because you are here
You're the nearest thing to Heaven that I've seen

I'm on the top of the world looking' down on creation
And the only explanation I can find
Is the love that I've found ever since you've been around
Your love's put me at the top of the world

Something in the wind has learned my name
And it's telling' me that things are not the same
In the leaves on the trees and the touch of the breeze
There's a pleasing' sense of happiness for me

There is only one wish on my mind
When this day is through I hope that I will find
That tomorrow will be just the same for you and me
All I need will be mine if you are here

I'm on the top of the world looking' down on creation
And the only explanation I can find
Is the love that I've found ever since you've been around
Your love's put me at the top of the world

I'm on the top of the world looking' down on creation
And the only explanation I can find
Is the love that I've found ever since you've been around
Your love's put me at the top of the world




Saturday, December 29, 2012

Free online Courses

Now you can fallow most up to date top graded university courses for free!
join with the students who are taking courses, and changing the face of higher education. At Coursera, you can take courses fro
m the top universities, for free.
Take classes taught by brilliant professors, interact with students from around the world, and explore tons of interesting questions through our many course offerings. We are committed to making education available to everyone, and we’ll be constantly working to bring you new classes from the best universities.



check out