ජාවා (ක්‍රමලේඛන භාෂාව)

විකිපීඩියා වෙතින්
ජාවා
ගොනුව:Java logo.svg
පැරඩයිමMulti-paradigm: වස්තු-නැඹුරු (class-based), structured, imperative, generic, reflective, concurrent
සැලසුම් කළේජේම්ස් ගොස්ලිං
සංවර්ධකයාසන් මයික්‍රොසිස්ටම්ස් (now owned by Oracle Corporation)
පළමුව ප්‍රකාශයමැයි 23, 1995; වසර 28 කට පෙර (1995-05-23)[1]
ප්‍රරූප නීතියStatic, strong, safe, nominative, manifest
වරපතGNU General Public License, Java Community Process
ගොනු දිගුව.java, .class, .jar
වෙබ් අඩවියoracle.com/java/
ප්‍රධාන ක්‍රියාත්මක කිරීම
OpenJDK, GNU Compiler for Java (GCJ), many others
උප භාෂෘව
Generic Java, Pizza
ආභාෂය ලද්දේ
Ada 83, C++,[2] C#,[3] Eiffel,[4] Generic Java, Mesa,[5] Modula-3,[6] Oberon,[7] Objective-C,[8] UCSD Pascal,[9][10] Object Pascal[11]
බලපෑම් කළේ
Ada 2005, BeanShell, C#, Chapel,[12] Clojure, ECMAScript, Fantom, Groovy, Hack,[13] Haxe, J#, JavaScript, Kotlin, PHP, Python, Scala, Seed7, Vala

ජාවා යනු සමගාමී, පන්ති-මූලික, වස්තු-නැඹුරු, පොදු-කාර්ය පරිගණක ක්‍රමලේඛන භාෂාවකි,[14] එය විශේෂයෙන් ම ක්‍රියාත්මක කිරීමේ පරායත්තතාවන් අවම කරමින් සැලසුම් කර ඇත. එමගින් යෙදවුම් සංවර්ධකයන්ට "එක් වරක් ලියා, ඕනෑම තැනක ධාවනය කිරීමට" (WORA) අවස්ථාව ලබා දීමට අපේක්ෂා කර ඇත,[15] එනම් සම්පාදිත ජාවා කේතය ඊට සහාය දක්වන සියලු ප්ලැට්ෆෝම් වල ප්‍රතිසම්පාදනය කිරීමකින් තොරව ධාවනය කළ හැක.[16] ජාවා යෙදවුම් නියමාකාරයට සම්පාදනය (Compile) කරන්නේ පරිගණක වාස්තුව නොසලකා ඕනෑම ජාවා වර්චුවල් යන්ත්‍රයක (JVM) ධාවනය වන බයිට්කෝඩ් වලටය. 2016 වනවිට, ජනප්‍රියම පරිඝනක ක්‍රමලේකන භාෂාවකි,[17][18][19][20] එමෙන්ම ලොව පුරා මිලියන 9ක් පරිශීලකයන් භාවිතා කරන අතර ප්‍රධාන වශයෙන් වෙබ් යෙදුම් නිර්මාණය කිරීමට යොදාගනි.[21] Java was originally developed by James Gosling at Sun Microsystems (which has since been acquired by Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.

The original and reference implementation Java compilers, virtual machines, and class libraries were originally released by Sun under proprietary licenses. As of May 2007, in compliance with the specifications of the Java Community Process, Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java (bytecode compiler), GNU Classpath (standard libraries), and IcedTea-Web (browser plugin for applets).

The latest version is Java 8 which is the only version currently supported for free by Oracle, although earlier versions are supported both by Oracle and other companies on a commercial basis.

ජාවා යනු පරිගණක ක්‍රමලේඛණය කිරිමට හාවිතා කරයි. "සන් මයික්‍රෝසිස්ටම්ස්" (Sun Microsystems) නැමැති ආයතනය විසින් 1995 වර්ෂෙය්දි හදුන්වාදෙන ලදි. මෙමය C සහ C++ යන පරිගණක ක්‍රමලේඛණ හාෂා වලට සමානකම් දැක්වුවද ඊට වඩා වැඩි පහසුකම් අන්තර්ගතය. ජාවා වැඩසටහන් bytecode නැමැති ක්‍රමයට පරිවර්තනය කොට "ජාවා වැඩකරන පරිසරය" තුල ක්‍රියාත්මක වේ. "ජාවා" යනු දැනට භාවිතයේ පවතින ජනප්‍රියතම ක්‍රමලේඛන භෂාවක් වන අතර,එය පරිගනක යෙදවුම් මෘදුකාංග (Computer Application Software) සැකසීමේ සිට වෙබ් යෙදවුම් (Web Application) දියුණු කිරීම දක්වා වූ පුළුල් පරාසයක ව්‍යප්ත වී පවතී. නමුත් දැන් ජාවාහි අයිතිය "ඔරකල් ආයතනය" (Oracal Corp.) සතුව පවති.

ඉතිහාසය[සංස්කරණය]

ජේම්ස් ගොස්ලිං (James Gosling), මයික් ෂෙරිඩන් (Mike Sheridan) සහ පැට්‍රික් නෝටන් (Patrick Naughton) යන අය ඇතුලු "ග්‍රීන් ටීම්" (Green Team) නමින් හැන්දින්වු කන්ඩායම 1991 ජූනි මාසය පමන වන විට "Green Project" ව්‍යපෘතිය ආරම්භ කරන ලදී. මෙම ක්‍රම ලේඛන භාෂාව මුලින්ම "ඕක්"(oak) ලෙස හඳුන්වන වනු ලැබූ අතර,ජේම්ස් ගොස්ලිං ගේ කාර්යාලය ඉදිරිපිට තිබූ "ඕක්" ගසක් එයට හේතු වූ බව සඳහන් වේ. පසුව එය "ග්‍රීන්"(Green) ලෙස වෙනස් වූ අතර, අවසානයේදී සසම්භාවීව තෝරා ගත් වචන සමූහයක් අතරින් "ජාවා" (Java) යන නමින් නම් කරනු ලැබීය. සන් මයික්‍රෝසිස්ටම්ස් ආයතනය විසින් 1995 වර්ෂයේදී ජාවා පරිගනක භාෂාව මුලින්ම මහජනයා වෙත ඉදිරිපත් කරන ලදී (2010 ජනවාරි 27 වන දින සිට ඔරකල් ආයතනය විසින් අත්පත් කරගන්නා ලදී ). එය එවකට ජනප්‍රිය පද්ධති වෙනුවෙන් වියදම් රහිත භාෂාවක් ලෙස ප්‍රචලිත විය.

මුලික වැඩසටහනක්[සංස්කරණය]

class HelloWorldApp {
    public static void main(String[] args) {
        String x="Hello World"; // Create string variable.
        System.out.println(x); // Display the string.
    }
}

මෙම කුඩා වැඩසටහන වදන් සැකසීමෙ වැඩසටහනක් (Notepad) මගින් සකස් කර HelloWorldApp.java නම්න් ගබඩා කර විධාන ක්‍රියාත්මක කිරීමේ වැඩසටහනක් (eg: Windows Command Prompt) ආධාරයෙන් ක්‍රියාත්මක කර බැලිය හැකිය. මෙම වැඩසටහන ධාවනය කිරිමට පෙර compile කර ගත යුතුය. ඒ සදහා javac විධානය යොදා ගත හැකිය. (eg: javac HelloWorldApp.java). ධාවනය කිරීම සදහා java විධානය යොදා ගත හැකිය. (උදා: java HelloWorldApp)


ඔබගේ පරිඝනකයට ජාවා පරිගණක ක්‍රමලේඛන බස පිහිටුවා ගන්නා ආකාරය

ඔබගේ මෙහයුම් පද්දතිය WINDOWS නම්,

  • පලමුව ඔබගේ ම්හයුම් පද්දට්තියාට ගෑලපෙන ජවා ක්‍රමලේඛනය භාගත කර ගන්න. මෙය ප්‍රධාන ලෙස 32 bit සහ 64 bit ලෙස වර්ග දෙකකින් ඈත.
ඔබගේ මෙහයුම් පද්දතිය ගෑන දෑන ගෑනීම සදහා DxDiag මෙවලම භාවිතා කරන්න
  • සාර්ථකව පිහිටුවා ගැනීමෙන් පසු පහත සදහන් SYSTEM variable, ENVIRONMENT variable ඇතුලත් කරන්න.
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_33 ( ඔබට ගෙලපෙන ලෙස වෙනස් කර ගන්න )
  • මෙහයුම් පද්දතියේ PATH variable පහත ලෙස සංස්කාණය කරගන්න.
$JAVA_HOME\bin

දෑන් ඔබ සාර්තකව පිහිටුවාගෙන අවසානය්. ඔබ සාර්තක දෑය් දෑන ගෑනීමට විධාන පුවරුවක් ගෑන java අතුල්කරන්න එවිට ඔබට නව පිහිටුවා ගෙනීමේ විස්තර ලෙබෙනු ඈත.

සංස්කරණය[සංස්කරණය]

සන් ආයතනය ජාවා ක්‍රමලේඛන විවිධ මාධ්‍ය (Platform) ඉලක්ක කරගනිම්න් සකස්කර ඇත. ඒවා නම්,

  • ජාවා කාඩ්‍‍ ස්මාට්කාඩ් සදහා.
  • ජාවා මයික්‍රෝ සංස්කරණය (ජාවා එම්.ඊ.) — සීමාසහිත සම්පත් ඇති පද්ධති සදහා(ජංගම දුරකථන, රූපවාහිනි ආදිය සදහා).
  • ජාවා සාමාන්‍ය සංස්කරණය (ජාවා එස්.ඊ.) — සාමාන්‍ය පරිඝනක සදහා.
  • ජාවා වානිජ සංස්කරණය (ජාවා ඊ.ඊ.) — වානිජමය ඉතා දියුනු අන්තර්ජාල යෙදුම් නිර්මාණය කිරිම සදහා.

ඉහත සදහන් එක් එක් සංස්කරණ සදහා වෙන වෙනම ඊට අදාල සම්පත් ජාවා සතුව පවති. අදාල කේතයන් Sun ආයතනය මගින් නඩත්තු වන අතර ඒ පිලිබද උනන්දුවක් දක්වන්නන්ට එම ක්‍රියාවලියට සහභාගි විය හැක.

සන් ආයතනය PersonalJava නම්න්ද සංස්කරණයක් ජාවා මයික්‍රෝ සංස්කරණය සම්බන්ධයෙන් ලබාදුන්නත් පසුව එම සංස්කරණය දියුනු කිරිම නවතා ඇත.

බාහිර සබැඳුම්[සංස්කරණය]

  1. Binstock, Andrew (20 May 2015). "Java's 20 Years Of Innovation". Forbes. සම්ප්‍රවේශය 18 March 2016.
  2. Harry. H. Chaudhary (28 July 2014). "Cracking The Java Programming Interview :: 2000+ Java Interview Que/Ans". සම්ප්‍රවේශය 29 May 2016.
  3. Java 5.0 added several new language features (the enhanced for loop, autoboxing, varargs and annotations), after they were introduced in the similar (and competing) C# language [1] [2]
  4. Gosling, James; McGilton, Henry (May 1996). "The Java Language Environment".
  5. Gosling, James; Joy, Bill; Steele, Guy; Bracha, Gilad. "The Java Language Specification, 2nd Edition".
  6. "The A-Z of Programming Languages: Modula-3". Computerworld.com.au. සම්ප්‍රවේශය 2010-06-09.
  7. Niklaus Wirth stated on a number of public occasions, e.g. in a lecture at the Polytechnic Museum, Moscow in September, 2005 (several independent first-hand accounts in Russian exist, e.g. one with an audio recording: Filippova, Elena (September 22, 2005). "Niklaus Wirth's lecture at the Polytechnic Museum in Moscow".), that the Sun Java design team licensed the Oberon compiler sources a number of years prior to the release of Java and examined it: a (relative) compactness, type safety, garbage collection, no multiple inheritance for classes – all these key overall design features are shared by Java and Oberon.
  8. Patrick Naughton cites Objective-C as a strong influence on the design of the Java programming language, stating that notable direct derivatives include Java interfaces (derived from Objective-C's protocol) and primitive wrapper classes. [3]
  9. TechMetrix Research (1999). "History of Java" (PDF). Java Application Servers Report. The project went ahead under the name "green" and the language was based on an old model of UCSD Pascal, which makes it possible to generate interpretive code
  10. "A Conversation with James Gosling – ACM Queue". Queue.acm.org. 2004-08-31. සම්ප්‍රවේශය 2010-06-09.
  11. In the summer of 1996, Sun was designing the precursor to what is now the event model of the AWT and the JavaBeans TM component architecture. Borland contributed greatly to this process. We looked very carefully at Delphi Object Pascal and built a working prototype of bound method references in order to understand their interaction with the Java programming language and its APIs.White Paper About Microsoft's "Delegates"
  12. "Chapel spec (Acknowledgements)" (PDF). Cray Inc. 2015-10-01. සම්ප්‍රවේශය 2016-01-14.
  13. "Facebook Q&A: Hack brings static typing to PHP world". InfoWorld. 2014-03-26. සම්ප්‍රවේශය 2015-01-11.
  14. Gosling et al. 2014, පිටු අංකය: 1.
  15. "Write once, run anywhere?". Computer Weekly. 2002-05-02. සම්ප්‍රවේශය 2009-07-27.
  16. "1.2 Design Goals of the Java™ Programming Language". Oracle. 1999-01-01. සම්ප්‍රවේශය 2013-01-14.
  17. McMillan, Robert (2013-08-01). "Is Java Losing Its Mojo?". wired.com. Java is on the wane, at least according to one outfit that keeps on eye on the ever-changing world of computer programming languages. For more than a decade, it has dominated the TIOBE Programming Community Index, and is back on top – a snapshot of software developer enthusiasm that looks at things like internet search results to measure how much buzz different languages have. But lately, Java has been slipping.
  18. RedMonk Index on redmonk.com (Stephen O'Grady, January 2015)
  19. "Programming Language Popularity". langpop.com. 2013-10-25. සම්ප්‍රවේශය 2015-04-02. Normalized Comparison: 1st C, 2nd Java, 3rd PHP
  20. "TIOBE Programming Community Index". 2015. සම්ප්‍රවේශය 2015-04-03.
  21. "JavaOne 2013 Review: Java Takes on the Internet of Things". www.oracle.com. සම්ප්‍රවේශය 2016-06-19.
"https://si.wikipedia.org/w/index.php?title=ජාවා_(ක්‍රමලේඛන_භාෂාව)&oldid=623673" වෙතින් සම්ප්‍රවේශනය කෙරිණි