Inguqulelo entsha yeJava SE 18 sele ikhutshiwe kwaye ezi ziindaba zayo

Emva kweenyanga ezintandathu zophuhliso, I-Oracle ikhuphe ukukhutshwa kwe Inguqulelo entsha ye IJava SE 18 (UHlelo oluQhelekileyo), esebenzisa iprojekthi ye-OpenJDK yomthombo ovulekileyo njengokuphunyezwa kwereferensi.

Kule nguqulo entsha yeJava SE 18 iza ngaphandle kwe ukususwa kwezinye iimpawu ezilahlisiweyo, kugcina ukuhambelana ngeenguqulelo zangaphambili zeqonga leJava kwaye uninzi lweeprojekthi ezibhalwe ngaphambili zeJava ziya kuqhubeka nokusebenza zingatshintshanga xa ziqhutywa ngoguqulelo olutsha.

Iimpawu ezintsha eziphambili zeJava SE 18

Kolu kukhutshwa okutsha kweJava SE 18 i-encoding engagqibekanga yi-UTF-8. IJava APIs eqhuba idatha yombhalo ofakwe ngokwekhowudi ngoku izakusebenzisa i-UTF-8 ngokungagqibekanga kuwo onke amaqonga, kungakhathaliseki ukuba isethingi yenkqubo kunye nezicwangciso zengingqi. Ukubuyisela ukuziphatha kwakudala, apho ukufakwa kwekhowudi kukhethwe ngokuthathela ingqalelo indawo yendawo yenkqubo, ungasebenzisa iparameter "-Dfile.encoding=COMPAT".

Olunye utshintsho olubalaseleyo nguye iphinde yayila ukuphunyezwa kwe-java.lang.reflect API (I-Core Reflection), eyenzelwe ukufumana ulwazi malunga neendlela, amasimi kunye nabakhi beeklasi, kunye nokufikelela kwisakhiwo sangaphakathi seeklasi. i api Java.lang.bonisa yona ngokwayo ayitshintshanga, kodwa ngoku iphunyeziwe ngokusebenzisa iziphawuli yeendlela ezibonelelwe yimodyuli java.lang.invoke, endaweni yokusebenzisa iijenereyitha ze-bytecode. Utshintsho luvunyelwe ukumanyanisa kunye nokuququzelela ukugcinwa kokuphunyezwa kwe java.lang.reflect kunye ne-java.lang.invoke.

Ukongeza koku, kukwakhankanywa ukuba ukuphunyezwa kwesithathu kokuqala kweVector API kucetywayo, ebonelela ngemisebenzi yokubala kwe-vector eyenziwa ngokusebenzisa imiyalelo ye-vector ye-x86_64 kunye ne-AArch64 processors kunye nokuvumela ukusebenza ngaxeshanye kumaxabiso amaninzi (SIMD). Ngokungafaniyo nesakhono esinikwe kwi-HotSpot JIT compiler ye-vectorization ezenzekelayo yemisebenzi ye-scalar, i-API entsha. ikuvumela ukuba ulawule ngokucacileyo i-vectorization ukwenzela ukusetyenzwa kwedatha ehambelanayo.

Kuyacaciswa ukuba wongeze ujongano lweSPI (ujongano lomniki wenkonzo) ukusombulula amagama abamkeli kunye needilesi ze-IP, ekuvumela ukuba usebenzise ezinye izisombululi kwi-java.net.InetAddress engabotshelelwanga kubaqhubi ababonelelwe yinkqubo yokusebenza.

Kwelinye icala, kuye kwacetywa uzalisekiso lwesibini lokuqala lweMsebenzi yaNgaphandle kunye neMemori ye-API, apho izicelo zinokusebenzisana nekhowudi kunye nedatha ngaphandle kwexesha lokusebenza kweJava. I-API entsha ivumela ubizo olusebenzayo lwemisebenzi engeyiyo ye-JVM y ukufikelela kwimemori engalawulwa yi-JVM. Ngokomzekelo, unokubiza imisebenzi kwiilayibrari ekwabelwana ngazo zangaphandle kunye nokufikelela kwidatha yenkqubo ngaphandle kokusebenzisa i-JNI.

Yongezwe ukuphunyezwa kovavanyo lwesibini lokulinganisa ipateni kwiintetho tshintsha, ekuvumela ukuba usebenzise itemplates eziguquguqukayo endaweni yamaxabiso achanekileyo "kwimeko" iithegi, ezigquma inani lamaxabiso ngexesha elinye, ebifuna ngaphambili imitya enzima "ukuba...enye" ​​intetho.

Ukupakisha kuqukiwe com.sun.net.httpserver, equka into eluncedo ye-jwebserver kunye ne-API yethala leencwadi ngomiliselo ukusuka kumncedisi we-http olula ukukhonza umxholo we-static (i-CGI kunye nabalawuli abafana ne-servlet abaxhaswanga). Iseva eyakhelwe-ngaphakathi ye-http ayilungiselelwanga umthwalo womsebenzi kwaye ayixhasi ulawulo lofikelelo okanye ukuqinisekiswa, njengoko ijolise ikakhulu kwinkqubo yophuhliso lweprototyping, debugging, kunye neeprojekthi zokuvavanya.

Olunye utshintsho ezibalaseleyo:

  • IJavaDoc ixhasa ithegi "@isiqwenga»ukuzinzisa imizekelo esebenzayo kunye neziqwengana zekhowudi kuxwebhu lwe-API, ezinokufikelelwa ngezixhobo zokuqinisekisa, ukuqaqambisa isintaksi, kunye nokudityaniswa kwe-IDE.
  • Ithotywe kwaye iya kususwa ekukhutshweni kwexesha elizayo, indlela yokugqiba, kunye neendlela ezinxulumene nazo ezifana Object.finalize(), Enum.finalize(), Runtime.runFinalization(), kunye System.runFinalization().
  • abaqokeleli benkunkuma I-ZGC (i-Z yoMqokeleli weNkunkuma), i-SerialGC kunye ne-ParallelGC baxhasa ukunqunyulwa kweentambo.

IJava SE 18 ihlelwa njengokukhutshwa kwenkxaso rhoqo, kunye nohlaziyo oluza kukhutshwa ngaphambi koguqulelo olulandelayo. Isebe lenkxaso yexesha elide (LTS) kufuneka libe yiJava SE 17, eya kufumana uhlaziyo kude kube ngu-2029.

Kubalulekile ukukhumbula ukuba ukuqala ngokukhululwa kwe-Java 10, iprojekthi yatshintshela kwinkqubo entsha yophuhliso, oku kuthetha umjikelo omfutshane wokwenziwa kokukhululwa okutsha. Umsebenzi omtsha ngoku uyaphuhliswa kwisebe eliphambili elihlala lihlaziywa, eliquka utshintsho esele lugqityiwe namasebe aphuma rhoqo emva kweenyanga ezintandathu ukuze kuzinziswe ukukhutshwa okutsha.

Fumana iJava SE 18

Kwabo banomdla wokukwazi ukuvavanya olu khupho lutsha, nceda wazi ukuba ulwakhiwo lulungele iLinux (x86_64, AArch64), Windows (x86_64), kunye ne-macOS (x86_64, AArch64) kwaye inokufumaneka. kwikhonkco elingezantsi.


Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Yiba ngowokuqala ukuphawula

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa.

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.