{"id":107370,"date":"2023-03-22T00:48:09","date_gmt":"2023-03-21T22:48:09","guid":{"rendered":"https:\/\/prohoster.info\/?p=107370"},"modified":"2023-03-22T11:10:35","modified_gmt":"2023-03-22T09:10:35","slug":"vypusk-java-se-20","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/news\/vypusk-java-se-20","title":{"rendered":"Publikimi i Java SE 20","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Pas pas gjasht\u00eb muajsh zhvillim, kompania Oracle l\u00ebshoi platform\u00ebn Java SE 20 (Java Platform, Standard Edition 20), p\u00ebr t\u00eb cil\u00ebn p\u00ebrdoret projekti i hapur OpenJDK si implementimi referenc\u00eb. P\u00ebrve\u00e7 eliminimit t\u00eb disa mund\u00ebsive t\u00eb vjetra, Java SE 20 ruan p\u00ebrputhshm\u00ebrin\u00eb e prapme me versionet e m\u00ebparshme t\u00eb platform\u00ebs Java \u2014 shumica e projekteve t\u00eb shkruara m\u00eb par\u00eb n\u00eb Java do t\u00eb funksionojn\u00eb pa ndryshime n\u00ebn versionin e ri. Nd\u00ebrtimet e gatshme p\u00ebr instalim t\u00eb Java SE 20 (JDK, JRE dhe Server JRE) jan\u00eb p\u00ebrgatitur p\u00ebr Linux (x86_64, AArch64), Windows (x86_64) dhe macOS (x86_64, AArch64). Implementimi referenc\u00eb i Java 20, i zhvilluar si pjes\u00eb e projektit OpenJDK, \u00ebsht\u00eb plot\u00ebsisht i hapur n\u00ebn licenc\u00ebn GPLv2 me p\u00ebrjashtime nga GNU ClassPath, t\u00eb cilat lejojn\u00eb lidhjen dinamike me produkte komerciale.     <\/p>\n<p>Java SE 20 \u00ebsht\u00eb klasifikuar si nj\u00eb l\u00ebshim me nj\u00eb periudh\u00eb mb\u00ebshtetjeje standarde, p\u00ebrdit\u00ebsimet p\u00ebr t\u00eb cilin do t\u00eb publikohen deri n\u00eb l\u00ebshimin e ardhsh\u00ebm. Si deg\u00eb me periudh\u00eb t\u00eb zgjatur mb\u00ebshtetjeje (LTS) duhet t\u00eb p\u00ebrdoret Java SE 17, p\u00ebrdit\u00ebsimet p\u00ebr t\u00eb cil\u00ebn do t\u00eb publikohen deri n\u00eb vitin 2029. Kujtojm\u00eb se, q\u00eb nga publikimi i Java 10, projekti ka kaluar n\u00eb nj\u00eb proces t\u00eb ri zhvillimi, q\u00eb p\u00ebrfshin nj\u00eb cik\u00ebl m\u00eb t\u00eb shkurt\u00ebr t\u00eb formimit t\u00eb l\u00ebshimeve t\u00eb rinj. Funksionaliteti i ri tani zhvillohet n\u00eb nj\u00eb deg\u00eb master t\u00eb p\u00ebrhershme, n\u00eb t\u00eb cil\u00ebn p\u00ebrfshihen ndryshimet e gatshme dhe nga e cila ndahen deg\u00eb p\u00ebr stabilizimin e l\u00ebshimeve t\u00eb reja \u00e7do gjasht\u00eb muaj.     <\/p>\n<p>Nga risit\u00eb e Java 20 mund t\u00eb p\u00ebrmendim:  <\/p>\n<ul>\n<li class=\"l\"> T\u00eb dh\u00ebna t\u00eb scopuara (Scoped Values) jan\u00eb propozuar p\u00ebr mb\u00ebshtetje paraprake, duke lejuar ndarjen e t\u00eb dh\u00ebnave t\u00eb pandryshueshme n\u00eb shkall\u00eb dhe nj\u00eb shk\u00ebmbim efikas t\u00eb t\u00eb dh\u00ebnave midis n\u00ebnpro\u00e7eseve (vlerat trash\u00ebgohen). Scoped Values po zhvillohen p\u00ebr t\u00eb z\u00ebvend\u00ebsuar mekanizmin e variablave lokale t\u00eb procesit (thread-local variables) dhe jan\u00eb m\u00eb efikas p\u00ebr p\u00ebrdorimin e nj\u00eb numri t\u00eb madh t\u00eb proceseve virtuale (mij\u00ebra dhe miliona procese). Dallimi kryesor midis Scoped Values dhe variablave lokale t\u00eb procesit \u00ebsht\u00eb se t\u00eb parat regjistrohen nj\u00eb her\u00eb, nuk mund t\u00eb ndryshohen m\u00eb pas dhe jan\u00eb t\u00eb disponueshme vet\u00ebm gjat\u00eb koh\u00ebs s\u00eb ekzekutimit t\u00eb procesit. \n class Server { \n final static ScopedValue CURRENT_USER = new ScopedValue(); \n void serve(Request request, Response response) { \n var level = (request.isAuthorized() ? ADMIN : GUEST); \n var user = new User(level); \n ScopedValue.where(CURRENT_USER, user) \n .run(() -&gt; Application.handle(request, response)); \n } \n } \n class DatabaseManager { \n DBConnection open() { \n var user = Server.CURRENT_USER.get(); \n if (!user.canOpen()) throw new InvalidUserException(); \n return new DBConnection(...); \n } \n }\n<li class=\"l\"> \u00cbsht\u00eb shtuar nj\u00eb realizim i dyt\u00eb paraprak i \u0448\u0430\u0431\u043b\u043e\u043d\u00ebve t\u00eb regjistrimit (record pattern), q\u00eb zgjerojn\u00eb mund\u00ebsin\u00eb e p\u00ebrfaq\u00ebsimit t\u00eb pranishme n\u00eb Java 16 p\u00ebr p\u00ebrputhshm\u00ebrin me mostrat e mjeteve p\u00ebr analizimin e vlerave t\u00eb klasave t\u00eb tipit record. P\u00ebr shembull:       record Point(int x, int y) {}       static void printSum(Object obj) {         if (obj instanceof Point p) {             int x = p.x();             int y = p.y();             System.out.println(x + y);         }     }\n<li class=\"l\"> U shtua realizimi i kat\u00ebrt paraprak i p\u00ebrputhjes sipas modelit n\u00eb shprehjet &#171;switch&#187;, i cili lejon q\u00eb n\u00eb etiketat &#171;case&#187; t\u00eb p\u00ebrdoren jo vlera specifike, por modele fleksib\u00ebl, q\u00eb mbulojn\u00eb nj\u00eb seri vlerash, p\u00ebr t\u00eb cilat m\u00eb par\u00eb duhej t\u00eb p\u00ebrdorej zinxhir\u00eb ekspresionesh &#171;if&#8230;else&#187;.       static String formatterPatternSwitch(Object obj) {         return switch (obj) {             case Integer i -&gt; String.format(&#171;int %d&#187;, i);             case Long l    -&gt; String.format(&#171;long %d&#187;, l);             case Double d  -&gt; String.format(&#171;double %f&#187;, d);             case String s  -&gt; String.format(&#171;String %s&#187;, s);             default        -&gt; o.toString();         };     }\n<li class=\"l\"> U shtua realizimi i dyt\u00eb paraprak i API FFM (Foreign Function &#038; Memory), q\u00eb lejon organizimin e nd\u00ebrveprimit mes programeve Java me kodin dhe t\u00eb dh\u00ebnat e jashtme p\u00ebrmes thirrjes s\u00eb funksioneve nga bibliotekat e jashtme dhe qasjes n\u00eb kujtes\u00ebn jasht\u00eb JVM.\n<li class=\"l\"> E shtuar \u00ebsht\u00eb realizimi i dyt\u00eb i p\u00ebrkohsh\u00ebm i rrjedhave virtuale, t\u00eb cilat jan\u00eb rrjedha t\u00eb lehta q\u00eb thjeshtojn\u00eb ndjesh\u00ebm shkrimin dhe mb\u00ebshtetje e aplikacioneve t\u00eb shum\u00ebfishta me performanc\u00eb t\u00eb lart\u00eb.\n<li class=\"l\"> E shtuar \u00ebsht\u00eb varianti i dyt\u00eb i API eksperimental p\u00ebr paralelizmin e strukturuar, i cili thjeshton zhvillimin e aplikacioneve t\u00eb shum\u00ebfishta duke trajtuar disa detyra t\u00eb kryera n\u00eb rrjedha t\u00eb ndryshme si nj\u00eb bllok t\u00eb vet\u00ebm.\n<li class=\"l\"> E shtuar \u00ebsht\u00eb realizimi i pest\u00eb i p\u00ebrkohsh\u00ebm i API-s\u00eb Vector, e cila ofron funksione p\u00ebr llogaritjet vektoriale q\u00eb kryhen duke p\u00ebrdorur instrukcione vektoriale t\u00eb procesor\u00ebve x86_64 dhe AArch64, duke lejuar q\u00eb operacionet t\u00eb aplikohen nj\u00ebkoh\u00ebsisht n\u00eb shum\u00eb vlera (SIMD). Ndryshe nga mund\u00ebsit\u00eb e avovektorizimit t\u00eb operacioneve skalar\u00eb t\u00eb ofruara nga JIT-kompila HotSpot, API-i ri ofron mund\u00ebsin\u00eb p\u00ebr t\u00eb menaxhuar n\u00eb m\u00ebnyr\u00eb t\u00eb qart\u00eb vektorizimin p\u00ebr p\u00ebrpunimin paralel t\u00eb t\u00eb dh\u00ebnave.   <\/ul>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=58837\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Java SE 20 (Java Platform, Standard Edition 20), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 OpenJDK. \u0417\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432 Java SE 20 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u043f\u0440\u043e\u0448\u043b\u044b\u043c\u0438 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u043c\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b Java &#8212; \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 Java-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u043e\u0434 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-107370","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Java SE 20 (Java Platform, Standard Edition 20), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 OpenJDK.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/news\/vypusk-java-se-20\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412\u044b\u043f\u0443\u0441\u043a Java SE 20 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Java SE 20 (Java Platform, Standard Edition 20), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 OpenJDK.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/news\/vypusk-java-se-20\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-03-21T22:48:09+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-03-22T09:10:35+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Lan\u00e7imi i Java SE 20 | ProHoster","description":"Pasi kaluan gjasht\u00eb muaj zhvillimi, kompania Oracle ka publikuar platform\u00ebn Java SE 20 (Java Platform, Standard Edition 20), p\u00ebr realizimin e s\u00eb cil\u00ebs p\u00ebrdoret projekti i hapur OpenJDK.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/news\/vypusk-java-se-20","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412\u044b\u043f\u0443\u0441\u043a Java SE 20 | ProHoster","og:description":"\u041f\u043e\u0441\u043b\u0435 \u0448\u0435\u0441\u0442\u0438 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Oracle \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Java SE 20 (Java Platform, Standard Edition 20), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 OpenJDK.","og:url":"https:\/\/prohoster.info\/sq\/blog\/news\/vypusk-java-se-20","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2023-03-21T22:48:09+00:00","article:modified_time":"2023-03-22T09:10:35+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/107370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=107370"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/107370\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=107370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=107370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=107370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}