<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5262794852276216895</id><updated>2026-09-09T08:03:24.265+02:00</updated><category term="java"/><category term="Android"/><category term="Nokia"/><category term="SDK"/><category term="Android 2.2"/><category term="BadaOS"/><category term="Froyo"/><category term="GT-I8320"/><category term="Google"/><category term="JDK7"/><category term="Java Flight Recorder"/><category term="Java Monitoring"/><category term="Jigsaw"/><category term="LiMo"/><category term="Linux"/><category term="MeeGo"/><category term="Microsoft"/><category term="Nürburgring"/><category term="OpenJDK"/><category term="Oracle"/><category term="Samsung H1"/><category term="WAC"/><category term="Windows Mobile"/><category term="Windows Phone"/><category term="eclipse"/><category term="eclipse mars"/><category term="font rendering"/><category term="gentoo"/><category term="jcmd"/><category term="lemans"/><category term="mobile operating system"/><category term="nio2"/><category term="opensource"/><category term="race"/><category term="rozprawa sądowa"/><category term="tizen"/><category term="wyścig"/><title type='text'>http://adnotacja.blogspot.com</title><subtitle type='html'>adnotacja, uwaga, dopisek, przypis, notatka&lt;br&gt;&#xa;w sprawach&lt;br&gt;&#xa;telefon, programowanie, java, android, i takie tam ;)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-8371867527054702215</id><published>2020-08-27T10:46:00.003+02:00</published><updated>2020-08-27T10:46:31.956+02:00</updated><title type='text'>Być albo nie być; oto jest pytanie</title><content type='html'>Java 8 wprowadziła Optional&amp;lt;&amp;gt;, który to możemy używać do zwracania odpowiedzi które są lub ich brak.
Java, a dokładniej JDK, ma przyjemny zbiór zasad w nazewnictwie. I tak z JavaBeans wprowadzono ujednolicone nazewnictwo dla metod dostępowych:&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;div&gt;setXXX()/getXXX()/isXXX().&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To szalenie ułatwia czytanie programów a to cel niezwykle ważny!
No dobrze, a czy mamy konwencję dla opcjonalnych powrotów? Jeszcze nie.&lt;/div&gt;&lt;div&gt;Moja propozycja, którą stosuję to &quot;maybe&quot;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;

Optional&amp;lt;String&amp;gt;&lt;string&gt; maybeSecondName() {&amp;nbsp;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;&amp;nbsp; &amp;nbsp;return Optional.ofNullable(this.secondName);&amp;nbsp;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;}&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;&lt;br /&gt;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;Osobiście, nie lubię wszędobylskiego set/get i stosuję je tylko dla metod dostępowych do pól klasy, metod bez logiki.
  Dla takich lekkich metod lubię używać:&amp;nbsp;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;&amp;nbsp;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;grab,&amp;nbsp; &amp;nbsp;obtain,&amp;nbsp; &amp;nbsp;receive.&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;&lt;br /&gt;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;Oczywiście klasy, które robią coś cięższego to&amp;nbsp;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;&lt;br /&gt;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;&amp;nbsp;calculate, i temu podobne nazwy odzwierciedlające co się dzieje w metodzie&lt;/string&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;string&gt;&lt;br /&gt;&lt;/string&gt;&lt;/div&gt;&lt;div&gt;Nazywanie metod na wzór metod dostępowych daje nam nieoceniony zysk w framework-ach do wszelkich mapowań. Ale czy warto tym zaśmiecać swój własny model domenowy?&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/8371867527054702215/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/8371867527054702215' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8371867527054702215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8371867527054702215'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2020/08/byc-albo-nie-byc-oto-jest-pytanie.html' title='Być albo nie być; oto jest pytanie'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-3741514831278805751</id><published>2020-05-23T12:01:00.004+02:00</published><updated>2020-05-23T12:01:51.115+02:00</updated><title type='text'>Java ma już 25 lat!</title><content type='html'>Java ma już 25 lat!&lt;br /&gt;
&lt;br /&gt;
Moja przygoda z platformą Java zaczęła się od PCKuriera - tygodnika od Wydawnictwa Lupus. Niestety, nie mam już tej historycznej gazety. Był tam opisany przykład obrazujący jak łatwo zrobić połączenie pomiędzy dwoma komputerami. Zrobiło to dla mnie wielkie wrażenie. Dlaczego? W roku 1995 to było coś. Miałem wówczas Amigę. Wróciłem do niej po przygodzie z PC, gdzie programowanie w systemie było masakrą w porównaniu do AmigaOS i jej bibliotek jak intuition, do, exec, itp.. Amiga jednak nie posiadała stosu TCP/IP. Stąd moje zainteresowanie. Niestety, na Amigę Java nie mogła być wypuszczona z powodu braku &quot;fork()&quot; w jądrze AmigaOS. &lt;br /&gt;
Wspomniany PCKurier zawierał program do połączenia dwóch komputerów za pomocą paru linijek programu. Przepisałem go na uczelni. Oczywiście zadziałało.&lt;br /&gt;
Zacząłem wchodzić w to środowisko i od razu mi się spodobało. Całe środowisko - wręcz kompletne. Tak jak na AmigaOS. To było coś dla mnie.&lt;br /&gt;
Jakie miałem doświadczenie przed językiem Java? Basic, C, C++, AmigaE. </content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/3741514831278805751/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/3741514831278805751' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/3741514831278805751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/3741514831278805751'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2020/05/java-ma-juz-25-lat.html' title='Java ma już 25 lat!'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-8431945073187151800</id><published>2019-07-25T16:25:00.000+02:00</published><updated>2019-07-25T16:25:14.985+02:00</updated><title type='text'>schema.sql i spring-boot 2.0</title><content type='html'>W spring-boot 1.5 wystarczyło umieścić plik schema.sql w wynikowym pliku jar. W projekcie zwyczajowo w katalogu resources.&lt;br /&gt;
Jednak po wejściu spring-boot 2.0 zmieniło się to.&lt;br /&gt;
Aby odpalić taki plik schema.sql&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;CREATE SCHEMA IF NOT EXISTS schemacik&lt;/blockquote&gt;&lt;br /&gt;
należy nastawić jeszcze przełącznik:&lt;br /&gt;
&lt;blockquote&gt;spring.datasource.initialization-mode=always&lt;/blockquote&gt;Domyślnie skrypt jest odpalany dla bazy danych typu wbudowanego embedded jak H2</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/8431945073187151800/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/8431945073187151800' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8431945073187151800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8431945073187151800'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2019/07/schemasql-i-spring-boot-20.html' title='schema.sql i spring-boot 2.0'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-979575741608401619</id><published>2018-03-20T08:04:00.002+01:00</published><updated>2018-03-20T08:04:51.532+01:00</updated><title type='text'>JDK 10 / 18.3 i skrócona deklaracja var</title><content type='html'>JDK 10, czy też zwana inaczej - Java 18.3 wprowadza niewiele
zmian, jeśli porównamy je do poprzednich wersji. Jednak Java 18.3
jest już z nowego cyklu wydawniczego, którego częstością jest
stałe pół roku. Kolejne wydanie będzie jako 18.10 i pojawi się w
październiku.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__651_955444815&quot;&gt;&lt;/a&gt;Główną nowością jest
kolejna rezygnacja z barokowości składni języka.&lt;br /&gt;
Java 7 wprowadziła dla generycznych kolekcji możliwość
rezygnacji z deklaracji typu przy tworzeniu obiektu, np. 
&lt;br /&gt;
zamiast:&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;List&lt;string&gt; staraLista = &lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;LinkedList&lt;string&gt;();&lt;/string&gt;&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
możemy zrezygnować z typu dla listy w konstruktorze:&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;List&lt;string&gt; obecnaLista = &lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;LinkedList&amp;lt;&amp;gt;();&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
a nowością jest ponowne określanie typu po prawej stronie na rzecz
rezygnacji z niwgo po lewej stronie:&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff; margin-bottom: 0.5cm;&quot;&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__1174_862889588&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;nowaLista = &lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;LinkedList&lt;string&gt;();&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
Tak skrócona forma nie może być sosowane w dowolnym miejscu. 
&lt;br /&gt;
Ujmując to krótko: &lt;b&gt;var tylko dla zmiennych lokalnych i dla
typów bezpośrednio wyznaczalnych na podstawie przypisania.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
No dobrze, czym jest var? Nie jest słowem kluczowym języka Java.
Jest to identyfikator o specjalnym znaczeniu dla typów lokalnych
zmiennych.&lt;br /&gt;
Jednak w plikach źródłowych nie możemy wprowadzić ani użyć
klas o nazwie &lt;b&gt;var&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;. Jeśli
posiadamy na classpath-ie klasę o nazwie var (skompilowaną przez
JDK &amp;lt; 10) to ciągle można jej użyć ale za pomocą reflekcji:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;public class &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;var {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;    &lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;public &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;String metoda() {&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;        &lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;return &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;&quot;metoda&quot;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;    &lt;span style=&quot;font-family: Menlo;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Class varClass = Class.&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;forName&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;b&gt;&quot;var&quot;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;Object o = varClass.newInstance();&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;System.&lt;span style=&quot;color: #660e7a;&quot;&gt;&lt;i&gt;&lt;b&gt;out&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;.println(&lt;span style=&quot;color: green;&quot;&gt;&lt;b&gt;&quot;rezultat = &quot; &lt;/b&gt;&lt;/span&gt;+ varClass.getMethod(&lt;span style=&quot;color: green;&quot;&gt;&lt;b&gt;&quot;metoda&quot;&lt;/b&gt;&lt;/span&gt;).invoke(o));&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
No dobrze, jakie ograniczenie posiada var przy deklaracji?&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Nie może być
 wielokrotnych deklaracji pod jenym var&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var
 &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;n
 = &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;,
 m = &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;;
 // błąd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;

 &lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Nie może być tablicą&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var
 &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;tablica[]
 = &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;new
 int&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;[&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;];
 // błąd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;

 &lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Musi być inicjalizacja&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var
 a;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;
 // błąd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;

 &lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;inicjalizacja nie może
 wykorzystywać definiowanej zmiennej (Czy ktoś tak koduje?)&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var
 &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;g
 = (g = &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;);
 // błąd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;

 &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__662_955444815&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__664_955444815&quot;&gt;&lt;/a&gt;
 &lt;span style=&quot;font-weight: normal;&quot;&gt;Nie może być inicjalizowana
 brakiem wartości – null&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var
 nic&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;
 = &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;null&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;;
 // błąd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;

 &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__668_955444815&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__670_955444815&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__666_955444815&quot;&gt;&lt;/a&gt;
 &lt;span style=&quot;font-weight: normal;&quot;&gt;Lambda bez konteksu, bez
 wyznaczonego typu również niedozwolona&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var
 &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;f
 = () -&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;&quot;hello&quot;;
 &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;//
 błąd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;&lt;b&gt;var
 &lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;f1&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;&lt;b&gt;
 = (Supplier&lt;string&gt;)&lt;/string&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;()
 -&amp;gt; &lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;&lt;b&gt;&quot;hello&quot;;
 &lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;//
 OK&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Przy definiowaniu lokalnych
zmiennych za pomocą &lt;/span&gt;&lt;b&gt;var&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;
musimy przypisać typem, który jest bezpośrednio wyznaczalny przez
kompilator&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__672_955444815&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;a = &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;;                &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;// a ma typ int&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;b = java.util.List.&lt;i&gt;of&lt;/i&gt;(&lt;span style=&quot;color: blue;&quot;&gt;1&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;2&lt;/span&gt;);  &lt;span style=&quot;color: grey;&quot;&gt;&lt;i&gt;// b ma typ List&lt;integer&gt;&lt;/integer&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;c = &lt;span style=&quot;color: green;&quot;&gt;&lt;b&gt;&quot;x&quot;&lt;/b&gt;&lt;/span&gt;.getClass();   &lt;span style=&quot;color: grey;&quot;&gt;&lt;i&gt;// c ma typ Class&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;d = &lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;Object() {};  &lt;span style=&quot;color: grey;&quot;&gt;&lt;i&gt;// d ma typ klasy anonimowej&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;e = (CharSequence &amp;amp; Comparable&lt;string&gt;) &lt;span style=&quot;color: green;&quot;&gt;&lt;b&gt;&quot;x&quot;&lt;/b&gt;&lt;/span&gt;; &lt;span style=&quot;color: grey;&quot;&gt;&lt;i&gt;// e ma typ CharSequence &amp;amp; Comparable&lt;string&gt;&lt;/string&gt;&lt;/i&gt;&lt;/span&gt;&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__674_955444815&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;final var JEDEN&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Jak widać dla zmiennej e również jest akceptowany typ skrośny,
brrrr. 
&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Inne brzydkie kawałki kodu również
są ;)&lt;/div&gt;
&lt;pre style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;n = (Comparable) &lt;span style=&quot;color: blue;&quot;&gt;5&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;// dużo linijek kodu&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;n = &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;&quot;niespodzianka&quot;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Zmienne lokalne również mogą być finalnymi.&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Jak widać jest trochę
ograniczeń. Jednak kolejne miejsca, gdzie dozwolone jest użycie
uproszczone deklaracji zmiennej &lt;/span&gt;&lt;b&gt;var&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;
to pętle i bloki try.  Zamiast tak archaicznych konstrukcji:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Vector&lt;string&gt; v = &lt;/string&gt;&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Vector&amp;lt;&amp;gt;();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;for &lt;/b&gt;&lt;/span&gt;(Enumeration&lt;string&gt; e = v.elements(); e.hasMoreElements();) {&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;    &lt;span style=&quot;font-family: Menlo;&quot;&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #660e7a;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;&lt;b&gt;out&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;.println(e.nextElement());&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Możemy użyć:&lt;/div&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;for &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;e = v.elements(); e.hasMoreElements();) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;    &lt;span style=&quot;font-family: Menlo;&quot;&gt;System.&lt;/span&gt;&lt;span style=&quot;color: #660e7a;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;&lt;b&gt;out&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;.println(e.nextElement());&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Zamiast przydługich linijek typu&lt;/div&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;try &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;(ByteArrayOutputStream baos = &lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;ByteArrayOutputStream();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;     &lt;span style=&quot;font-family: Menlo;&quot;&gt;OutputStreamWriter osw = &lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;OutputStreamWriter(baos);&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;     &lt;span style=&quot;font-family: Menlo;&quot;&gt;BufferedWriter bw = &lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;BufferedWriter(osw);) {&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;    &lt;span style=&quot;color: grey;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;i&gt;//..&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;} &lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;catch &lt;/b&gt;&lt;/span&gt;(IOException e) {&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;    &lt;span style=&quot;font-family: Menlo;&quot;&gt;e.printStackTrace();&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Uzyskujemy kod, który najdobitniej
pokazuje piękno użycia skrótowca &lt;/span&gt;&lt;b&gt;var&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;try &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;baos = &lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;ByteArrayOutputStream();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;     &lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;osw = &lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;OutputStreamWriter(baos);&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;     &lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;bw = &lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;BufferedWriter(osw);) {&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-weight: normal;&quot;&gt;Asekurując się nadmienię, że
nie powinniśmy używać konstrukcji językowych z mnóstwem
przypisań, linia po linii i martwić się wyrównywaniem kodu by
było ładnie. Powinniśmy używać techniki clean code i eliminować
takie nadużycia. Jednak skrótowiec &lt;/span&gt;&lt;b&gt;var&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;
pozwala ładnie wyrównywać przypisania. Definiując zmienne lokalne
możemy przenosić typ generyczny z lewej na prawą i odwrotnie&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;var &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;zestaw1 = &lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;HashSet&lt;string&gt;();&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;Set&lt;string&gt; zestaw2 = &lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;HashSet&amp;lt;&amp;gt;();&lt;/string&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Skrócona wersja deklaracji zmiennej lokalnej jest niewielkim
rozszerzeniem języka Java. Działa to tylko w przestrzeni
kompilatora i żadna zmiana po stronie JVMa nie była konieczna.
Skompilowany kod z plikiem *.java do pliku *.class będzie
identycznym jak i pry deklaracji bez skróconej deklaracji var.&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
CzaPy (Często Zadawane Pytania)&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;
Czy język java przystaje być
 statycznie typowany?&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Oczywiście, że nie. Zmiana jest
 tylko skróconą wersją deklaracji jednoznacznego typu.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;
Czy do inicjowania może być
 użyta referencja metody?&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Tak jak i w przypadku lambda, takie
 przypisanie nie jest dozwolone.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;
Czy wzrasta czytelności kodu?&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
To zależy. Jeśli przypisaniem jest
 prosta inicjalizacja, np. listą jak &lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;var
 &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;l = &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;&lt;b&gt;new
 &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Menlo;&quot;&gt;LinkedList&lt;string&gt;()
 &lt;/string&gt;&lt;/span&gt;&lt;/span&gt;to jest czytelniej. Jeśli przypiszemy wynik z
 długiego ciągu przetwarzań strumienia, ciężko będzie zgadnąć
 jaki jest typ wyniku jeśli nazwa nie będzie zdradzać typu. Dla
 zwolenników kolumnowego wyrównywania kodu, jak w assemblerze czy
 Pascal-u, var stanie się objawieniem. 
 &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;__DdeLink__1176_862889588&quot;&gt;&lt;/a&gt;
 Dlaczego skrócone deklaracje nie są dozwolone jako pola klasy?&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Twórcy nie chcieli rozszerzać
 kontekstu użycia dla poprawienia czytelności – rozpoznawalności
 przypisanego typu, możliwość modyfikowania spoza klasy, zmiana
 typu, itp. A definicje publiczne są kontraktem, którego nie można
 zmieniać&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;
Dlaczego skrócone deklaracje nie
 są dozwolone jako pola klasy o zawężonym zasięgu do private?&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
Pomimo, że powyższe argumenty nie
 mają, twórcy języka nie chcieli wprowadzać takiego rozróżnienia
 i dla przejżystości private fields również nie są dozwolone dla
 skróconych deklaracji poprzez var.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;
Dlaczego nie ma skróconej
 deklaracji &lt;b&gt;val&lt;/b&gt; dla &lt;b&gt;final var&lt;/b&gt;?&lt;/div&gt;
&lt;div style=&quot;font-weight: normal;&quot;&gt;
W kodzie języka Java programiści
 bardzo rzadko używają słówka final a kompilator jest na tyle
 zmyślny, że jak wykryje zmienną z jednokrotnym przypisaniem, to i
 tak ją traktuje jako final. Oczywiście można ręcznie wprowadzić
 zmienną jako stałą ;) - &lt;b&gt;final var&lt;/b&gt;;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;style type=&quot;text/css&quot;&gt;
 &lt;!--
  @page { size: 21cm 29.7cm; margin: 2cm }
  P { margin-bottom: 0.21cm }
  PRE { font-family: &quot;Courier New&quot;, monospace; font-size: 10pt }
 --&gt;
 &lt;/style&gt;































&lt;br /&gt;
To by było na tyle. Dziś jest oficjalna data wejścia JDK 10, więc jest powód do małego świętowania.&lt;br /&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/979575741608401619/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/979575741608401619' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/979575741608401619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/979575741608401619'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2018/03/jdk-10-183-i-skrocona-deklaracja-var.html' title='JDK 10 / 18.3 i skrócona deklaracja var'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-3817449303079387026</id><published>2018-03-19T07:09:00.001+01:00</published><updated>2018-03-19T08:04:27.145+01:00</updated><title type='text'>Java 9 Flow, REPL, itp. Kodowanie na żywo, teoria.</title><content type='html'>Poprzedni wpis&amp;nbsp;traktował o Jigsaw, czyli systemie modułów dla języka Java.&lt;br /&gt;
Poniższe nagranie poświęcone zostało innym ważnym elementom języka Java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/7JMVVXbTgEQ&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/3817449303079387026/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/3817449303079387026' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/3817449303079387026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/3817449303079387026'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2018/03/java-9-flow-repl-itp-kodowanie-na-zywo.html' title='Java 9 Flow, REPL, itp. Kodowanie na żywo, teoria.'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/7JMVVXbTgEQ/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-1014027375837419072</id><published>2018-03-19T07:05:00.001+01:00</published><updated>2018-03-19T08:03:55.842+01:00</updated><title type='text'>Java 9 JPMS Jigsaw. Kodowanie na żywo, teoria.</title><content type='html'>Java JDK 9 przyniosło ogromnie dużo zmian a w szczególności w warstwie budowania.&lt;br /&gt;
Jest to projekt Jigsaw. Jednak to nie wszystkie nowości.&lt;br /&gt;
&lt;div&gt;
Poniżej materiał wprowadzający o nowościach do Jezyka Java w wersji 9.&lt;/div&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/PCih2leR9Ek&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/1014027375837419072/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/1014027375837419072' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/1014027375837419072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/1014027375837419072'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2018/03/java-9-jpms-jigsaw-kodowanie-na-zywo.html' title='Java 9 JPMS Jigsaw. Kodowanie na żywo, teoria.'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/PCih2leR9Ek/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-8674367414935676986</id><published>2018-03-01T07:40:00.000+01:00</published><updated>2018-03-01T07:40:21.137+01:00</updated><title type='text'>remove (int pos)</title><content type='html'>&lt;div dir=&quot;ltr&quot; id=&quot;docs-internal-guid-5e9d86c8-e004-ff37-b7bb-99deb0274b48&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Język Java jak i JVM postanowiło wziąć byka za rogi z tematem klas generycznych z prymitywnymi elementami.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Na stronie &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;a href=&quot;http://openjdk.java.net/jeps/218&quot; style=&quot;text-decoration-line: none;&quot;&gt;&lt;span style=&quot;color: #1155cc; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;http://openjdk.java.net/jeps/218&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;można znaleźć wiele aspektów tej arcytrudnej sprawie. Mnie niezwykle ciekawi poniższy:&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;“Reference-primitive overloadings. Some overloadings that are valid today would become problematic under specialization. For example, a List-like class that overloaded remove(int) with remove(T) is reasonable when T is restricted to reference types, but problematic if T can be int.”&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Gdyby takich metod (remove(int)) nie było a w zamian mielibyśmy bardziej ornamentowe (removeAt(int)) nie byłoby problemów. &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Java rozwijając się wprowadzała różne sposoby rozwiązujące napotkane przeszkody. Mamy takie rozwiązania jak metody &lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; umożliwiające dodanie zachowań do klas nie rujnując kompatybilności obiektów. I to jest dobre. Mamy również i czarną stronę &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;public static &lt;t amp=&quot;&quot; comparable=&quot;&quot; extends=&quot;&quot; object=&quot;&quot; super=&quot;&quot; t=&quot;&quot;&gt;&amp;gt; T max(Collection coll)&lt;/t&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br class=&quot;kix-line-break&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;możliwość zwrócenia różnych typów! Nie używać. &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Jak będzie w przypadku remove(int)? Czas pokaże. Java chce mieć typy wartości - i jak się one pojawią to będzie niezwykle ciężko utrzymać rosnące stadko specjalizacji jak IntStream&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/8674367414935676986/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/8674367414935676986' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8674367414935676986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8674367414935676986'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2018/03/remove-int-pos.html' title='remove (int pos)'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-4593457970712433866</id><published>2018-02-28T07:35:00.000+01:00</published><updated>2018-02-28T16:38:05.128+01:00</updated><title type='text'>Jakarta EE</title><content type='html'>&lt;div dir=&quot;ltr&quot; id=&quot;docs-internal-guid-5e9d86c8-db1b-e39e-ed1a-3443ea88b6a9&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Dżakarta&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8W__4KVskjWEthNOhNH9CWsiazqhzcQeD-Z0G9WMa1K5qh4fcEO_HmjzbaFWg4J8sVptHjC21ltpuSuOVoqp77nMZlXMWQi3juSwi7XHsdBbUSfptdWwfqlzEyNDp-HQr4GeCOzqCLl4/s1600/Screenshot_2018-02-27-20-09-14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;900&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8W__4KVskjWEthNOhNH9CWsiazqhzcQeD-Z0G9WMa1K5qh4fcEO_HmjzbaFWg4J8sVptHjC21ltpuSuOVoqp77nMZlXMWQi3juSwi7XHsdBbUSfptdWwfqlzEyNDp-HQr4GeCOzqCLl4/s320/Screenshot_2018-02-27-20-09-14.png&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Jakarta EE jest nową nazwą dla uwolnionej przez Oracle platformy Java EE.&lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Na pierwszy rzut oka - słabo. Jednak należało się pozbyć nazwy towarowej Java należącej do Oracle. Dalej, “Dżakarta (ind. Jakarta) – stolica Indonezji, w północno-zachodniej części Jawy, druga aglomeracja świata z 31 760 000 mieszkańców” za Wikipedią. &lt;/span&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Dalej, wymowa w języku polskim nie będzie stanowić problemu tak jak to mamy w przypadku Java-y.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot;; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Zostaje nam czekać, jak się rozwinie Jakarta EE we władaniu społeczności a poza przewodnictwem Oracle.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/4593457970712433866/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/4593457970712433866' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/4593457970712433866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/4593457970712433866'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2018/02/jakarta-ee.html' title='Jakarta EE'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8W__4KVskjWEthNOhNH9CWsiazqhzcQeD-Z0G9WMa1K5qh4fcEO_HmjzbaFWg4J8sVptHjC21ltpuSuOVoqp77nMZlXMWQi3juSwi7XHsdBbUSfptdWwfqlzEyNDp-HQr4GeCOzqCLl4/s72-c/Screenshot_2018-02-27-20-09-14.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-3938558896641144142</id><published>2018-02-12T14:05:00.002+01:00</published><updated>2019-11-05T11:52:14.126+01:00</updated><title type='text'>Kłódki dla klas w Intellij</title><content type='html'>By mieć taki staromodny widok z kłódeczkami w Intellij&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu72GxmjolR5SFkIWanVilXXxnZMGUqqBMopGNHW5dm0JlDQjRiuMd7hZ8W9kCZJXpSQkdaGKwceidJFPDV3ta4r7bVTEZJxnOcl_Zr2WYkhPPIdViGUdy8HRx1HRgvSSEKXUrlbF9oLU/s1600/intellij-projectView.show.visibility.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;207&quot; data-original-width=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu72GxmjolR5SFkIWanVilXXxnZMGUqqBMopGNHW5dm0JlDQjRiuMd7hZ8W9kCZJXpSQkdaGKwceidJFPDV3ta4r7bVTEZJxnOcl_Zr2WYkhPPIdViGUdy8HRx1HRgvSSEKXUrlbF9oLU/s1600/intellij-projectView.show.visibility.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Należy wybrć menu Help -&amp;gt; Edit Custom VM Options...&lt;br /&gt;
następnie dodać wpis:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Roboto Mono Light for Powerline&#39;; font-size: 9,0pt;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Roboto Mono Light for Powerline&#39;; font-size: 9,0pt;&quot;&gt;-Dide.projectView.show.visibility=true&lt;/pre&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Roboto Mono Light for Powerline&#39;; font-size: 9,0pt;&quot;&gt;&lt;/pre&gt;&lt;br /&gt;
I restart.</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/3938558896641144142/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/3938558896641144142' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/3938558896641144142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/3938558896641144142'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2018/02/kudki-dla-klas-w-intellij.html' title='Kłódki dla klas w Intellij'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu72GxmjolR5SFkIWanVilXXxnZMGUqqBMopGNHW5dm0JlDQjRiuMd7hZ8W9kCZJXpSQkdaGKwceidJFPDV3ta4r7bVTEZJxnOcl_Zr2WYkhPPIdViGUdy8HRx1HRgvSSEKXUrlbF9oLU/s72-c/intellij-projectView.show.visibility.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-7364516414321763856</id><published>2016-07-17T20:43:00.000+02:00</published><updated>2016-07-17T20:43:45.311+02:00</updated><title type='text'>Confitura 2016 i moje trzy grosze... pytania</title><content type='html'>Confitura była i się skończyła&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/GG0vU7StXFs/0.jpg&quot; src=&quot;https://www.youtube.com/embed/GG0vU7StXFs?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
Pozwoliłem sobie&amp;nbsp;zadać trzy&amp;nbsp;pytanka:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Czy można w śrowowisku JavaEE 7 używać strumieni równoległych dostępnych w Java 8?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Nie&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Czy implementacja planów ładowania encji z Entity Graph jest już na tyle gotowe aby móc ich używać w środowisku produkcyjnym?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Tak&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Czy AliPay przechowuje u siebie mój kod CVV2?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Tak&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div&gt;
Szersze odpowiedzi, z uwzględnieniem adekwatnego przykłądu w kodzie, postaram się się umieścić w kolejnych wpisach. Może poza kodem w tym trzecim zagadnieniu ;)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/7364516414321763856/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/7364516414321763856' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7364516414321763856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7364516414321763856'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2016/07/confitura-2016-i-moje-trzy-grosze.html' title='Confitura 2016 i moje trzy grosze... pytania'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/GG0vU7StXFs/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-2426139742947911461</id><published>2015-10-28T08:35:00.001+01:00</published><updated>2015-10-28T08:35:39.865+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse mars"/><category scheme="http://www.blogger.com/atom/ns#" term="font rendering"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Nowy Eclipse - Mars - i problem z czcionkami pod GTK 3</title><content type='html'>Problem rysowania czcionek za pomocą GTK+ 3 w Eclipse 4.5 Mars ciągle występuje&lt;br /&gt;
&lt;a href=&quot;https://bugs.eclipse.org/bugs/show_bug.cgi?id=472416&quot;&gt;Bug 472416 - [GTK3] text is garbled when scrolling &lt;/a&gt;&lt;br /&gt;
Proste rozwiązanie to przełączenie się na GTK+ 2, poprzez dodanie do konfiguracji eclipse.ini parametru&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;--launcher.GTK_version&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;2&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
A wygląda to mniej więcej tak:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQtK2WqJkqj6D694RXgrk7yu6DY0L2ZoChuMOiVzlkQPmc1_9BWE8Jk0sG9kdDVaAjGFPFGM1ns4R3v0MgdHwtN3VE1AcboDrU8weWDUU7J93hyXeSw5qpZTufkKzcHjNObqSGQ0LubHo/s1600/zrzut+ekranu33.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQtK2WqJkqj6D694RXgrk7yu6DY0L2ZoChuMOiVzlkQPmc1_9BWE8Jk0sG9kdDVaAjGFPFGM1ns4R3v0MgdHwtN3VE1AcboDrU8weWDUU7J93hyXeSw5qpZTufkKzcHjNObqSGQ0LubHo/s320/zrzut+ekranu33.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/2426139742947911461/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/2426139742947911461' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/2426139742947911461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/2426139742947911461'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2015/10/nowy-eclipse-mars-i-problem-z.html' title='Nowy Eclipse - Mars - i problem z czcionkami pod GTK 3'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQtK2WqJkqj6D694RXgrk7yu6DY0L2ZoChuMOiVzlkQPmc1_9BWE8Jk0sG9kdDVaAjGFPFGM1ns4R3v0MgdHwtN3VE1AcboDrU8weWDUU7J93hyXeSw5qpZTufkKzcHjNObqSGQ0LubHo/s72-c/zrzut+ekranu33.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-1869241057881068780</id><published>2015-10-22T08:21:00.000+02:00</published><updated>2015-10-22T08:22:43.678+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Flight Recorder"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Monitoring"/><category scheme="http://www.blogger.com/atom/ns#" term="jcmd"/><title type='text'>Java Flight Recorder + CLI</title><content type='html'>Jak pobrać próbę z wykonywanego procesu Java w celu późniejszego wczytania do Java Flight Recorder?&lt;br /&gt;
Można wykorzystać jcmd, który wywoła jmc&lt;br /&gt;
Przykład:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: black; color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;$ java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -jar /home/m1k0/Pobrane/javaConcurrentAnimated.jar&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: lime; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: lime; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$ /home/m1k0/.gentoo/java-config-2/current-user-vm/bin/jcmd&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: black; color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;23441 /home/m1k0/Pobrane/javaConcurrentAnimated.jar&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: lime; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: lime; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;$ /home/m1k0/.gentoo/java-config-2/current-user-vm/bin/jcmd 23441 JFR.start duration=5s filename=/tmp/23441.jfr&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: black; color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;23441:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: black; color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;Started recording 10. The result will be written to:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: lime; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: lime; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/tmp/23441.jfr&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: black;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
Plik /tmp/23441.jfr po pięciu sekundach jest gotowy do otworzenia w Java Flight Recorder.</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/1869241057881068780/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/1869241057881068780' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/1869241057881068780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/1869241057881068780'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2015/10/java-flight-recorder-cli.html' title='Java Flight Recorder + CLI'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-606010120396223357</id><published>2014-12-13T12:03:00.001+01:00</published><updated>2014-12-13T12:03:37.037+01:00</updated><title type='text'>Netbeans a przewijanie dwoma palcami</title><content type='html'>Często mi to umyka a wraca jak bumerang po odpięciu myszy od laptopa.&lt;br /&gt;
Netbeans, a w ogólności aplikacje Java, niewłaściwie obsługują przewijanie. Dokładniej, nie wiedzą co zrobić z przewijaniem horyzontalnym. W Netbeans wyzwalane jest podręczne menu (co jest dość irytującym).&lt;br /&gt;
&lt;br /&gt;
Rozwiązania brak ale jest obejście.&lt;br /&gt;
Należy bardzo precyzyjnie przesuwać palce po &quot;touchpad-dzie&quot; by nie wyzwolić zdarzenia przesuwania na bok. Ot, żarcik taki.&lt;br /&gt;
&lt;br /&gt;
Należy wpisać prostą komendę&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;synclient HorizTwoFingerScroll=0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/606010120396223357/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/606010120396223357' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/606010120396223357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/606010120396223357'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2014/12/netbeans-przewijanie-dwoma-palcami.html' title='Netbeans a przewijanie dwoma palcami'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-7613408830382354375</id><published>2013-12-23T23:06:00.004+01:00</published><updated>2013-12-26T12:06:14.408+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gentoo"/><category scheme="http://www.blogger.com/atom/ns#" term="SDK"/><category scheme="http://www.blogger.com/atom/ns#" term="tizen"/><title type='text'>TizenSDK na Gentoo</title><content type='html'>Nie ma standardowego instalatora Tizen SDK dla Gentoo ale obecna wersja SDK 2.2.1 jest całkiem przyjemna w instalacji nawet dla Gentoo Linux.&lt;br /&gt;
&lt;br /&gt;
Moja porcja uzupełnień systemu to:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;emerge -av&amp;nbsp;sys-apps/lsb-release&lt;/li&gt;
&lt;li&gt;emerge -av&amp;nbsp;app-emulation/qemu&lt;/li&gt;
&lt;li&gt;emerge -av --autounmask-write =app-emulation/qemu-user-1.4.0&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
U mnie wersja stabilna była wybredna ale wersja 1.4.0 pozwoliła ujrzeć &quot;Success&quot;&lt;/div&gt;
&lt;div&gt;
Dzięki powyższym uzupełnieniom instalacja TizenSDK 2.2.1 przebiegła pomyślnie. Jedna nie udało się odpalić emulatora (czy symyulatora) telefonu.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Pomocny plik logu&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
/home/m1k0/Programy/tizen-sdk-data/emulator-vms/vms/emulator-manager.log&lt;/div&gt;
&lt;div&gt;
wskazywał jednak na braki w bibliotekach&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Dla naszego Gentoo wystarczyło podłączyć wymagane biblioteki do naszych z Gentoo&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl-gnutls.so.4&lt;/li&gt;
&lt;li&gt;ln -s libncurses.so.5 libtinfo.so.5&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Okazuje się jeszcze, że qemu dostarczony w pakiecie Tizen SDK nie chce wystartować. Niezbyt ładnym rozwiązaniem jest użycie systemowego qemu&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;mv qemu-img qemu-img-old&lt;/li&gt;
&lt;li&gt;ln -s /usr/bin/qemu-img &amp;nbsp;/home/m1k0/Programy/tizen-sdk/tools/emulator/bin/qemu-img&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
To wystarczy by również emulator wystartował&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigeRTw8YvKBkS6tMT154Sk4QwxQALiXQA2-D_qJZSzwMlxKXNpYnrqZlT1LcOWjUZ2elVEZs9hrOiKRqYb0KJmkNGTLXnAdEWVpAhHB-bciqb9Qeg2ERm4QxxF_sjDaU02GngkCRlnOiU/s1600/7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigeRTw8YvKBkS6tMT154Sk4QwxQALiXQA2-D_qJZSzwMlxKXNpYnrqZlT1LcOWjUZ2elVEZs9hrOiKRqYb0KJmkNGTLXnAdEWVpAhHB-bciqb9Qeg2ERm4QxxF_sjDaU02GngkCRlnOiU/s1600/7.png&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Miłego kodowania :)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/7613408830382354375/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/7613408830382354375' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7613408830382354375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7613408830382354375'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2013/12/tizensdk-na-gentoo.html' title='TizenSDK na Gentoo'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigeRTw8YvKBkS6tMT154Sk4QwxQALiXQA2-D_qJZSzwMlxKXNpYnrqZlT1LcOWjUZ2elVEZs9hrOiKRqYb0KJmkNGTLXnAdEWVpAhHB-bciqb9Qeg2ERm4QxxF_sjDaU02GngkCRlnOiU/s72-c/7.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-8520383585882879030</id><published>2012-12-10T17:29:00.000+01:00</published><updated>2012-12-10T17:29:09.894+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JDK7"/><category scheme="http://www.blogger.com/atom/ns#" term="nio2"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenJDK"/><title type='text'>Powiadamiacz zgodny z JDK 7 ale na systemie plików nie wspierany przez natywne powiadamianie z kernela</title><content type='html'>&lt;h2 style=&quot;text-align: center;&quot;&gt;
Powiadamiacz zmian w FS zgodny z JDK 7&amp;nbsp;&lt;/h2&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
ale na systemie plików nie wspierany przez natywne powiadamianie z kernela&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
JDK 7 dostarcza nam nowiutki system powiadamiania o zmianach zachodzących w systemie plików. &amp;nbsp;Wszystko w porządku, jeśli kernel systemu operacyjnego zmiany rejestruje i je rozgłasza. Jednak są przypadki, że nawet jeśli pewne źródła wskazują, że kernel powinien rozgłaszać notyfikację o zmianach w systemie plików to jednak to nie działa. Przykład to NFS. Spróbujmy podmontować w drzewie Linuksa zasób Samby i JDK powiadomień o zmianach nie dostarczy.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Wiemy również, że źródła JDK posiadają (dla systemów bez wsparcia powiadomień od systemu operacyjnego) kod dostarczający implementację opartą o metodę odpytywania system o zmiany co jakiś czas. Metoda zwana pollingiem nie jest jednak dołączana do wynikowego kodu.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Jednak jeśli potrzebujemy powiadomień o zmianach w FS a JDK jej nie dostarcza, to dodajmy ją :)&lt;br /&gt;
&lt;br /&gt;
Nie można dodać tylko potrzebnej klasy&amp;nbsp;PollingWatchService jak również nie można umieścić jej w oryginalnym pakiecie&amp;nbsp;sun.nio.fs.&lt;br /&gt;
Przeniesienie klasy&amp;nbsp;PollingWatchService do pakietu&amp;nbsp;openjdk.sun.nio.fs i rozwiązaniu dwóch&amp;nbsp;potrzebnych&amp;nbsp;&amp;nbsp;klas&amp;nbsp;AbstractWatchKey i&amp;nbsp;AbstractWatchService&amp;nbsp;problem zostaje rozwiązany. Nawet jak w późniejszej implementacji twórcy OpenJDK dodadzą &quot;ifa&quot; dla systemów plików, które nie są wpierane przez inotify.&lt;br /&gt;
&lt;br /&gt;
Przykład użycia?&lt;br /&gt;
Proszę bardzo&lt;br /&gt;
&lt;br /&gt;
public class Aaa {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//....&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private final WatchService watcher;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private final WatchKey key;&lt;br /&gt;
//...&lt;br /&gt;
public metoda(){&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (isOsNativeNotify) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.watcher = FileSystems.getDefault().newWatchService();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.key = this.path.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PollingWatchService pollingWatchService = new PollingWatchService();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchEvent.Kind[] events = {ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY};&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchEvent.Modifier modifier = SensitivityWatchEventModifier.MEDIUM;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.key = pollingWatchService.register(this.path, events, modifier);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.watcher = pollingWatchService;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Poniżej przerobione klasy:&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp;* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.&lt;br /&gt;
&amp;nbsp;* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* This code is free software; you can redistribute it and/or modify it&lt;br /&gt;
&amp;nbsp;* under the terms of the GNU General Public License version 2 only, as&lt;br /&gt;
&amp;nbsp;* published by the Free Software Foundation. &amp;nbsp;Oracle designates this&lt;br /&gt;
&amp;nbsp;* particular file as subject to the &quot;Classpath&quot; exception as provided&lt;br /&gt;
&amp;nbsp;* by Oracle in the LICENSE file that accompanied this code.&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* This code is distributed in the hope that it will be useful, but WITHOUT&lt;br /&gt;
&amp;nbsp;* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&lt;br /&gt;
&amp;nbsp;* FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU General Public License&lt;br /&gt;
&amp;nbsp;* version 2 for more details (a copy is included in the LICENSE file that&lt;br /&gt;
&amp;nbsp;* accompanied this code).&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* You should have received a copy of the GNU General Public License version&lt;br /&gt;
&amp;nbsp;* 2 along with this work; if not, write to the Free Software Foundation,&lt;br /&gt;
&amp;nbsp;* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&lt;br /&gt;
&amp;nbsp;* or visit www.oracle.com if you need additional information or have any&lt;br /&gt;
&amp;nbsp;* questions.&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
package openjdk.sun.nio.fs;&lt;br /&gt;
&lt;br /&gt;
import java.nio.file.*;&lt;br /&gt;
import java.util.*;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;* Base implementation class for watch keys.&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
abstract class AbstractWatchKey implements WatchKey {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Maximum size of event list (in the future this may be tunable)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; static final int MAX_EVENT_LIST_SIZE = 512;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Special event to signal overflow&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; static final Event&lt;object&gt; OVERFLOW_EVENT =&lt;/object&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new Event&lt;object&gt;(StandardWatchEventKinds.OVERFLOW, null);&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Possible key states&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private static enum State {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; READY, SIGNALLED&lt;br /&gt;
&amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // reference to watcher&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private final AbstractWatchService watcher;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // reference to the original directory&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private final Path dir;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // key state&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private State state;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // pending events&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private List&lt;watchevent&gt;&amp;gt; events;&lt;/watchevent&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // maps a context to the last event for the context (iff the last queued&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // event for the context is an ENTRY_MODIFY event).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private Map&lt;object watchevent=&quot;watchevent&quot;&gt;&amp;gt; lastModifyEvents;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; protected AbstractWatchKey(Path dir, AbstractWatchService watcher) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.watcher = watcher;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.dir = dir;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.state = State.READY;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.events = new ArrayList&lt;watchevent&gt;&amp;gt;();&lt;/watchevent&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.lastModifyEvents = new HashMap&lt;object watchevent=&quot;watchevent&quot;&gt;&amp;gt;();&lt;/object&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; final AbstractWatchService watcher() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return watcher;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Return the original watchable (Path)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public Path watchable() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return dir;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Enqueues this key to the watch service&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; final void signal() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (this) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (state == State.READY) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; state = State.SIGNALLED;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watcher.enqueueKey(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Adds the event to this key and signals it.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @SuppressWarnings(&quot;unchecked&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; final void signalEvent(WatchEvent.Kind kind, Object context) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boolean isModify = (kind == StandardWatchEventKinds.ENTRY_MODIFY);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (this) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int size = events.size();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (size &amp;gt; 0) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if the previous event is an OVERFLOW event or this is a&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // repeated event then we simply increment the counter&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchEvent prev = events.get(size - 1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((prev.kind() == StandardWatchEventKinds.OVERFLOW)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || ((kind == prev.kind()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; Objects.equals(context, prev.context())))) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((Event) prev).increment();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if this is a modify event and the last entry for the context&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // is a modify event then we simply increment the count&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!lastModifyEvents.isEmpty()) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isModify) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchEvent ev = lastModifyEvents.get(context);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ev != null) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assert ev.kind() == StandardWatchEventKinds.ENTRY_MODIFY;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((Event) ev).increment();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // not a modify event so remove from the map as the&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // last event will no longer be a modify event.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastModifyEvents.remove(context);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if the list has reached the limit then drop pending events&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // and queue an OVERFLOW event&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (size &amp;gt;= MAX_EVENT_LIST_SIZE) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kind = StandardWatchEventKinds.OVERFLOW;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isModify = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; context = null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // non-repeated event&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Event&lt;object&gt; ev =&lt;/object&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new Event&lt;object&gt;((WatchEvent.Kind&lt;object&gt;) kind, context);&lt;/object&gt;&lt;/object&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (isModify) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastModifyEvents.put(context, ev);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (kind == StandardWatchEventKinds.OVERFLOW) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // drop all pending events&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; events.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastModifyEvents.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; events.add(ev);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signal();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public final List&lt;watchevent&gt;&amp;gt; pollEvents() {&lt;/watchevent&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (this) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&lt;watchevent&gt;&amp;gt; result = events;&lt;/watchevent&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; events = new ArrayList&lt;watchevent&gt;&amp;gt;();&lt;/watchevent&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastModifyEvents.clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public final boolean reset() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (this) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (state == State.SIGNALLED &amp;amp;&amp;amp; isValid()) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (events.isEmpty()) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; state = State.READY;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // pending events so re-queue key&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watcher.enqueueKey(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return isValid();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* WatchEvent implementation&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private static class Event&lt;t&gt; implements WatchEvent&lt;t&gt; {&lt;/t&gt;&lt;/t&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private final WatchEvent.Kind&lt;t&gt; kind;&lt;/t&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private final T context;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // synchronize on watch key to access/increment count&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private int count;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Event(WatchEvent.Kind&lt;t&gt; type, T context) {&lt;/t&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.kind = type;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.context = context;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.count = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public WatchEvent.Kind&lt;t&gt; kind() {&lt;/t&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return kind;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public T context() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return context;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int count() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return count;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // for repeated events&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void increment() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
/*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* This code is free software; you can redistribute it and/or modify it&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* under the terms of the GNU General Public License version 2 only, as&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* published by the Free Software Foundation. &amp;nbsp;Oracle designates this&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* particular file as subject to the &quot;Classpath&quot; exception as provided&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* by Oracle in the LICENSE file that accompanied this code.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* This code is distributed in the hope that it will be useful, but WITHOUT&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU General Public License&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* version 2 for more details (a copy is included in the LICENSE file that&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* accompanied this code).&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* You should have received a copy of the GNU General Public License version&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* 2 along with this work; if not, write to the Free Software Foundation,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* or visit www.oracle.com if you need additional information or have any&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* questions.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
package openjdk.sun.nio.fs;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
import java.nio.file.*;&lt;/div&gt;
&lt;div&gt;
import java.util.concurrent.*;&lt;/div&gt;
&lt;div&gt;
import java.io.IOException;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
/**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* Base implementation class for watch services.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
abstract class AbstractWatchService implements WatchService {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // signaled keys waiting to be dequeued&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private final LinkedBlockingDeque&lt;watchkey&gt; pendingKeys =&lt;/watchkey&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new LinkedBlockingDeque&lt;watchkey&gt;();&lt;/watchkey&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // special key to indicate that watch service is closed&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private final WatchKey CLOSE_KEY =&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new AbstractWatchKey(null, null) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public boolean isValid() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void cancel() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; };&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // used when closing watch service&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private volatile boolean closed;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private final Object closeLock = new Object();&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; protected AbstractWatchService() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Register the given object with this watch service&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; abstract WatchKey register(Path path,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchEvent.Kind[] events,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchEvent.Modifier... modifers)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws IOException;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // used by AbstractWatchKey to enqueue key&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; final void enqueueKey(WatchKey key) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pendingKeys.offer(key);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Throws ClosedWatchServiceException if watch service is closed&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private void checkOpen() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (closed) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ClosedWatchServiceException();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Checks the key isn&#39;t the special CLOSE_KEY used to unblock threads when&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* the watch service is closed.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private void checkKey(WatchKey key) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (key == CLOSE_KEY) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // re-queue in case there are other threads blocked in take/poll&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; enqueueKey(key);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; checkOpen();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public final WatchKey poll() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; checkOpen();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchKey key = pendingKeys.poll();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; checkKey(key);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return key;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public final WatchKey poll(long timeout, TimeUnit unit)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws InterruptedException {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; checkOpen();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchKey key = pendingKeys.poll(timeout, unit);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; checkKey(key);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return key;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public final WatchKey take()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws InterruptedException {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; checkOpen();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchKey key = pendingKeys.take();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; checkKey(key);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return key;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Tells whether or not this watch service is open.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; final boolean isOpen() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return !closed;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Retrieves the object upon which the close method synchronizes.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; final Object closeLock() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return closeLock;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Closes this watch service. This method is invoked by the close method to&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* perform the actual work of closing the watch service.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; abstract void implClose() throws IOException;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public final void close()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws IOException {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (closeLock) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // nothing to do if already closed&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (closed) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; closed = true;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; implClose();&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // clear pending keys and queue special key to ensure that any&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // threads blocked in take/poll wakeup&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pendingKeys.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pendingKeys.offer(CLOSE_KEY);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div&gt;
/*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* This code is free software; you can redistribute it and/or modify it&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* under the terms of the GNU General Public License version 2 only, as&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* published by the Free Software Foundation. &amp;nbsp;Oracle designates this&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* particular file as subject to the &quot;Classpath&quot; exception as provided&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* by Oracle in the LICENSE file that accompanied this code.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* This code is distributed in the hope that it will be useful, but WITHOUT&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* FITNESS FOR A PARTICULAR PURPOSE. &amp;nbsp;See the GNU General Public License&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* version 2 for more details (a copy is included in the LICENSE file that&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* accompanied this code).&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* You should have received a copy of the GNU General Public License version&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* 2 along with this work; if not, write to the Free Software Foundation,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* or visit www.oracle.com if you need additional information or have any&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* questions.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
package openjdk.sun.nio.fs;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
import java.nio.file.*;&lt;/div&gt;
&lt;div&gt;
import java.nio.file.attribute.*;&lt;/div&gt;
&lt;div&gt;
import java.security.AccessController;&lt;/div&gt;
&lt;div&gt;
import java.security.PrivilegedAction;&lt;/div&gt;
&lt;div&gt;
import java.security.PrivilegedExceptionAction;&lt;/div&gt;
&lt;div&gt;
import java.security.PrivilegedActionException;&lt;/div&gt;
&lt;div&gt;
import java.io.IOException;&lt;/div&gt;
&lt;div&gt;
import java.util.*;&lt;/div&gt;
&lt;div&gt;
import java.util.concurrent.*;&lt;/div&gt;
&lt;div&gt;
import com.sun.nio.file.SensitivityWatchEventModifier;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
/**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* Simple WatchService implementation that uses periodic tasks to poll&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* registered directories for changes. This implementation is for use on&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;* operating systems that do not have native file change notification support.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
public class PollingWatchService&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; extends AbstractWatchService {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // map of registrations&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private final Map&lt;object pollingwatchkey=&quot;pollingwatchkey&quot;&gt; map =&lt;/object&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new HashMap&lt;object pollingwatchkey=&quot;pollingwatchkey&quot;&gt;();&lt;/object&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // used to execute the periodic tasks that poll for changes&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private final ScheduledExecutorService scheduledExecutor;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public PollingWatchService() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TBD: Make the number of threads configurable&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scheduledExecutor = Executors&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .newSingleThreadScheduledExecutor(new ThreadFactory() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Thread newThread(Runnable r) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thread t = new Thread(r);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.setDaemon(true);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return t;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Register the given file with this watch service&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public WatchKey register(final Path path,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchEvent.Kind[] events,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WatchEvent.Modifier... modifiers)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws IOException {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // check events - CCE will be thrown if there are invalid elements&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (events.length == 0) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new IllegalArgumentException(&quot;No events to register&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final Set&lt;watchevent .kind=&quot;.kind&quot;&gt;&amp;gt; eventSet =&lt;/watchevent&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new HashSet&lt;watchevent .kind=&quot;.kind&quot;&gt;&amp;gt;(events.length);&lt;/watchevent&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (WatchEvent.Kind event : events) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // standard events&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (event == StandardWatchEventKinds.ENTRY_CREATE&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || event == StandardWatchEventKinds.ENTRY_MODIFY&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || event == StandardWatchEventKinds.ENTRY_DELETE) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eventSet.add(event);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // OVERFLOW is ignored&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (event == StandardWatchEventKinds.OVERFLOW) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (events.length == 1) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new IllegalArgumentException(&quot;No events to register&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // null/unsupported&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (event == null) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new NullPointerException(&quot;An element in event set is &#39;null&#39;&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new UnsupportedOperationException(event.name());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // A modifier may be used to specify the sensitivity level&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SensitivityWatchEventModifier sensivity = SensitivityWatchEventModifier.MEDIUM;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (modifiers.length &amp;gt; 0) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (WatchEvent.Modifier modifier : modifiers) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (modifier == null) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new NullPointerException();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (modifier instanceof SensitivityWatchEventModifier) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sensivity = (SensitivityWatchEventModifier) modifier;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new UnsupportedOperationException(&quot;Modifier not supported&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // check if watch service is closed&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!isOpen()) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ClosedWatchServiceException();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // registration is done in privileged block as it requires the&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // attributes of the entries in the directory.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final SensitivityWatchEventModifier s = sensivity;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return AccessController.doPrivileged(&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new PrivilegedExceptionAction&lt;pollingwatchkey&gt;() {&lt;/pollingwatchkey&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public PollingWatchKey run() throws IOException {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return doPrivilegedRegister(path, eventSet, s);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (PrivilegedActionException pae) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Throwable cause = pae.getCause();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cause != null &amp;amp;&amp;amp; cause instanceof IOException) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw (IOException) cause;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new AssertionError(pae);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // registers directory returning a new key if not already registered or&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; // existing key if already registered&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private PollingWatchKey doPrivilegedRegister(Path path,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set&amp;gt; events,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SensitivityWatchEventModifier sensivity)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws IOException {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // check file is a directory and get its file key if possible&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BasicFileAttributes attrs = Files.readAttributes(path, BasicFileAttributes.class);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!attrs.isDirectory()) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new NotDirectoryException(path.toString());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object fileKey = attrs.fileKey();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (fileKey == null) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new AssertionError(&quot;File keys must be supported&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // grab close lock to ensure that watch service cannot be closed&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (closeLock()) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!isOpen()) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new ClosedWatchServiceException();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PollingWatchKey watchKey;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (map) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watchKey = map.get(fileKey);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (watchKey == null) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // new registration&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watchKey = new PollingWatchKey(path, this, fileKey);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.put(fileKey, watchKey);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update to existing registration&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watchKey.disable();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watchKey.enable(events, sensivity.sensitivityValueInSeconds());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return watchKey;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; void implClose() throws IOException {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (map) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (Map.Entry&lt;object pollingwatchkey=&quot;pollingwatchkey&quot;&gt; entry : map.entrySet()) {&lt;/object&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PollingWatchKey watchKey = entry.getValue();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watchKey.disable();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; watchKey.invalidate();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.clear();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AccessController.doPrivileged(new PrivilegedAction&lt;void&gt;() {&lt;/void&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Void run() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scheduledExecutor.shutdown();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Entry in directory cache to record file last-modified-time and tick-count&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private static class CacheEntry {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private long lastModified;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private int lastTickCount;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CacheEntry(long lastModified, int lastTickCount) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.lastModified = lastModified;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.lastTickCount = lastTickCount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int lastTickCount() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return lastTickCount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long lastModified() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return lastModified;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void update(long lastModified, int tickCount) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.lastModified = lastModified;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.lastTickCount = tickCount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* WatchKey implementation that encapsulates a map of the entries of the&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* entries in the directory. Polling the key causes it to re-scan the&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* directory and queue keys when entries are added, modified, or deleted.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private class PollingWatchKey extends AbstractWatchKey {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private final Object fileKey;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // current event set&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Set&amp;gt; events;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // the result of the periodic task that causes this key to be polled&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private ScheduledFuture poller;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // indicates if the key is valid&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private volatile boolean valid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // used to detect files that have been deleted&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private int tickCount;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // map of entries in directory&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private Map&lt;path cacheentry=&quot;cacheentry&quot;&gt; entries;&lt;/path&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PollingWatchKey(Path dir, PollingWatchService watcher, Object fileKey)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws IOException {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super(dir, watcher);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.fileKey = fileKey;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.valid = true;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.tickCount = 0;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.entries = new HashMap&lt;path cacheentry=&quot;cacheentry&quot;&gt;();&lt;/path&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // get the initial entries in the directory&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try (DirectoryStream&lt;path&gt; stream = Files.newDirectoryStream(dir)) {&lt;/path&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (Path entry : stream) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // don&#39;t follow links&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long lastModified =&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Files.getLastModifiedTime(entry, LinkOption.NOFOLLOW_LINKS).toMillis();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entries.put(entry.getFileName(), new CacheEntry(lastModified, tickCount));&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (DirectoryIteratorException e) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw e.getCause();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object fileKey() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return fileKey;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public boolean isValid() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return valid;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void invalidate() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; valid = false;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // enables periodic polling&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void enable(Set&amp;gt; events, long period) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (this) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update the events&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.events = events;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // create the periodic task&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Runnable thunk = new Runnable() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void run() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; poll();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.poller = scheduledExecutor&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .scheduleAtFixedRate(thunk, period, period, TimeUnit.SECONDS);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // disables periodic polling&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void disable() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (this) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (poller != null) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; poller.cancel(false);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void cancel() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; valid = false;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized (map) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.remove(fileKey());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; disable();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /**&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* Polls the directory to detect for new files, modified files, or&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* deleted files.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; synchronized void poll() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!valid) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // update tick&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tickCount++;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // open directory&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirectoryStream&lt;path&gt; stream = null;&lt;/path&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream = Files.newDirectoryStream(watchable());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException x) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // directory is no longer accessible so cancel key&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cancel();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signal();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // iterate over all entries in directory&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (Path entry : stream) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long lastModified = 0L;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastModified =&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Files.getLastModifiedTime(entry, LinkOption.NOFOLLOW_LINKS).toMillis();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException x) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // unable to get attributes of entry. If file has just&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // been deleted then we&#39;ll report it as deleted on the&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // next poll&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // lookup cache&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CacheEntry e = entries.get(entry.getFileName());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (e == null) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // new file found&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entries.put(entry.getFileName(),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new CacheEntry(lastModified, tickCount));&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // queue ENTRY_CREATE if event enabled&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (events.contains(StandardWatchEventKinds.ENTRY_CREATE)) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signalEvent(StandardWatchEventKinds.ENTRY_CREATE, entry.getFileName());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if ENTRY_CREATE is not enabled and ENTRY_MODIFY is&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // enabled then queue event to avoid missing out on&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // modifications to the file immediately after it is&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // created.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (events.contains(StandardWatchEventKinds.ENTRY_MODIFY)) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signalEvent(StandardWatchEventKinds.ENTRY_MODIFY, entry.getFileName());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // check if file has changed&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (e.lastModified != lastModified) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (events.contains(StandardWatchEventKinds.ENTRY_MODIFY)) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signalEvent(StandardWatchEventKinds.ENTRY_MODIFY,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entry.getFileName());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // entry in cache so update poll time&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.update(lastModified, tickCount);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (DirectoryIteratorException e) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ignore for now; if the directory is no longer accessible&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // then the key will be cancelled on the next poll&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } finally {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // close directory stream&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream.close();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException x) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ignore&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // iterate over cache to detect entries that have been deleted&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Iterator&lt;map .entry=&quot;.entry&quot; ath=&quot;ath&quot; cacheentry=&quot;cacheentry&quot;&gt;&amp;gt; i = entries.entrySet().iterator();&lt;/map&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (i.hasNext()) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Map.Entry&lt;path cacheentry=&quot;cacheentry&quot;&gt; mapEntry = i.next();&lt;/path&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CacheEntry entry = mapEntry.getValue();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (entry.lastTickCount() != tickCount) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Path name = mapEntry.getKey();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // remove from map and queue delete event (if enabled)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.remove();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (events.contains(StandardWatchEventKinds.ENTRY_DELETE)) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signalEvent(StandardWatchEventKinds.ENTRY_DELETE, name);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/8520383585882879030/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/8520383585882879030' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8520383585882879030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8520383585882879030'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2012/12/powiadamiacz-zgodny-z-jdk-7-ale-na.html' title='Powiadamiacz zgodny z JDK 7 ale na systemie plików nie wspierany przez natywne powiadamianie z kernela'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-7592557048526710846</id><published>2012-10-12T12:47:00.003+02:00</published><updated>2012-10-12T13:59:07.630+02:00</updated><title type='text'>Jak rozpakować jeden plik z archiwum ZIP?</title><content type='html'>Trochę przewrotnie, ale da się wykonać tą sztuczkę za pomocą 7zip-a&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: black; color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;7z x&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: black; color: lime; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[plik ZIP]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: black; color: lime; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[ścieżka/plik-do-rozpakowania]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Troszkę mnie zdziwiło, że nie można tego zrobić za&amp;nbsp;&lt;/span&gt;pomocą&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;zip czy unzip&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Teraz można przystąpić do analizy plików zawartych w grupie plików zip&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: black; color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: black; color: lime; font-family: Courier New, Courier, monospace;&quot;&gt;for f in `find . -name *.zip`; do 7z x -so $f jakis_plik_w_archiwum.txt | cat | grep null; done&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/7592557048526710846/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/7592557048526710846' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7592557048526710846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7592557048526710846'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2012/10/jak-rozpakowac-jeden-plik-z-archiwum-zip.html' title='Jak rozpakować jeden plik z archiwum ZIP?'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-8740574788615762901</id><published>2012-04-22T23:38:00.001+02:00</published><updated>2012-04-22T23:38:20.153+02:00</updated><title type='text'>Proste sprawdzenie karty SD</title><content type='html'>Jak sprawdzić kartę SD czy nie ma problemów z nagrywanie, odtwarzaniem, itp?&lt;br /&gt;
&lt;br /&gt;
test szybkości odczytu&lt;br /&gt;
&lt;span style=&quot;background-color: black; color: lime;&quot;&gt;hdparm -tT /dev/sdb&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
test szybkości zapisu&lt;br /&gt;
&lt;span style=&quot;background-color: black; color: lime;&quot;&gt;dd if=/dev/zero of=/media/50CE-66EF/output.img bs=8k count=256k&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A jak z integralnością danych?&lt;br /&gt;
Prosty&amp;nbsp;sposób&amp;nbsp;by wygenerować plik o losowych bajtach, zapisać w pamięci, później odczytać i porównać ze źródłem&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;dd if=/dev/urandom of=a.log bs=1G count=2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;for (( i=0; i&amp;lt;16; i++ )) do cp -v /tmp/a.log /media/F737-1C16/plik-${i}.bin; done;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;for f in /media/F737-1C16/*; &amp;nbsp;do cmp &amp;nbsp;/tmp/a.log &quot;$f&quot;; done;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Nieststy moja karta zakupiona na allegro okzała się totalnym badziewiem. Nie przeszłą nawet testu nagrania plików. Nagrało się tylko 24 GiB :(&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To, że urządzenia pamięci masowych tupu Flash są dość skomplikowane i vfat słabo do nich przystaje należy dla wydajności i żywotności właściwie je sformatować&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Po lekturze dokumentacji na Linaro można pokusić się o odszukanie parametrów idealnego formatu&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;git clone git://git.linaro.org/people/arnd/flashbench.git&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;cd flashbench/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;make&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;./flashbench -a /dev/sdb --blocksize=1024&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;cat README # :)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;sudo ./flashbench -O --erasesize=$[16 * 1024 * 1024] --blocksize=$[256 * 1024] /dev/sdb &amp;nbsp;--open-au-nr=3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
i wreszcie format&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: black; color: lime;&quot;&gt;mkfs.ext4 -O ^has_journal -E stride=4 -b 4096 -L karta32 /dev/sdb1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
A jak napisałem powyżej, eksperyment optymalizacji nie udał się bo kartę mam walniętą ...&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/8740574788615762901/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/8740574788615762901' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8740574788615762901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8740574788615762901'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2012/04/proste-sprawdzenie-karty-sd.html' title='Proste sprawdzenie karty SD'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-8558658402881468738</id><published>2012-04-20T21:03:00.000+02:00</published><updated>2012-04-20T21:03:35.616+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Google"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="opensource"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="rozprawa sądowa"/><title type='text'>Oracle vs. Google w sprawie ochrony środowiska Java</title><content type='html'>Wreszcie rozpoczął się proces w sprawi naruszeń Googla podczas budowania Androida bez jakiejkowiek zgody licencyjnej od właściciela praw.&lt;br /&gt;
Oracle przedstawił bardzo celne spostrzeżenia na swojej prezentacji otwarcia&lt;br /&gt;
&lt;a href=&quot;http://www.oracle.com/us/corporate/features/opening-slides-1592541.pdf&quot;&gt;http://www.oracle.com/us/corporate/features/opening-slides-1592541.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Prezentacja wskazuje świadomość decydentów Google-a, że dopuszczają się kradzieży, że wciągają środowisko&amp;nbsp;programistów, operatorów i producentów telefonów do postrzegania Googla jako tego dobrego co rozdaje za darmo bo to opensource.&lt;br /&gt;
Dalej, Oracle wskazuje, że Google łamie żelazną, rdzenną podwalinę ideii Java - Napisz Raz, Uruchom Wszędzie - Write Once Run Everywere.&lt;br /&gt;
Oracle w prezentacji przedstawia&amp;nbsp;twierdzenia&amp;nbsp;popierające zakaz kradzieży Javy publicznymi stwierdzeniami pracowników Google-a.&lt;br /&gt;
Podsumowując słowami otwarcia - Google wlazł buciorami w wieloletni dorobek bardzo szerokiej&amp;nbsp;społeczności&amp;nbsp;i rozwalił kompatybilność - dziel i rządź.&lt;br /&gt;
To samo Google zrobił z JavaEE - Google AppEngine, Jabber/XMPP - Google Talk i zabiera się za JavaScript :)&lt;br /&gt;
&lt;br /&gt;
Co na to Google?&lt;br /&gt;
Google prezentację otwarcia ma bardzo skromną:&lt;br /&gt;
&lt;a href=&quot;http://assets.sbnation.com/assets/1065768/google_opening_statement_slides_oracle_trial.pdf&quot;&gt;http://assets.sbnation.com/assets/1065768/google_opening_statement_slides_oracle_trial.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Opiera się na publicznych sloganach, że Java jest wolna. Nie wiem, czy te slogany mają&amp;nbsp;jakąkolwiek&amp;nbsp;wartość poza propagandą. Propaganda jest wpisana w cele Google-a - że to on stoi za OpenSource! A to Sun Uwolnił kod Java, ale nie dał możliwości jej dowolnego rozgałęziania. Fajny slogan, że Harmony może być w dowolnym czasie &quot;zaakceptowane&quot; a doskonale wiedział, że malutkim problemem była licencja, której Harmony nie otrzymało od Sun-a.&lt;br /&gt;
Larry Page podczas przesłuchania łatwo wyprowadzał się z równowagi, odpowiadał&amp;nbsp;zdenerwowanym, podniesionym głosem. Wypowiedzi były kręte, co sędzi się nie podobało. Został poproszony o odpowiedzi na pytania jako &quot;Tak&quot;, &quot;Nie&quot;, &quot;Nie wiem&quot;, &quot;Nie pamiętam&quot;. Larry Page wybierał więc tylko te dwie wersje odpowiedzi... Coś nie za dobrze wyszło Googlowi to otwarcie.&lt;br /&gt;
&lt;br /&gt;
To są moje opinie. Jestem przeciwny forkowi Google-a. Mógł jak reszta świata wykupić licencję, Dalwika uczynić kompatybilnym z JavaSE. Po co to cwaniactwo? Dziel i rządź, wrrrr... Ale to my prograniści jesteśmy podzieleni.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/8558658402881468738/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/8558658402881468738' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8558658402881468738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/8558658402881468738'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2012/04/oracle-vs-google-w-sprawie-ochrony.html' title='Oracle vs. Google w sprawie ochrony środowiska Java'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-5425723737798115790</id><published>2011-10-26T22:15:00.001+02:00</published><updated>2011-10-26T22:16:34.145+02:00</updated><title type='text'>Spóźniony smartphone Nokii czy wejście na rynek BadaOS?</title><content type='html'>Nokia wprowadza modele z Windows Phone Nokia Lumia 800 i Nokia Lumia 710. Dodatkowo rozszerza gamę telefonów opartych na S40 o&amp;nbsp;Nokia Asha 200,&amp;nbsp;Nokia Asha&amp;nbsp;201,&amp;nbsp;Nokia Asha&amp;nbsp;300 i&amp;nbsp;Nokia Asha&amp;nbsp;&amp;nbsp;303.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.chip.pl/images/2011/10/26/NWWPrange2jpg.jpg/image_full&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;214&quot; src=&quot;http://www.chip.pl/images/2011/10/26/NWWPrange2jpg.jpg/image_full&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Nokia, na swoje pięć minut ściągnęła uwagę świata. Niestety poza obudową z modelu Nokia N9 nic ciekawego nie przedstawiła.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Telefony Nokii czy smartfony z niskiej póki nie zawojują światem. Nie ma w nich nic co mogło by&amp;nbsp;przyciągać&amp;nbsp;klienta smartfona, który to klient wie co chce. Oczywiście nie liczą się tu klienci Apple&#39;a, którzy nie są&amp;nbsp;racjonalnymi&amp;nbsp;klientami i kupią wszystko co ma w nawie Apple. Ot tacy więźnie co jeszcze za celę więzienną muszą słono płacić ;) Wracając do Nokii, to jeśli Nokia odzyska jeszcze takich klientów, a swego czasu miała ich wielu, to tych klientów nie będzie obecnie zbyt wielu by zawojować światem.&lt;/div&gt;
&lt;div&gt;
Czego Nokia nie ma co już dawno mają telefony typu smartphone?&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;mocnego procesora z podwójnym rdzeniem,&lt;/li&gt;
&lt;li&gt;wysokiej rozdzielczości ekranu z pełnymi pikselami,&lt;/li&gt;
&lt;li&gt;nagrywanie obrazu HD 1080p,&lt;/li&gt;
&lt;li&gt;NFC,&lt;/li&gt;
&lt;li&gt;przedniej kamery do&amp;nbsp;wideo-rozmów,&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Czy Nokii/Microsoftowi uda się wejść na rynek BadaOS, czyli smartphone entry level? Czyim kosztem. Nie sądzę aby Samsung na tym ucierpiał bo jego telefony są zwyczajnie tanie. Ta cecha jest ważna w tym segmencie. Jedyną szansą są klienci&amp;nbsp;nieracjonalni&amp;nbsp;tacy jakich ma Apple.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Podczas konferencji Nokia wskazała rynek którym się interesuje - jest to rynek tanich telefonów dla biednych krajów jak Indie.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Wcześniej Microsoft przedstawił z dumą, że ich telefon nie jest skomplikowany jak Android. Czyli jest prosty z brakiem możliwości własnych ustawień i w ogóle bez kontroli użytkownika.&lt;/div&gt;
&lt;div&gt;
Te dwie idee przeświecały tym pięciu minut dla Nokii.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Na koniec skomentuję show. Spokojni i cisi&amp;nbsp;Skandynawowie&amp;nbsp;&quot;like Kimi&quot; założyli ubranko Microsoftu i ... wrócili do korzeni małp... darcie ryja o tym, że telefon jest &quot;awsome&quot; ma być&amp;nbsp;argumentem&amp;nbsp;nie do przekrzyczenia... dla ludzi nie myślących&amp;nbsp;racjonalnie&amp;nbsp;;)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/5425723737798115790/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/5425723737798115790' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/5425723737798115790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/5425723737798115790'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2011/10/spozniony-smartphone-nokii-czy-wejscie.html' title='Spóźniony smartphone Nokii czy wejście na rynek BadaOS?'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-5006517412083413296</id><published>2011-10-04T19:46:00.004+02:00</published><updated>2011-10-06T09:04:42.062+02:00</updated><title type='text'>JavaOne&#39;11 zajawki z dnia drugiego</title><content type='html'>&lt;br /&gt;
Cóż za nudy! Ale będzie lepiej :) Na wstępie mamy facecika, który rozwodzi się o nowym spojrzeniu na sieci, transmisje danych dla operatorów, dostawców treści na telefony... &lt;b style=&quot;background-color: yellow;&quot;&gt;Ale gdzie Java?&lt;/b&gt; Czy to JavaOne to jakiś spęd firm promujących co się da? Oczywiście promowane produkty nie muszą być w jakikolwiek sposób związane z Javą jak to ma przypadek z Juniper-em. Oracle sprzedał 30 minut. Szkoda czasu, ale trzymam się przy transmisji. Może będzie coś z Javą związane....nudy.... należy to przetrwać.&lt;br /&gt;
&lt;br /&gt;
Wreszcie skończył. Wszedł Hasan Rizvi, Senior Vice President, Oracle Fusion Middleware and Java, i zapowiedział, że JDK7 właśnie od teraz jest dostępna na MacOsX – wersja preview. Za tą zapowiedź posypały się gromkie brawa, WOW. Następnie rozmowa o społeczności, JCP, partycypacji, Magazynie JavaMagazine.&lt;br /&gt;
&lt;br /&gt;
Mark Kittle z Red Hat stwierdził, że ich implementacja EE 6 jest najlepsza jaka kiedykolwiek się pojawiła :)&lt;br /&gt;
Język Java zna ponad 9 miljonów programistów czyli więcej ludzi zna język Java niż język szwedzki&lt;br /&gt;
&lt;b style=&quot;background-color: yellow;&quot;&gt;Termin pojawienia się Java 8 przeniesiona z końca 2012 na lato 2013&lt;/b&gt;&lt;br /&gt;
JavaFx 3.0 ma pojawić się z z JDK8, dodatkowo z JavaScript.&lt;br /&gt;
Zaproszony Rob Benson z Twitera rozmawia o ogromnym trafiku i informuje, że dołączają do JCP i do komitetu prac nad JDK.&lt;br /&gt;
A teraz mocne uderzenie&lt;b&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: yellow;&quot;&gt;Demo JavaFX na tablecie Acera, Samsung Galaxy Tab&lt;/span&gt;&lt;/b&gt;! To urządzenie przedstawiono jako Linux Device ;)Kolejne urządzenie na którym idzie&lt;b&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: yellow;&quot;&gt;JavaFX to iPad&lt;/span&gt;&lt;/b&gt;! WOW! Ciekaw czy Apple się na to zgodziło?&lt;br /&gt;
Kolejne mocna uderzenie&lt;br /&gt;
Nareszcie –&lt;b style=&quot;background-color: yellow;&quot;&gt; łączą Java Me z Se&lt;/b&gt;. Na początek przeprowadzą synchronizację aby aplikacje JavaME mogły być uruchamiane na JavaSe. Synchronizacja ma być zrobiona na czas wydania Java8 i będzie aktualizowana razem z JavaSe. Pierwsza synchronizacja oczywiście będzie opóźniona względem SE ale java ME 7 ma się pojawić w 2012. &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: yellow;&quot;&gt;&lt;b&gt;Graficzne zaplecze JavaMe to JavaFX&lt;/b&gt;!&lt;/span&gt;&lt;br /&gt;
Oo, wchodzi facio z getjar :) Oczywiście mówi o aplikacjach JavaMe i ich pobieralności. Ale niespodzianka. Ma się wypowiedzieć jak Java ME ma się w porównani z innymi platformami. Ano tym, że javaME jest open i wolna od podatków&lt;br /&gt;
I wracamy do JavaEE. Cameron Purdy z Oracle mówi o Java EE w chmurze jako Platforma jako Usługa PaaS, które ustandaryzuje chmury. Nie ma takiego rozwiązania. Wszystkie inne są własnościowymi rozwiązaniami.&lt;br /&gt;
JavaEE 7 będzie multi-tenancy z prostą konfiguracją bazującą na modelu CDI. &amp;nbsp; Multi-tenancy odnosi się do takiego uruchamiania aplikacji, że jedna instancja aplikacji może obsługiwać wiele korporacji, które mają własne konfiguracje, dane i oczywiście są odseparowane.&lt;br /&gt;
Następną zaproszoną osobą jest gość od ESPN, który wychwala przejście ich platformy na Glasfisha&lt;br /&gt;
Ostatnie mocne uderzenie to&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: yellow;&quot;&gt; &lt;b&gt;zapowiedź projektu Avatar, który będzie kombinację HTML5 przesyłającego JSONy po WebScocket-cie i komunikujący się z JavaEE.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
To tyle dobrego. Aż dziw bierze, że taki kiepski początek nam zaprezentowano. Czy liczono, że mnóstwo uczestników zaśpi i nie przyjdzie na tak poranną konferencję?&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/5006517412083413296/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/5006517412083413296' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/5006517412083413296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/5006517412083413296'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2011/10/javaone11-zajawki-z-dnia-drugiego.html' title='JavaOne&#39;11 zajawki z dnia drugiego'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-5472725763211219420</id><published>2011-09-21T23:17:00.002+02:00</published><updated>2011-09-21T23:17:24.365+02:00</updated><title type='text'>Google przeciwko Oracle w sprawie kradzieży Javy ... w uproszczeniu</title><content type='html'>Można zauważyć, że małymi kroczkami zbliża się zakończeniu batalia w sprawie kradzieży własności intelektualnych Javy dla potrzeb Androida.&lt;br /&gt;
A jakie mogą być wyniki tej batalii?&lt;br /&gt;
&lt;b&gt;Google wygrywa!&lt;/b&gt; - mało prawdopodobne, ale wówczas nie traci kasy&lt;br /&gt;
&lt;b&gt;Google przegrywa&lt;/b&gt; - i tu sporo możliwości w zależności od wyroku:&lt;br /&gt;
&lt;br /&gt;
Google skradło kod Javy&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;ale już skradzionego kodu nie wykorzystuje - wówczas Google będzie musiało zapłacić karę + wyliczony czas bezprawnego używania Androida na liczbie słuchawek przez dany okres czasu. Obecnie Google wprowadza 200 mln słuchawek rocznie. Licencja może się wahać w granicach 10 - 20 USD.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;ale ciągle&amp;nbsp;wykorzystuje&amp;nbsp;skradzioną własność Oracle-a - czyli do poprzedniego wyliczenia dodajemy licencję aż do czasu jak przestaną być wprowadzane na rynek urządzenia z koniecznym&amp;nbsp;licencjonowaniem.&lt;/li&gt;
&lt;li&gt;skradło własność intelektualną, którą Google nie może wyeliminować w swoim Androidzie. Tu już opłata licencyjna dożywotnia lub rezygnacja z projektu Android.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Oczywiście do tego dochodzi kolejna fala skarżących Google-a o bezprawne użycie patentów (Apple, itp...) aż cena za licencję osiągnie poziom, który również może zmusić do zaprzestania projektu Android. Obecnie już opłaty wynoszą 15 USD dla Microsoftu + Oracle-owi może 20 USD i już mamy 35 USD. Czy dojdą opłaty do setki?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Oczywiście za to zapłacą klienci Androida.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
A co z Javą? Jej ważność jest, wydawać by się mogło, na szarym końcu.&lt;/div&gt;
&lt;div&gt;
Najważniejsza cecha - &quot;napisz raz - uruchom wszędzie&quot; została w sposób brutalny zgwałcona przez Google-a, że nie da się uruchomić Javy z Androida na oryginalnym środowisku Javy jak również w drugą stronę - nie da się uruchomić&amp;nbsp;oryginalnej&amp;nbsp;Javowej aplikacji na Androidzie.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Ot, taka smutna rzeczywistość.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/5472725763211219420/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/5472725763211219420' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/5472725763211219420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/5472725763211219420'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2011/09/google-przeciwko-oracle-w-sprawie.html' title='Google przeciwko Oracle w sprawie kradzieży Javy ... w uproszczeniu'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-7205072527709907553</id><published>2011-09-14T23:49:00.000+02:00</published><updated>2011-09-20T23:28:29.063+02:00</updated><title type='text'>Java SE Embedded 1.7.0 by Oracle</title><content type='html'>Bez większych nadziei zabrałem się za malutki test Javy uruchomionej pod telefonem z LiMo czyli Linux Mobile - oczywiście jest to Samsung GT-I8320 a jeśli ktoś lubi marketingowe nazwy - Vodafone 360 H1.&lt;br /&gt;
Odniesieniem testów jest wpis spod adresu&lt;br /&gt;
&lt;a href=&quot;http://adnotacja.blogspot.com/2011/01/sprawdzenie-doniesien-porownan-javase.html&quot;&gt;http://adnotacja.blogspot.com/2011/01/sprawdzenie-doniesien-porownan-javase.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
tutaj&lt;br /&gt;
&lt;br /&gt;
Wyniki przestawiają się następująco:&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;laptok ~ # telnet 192.168.0.11&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Trying 192.168.0.11...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Connected to 192.168.0.11.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Escape character is &#39;^]&#39;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;************************************************************&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SAMSUNG GT-8320 LINUX &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;************************************************************&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;protector login: root&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;BusyBox v1.11.0 (2010-01-26 11:15:33 KST) built-in shell (ash)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Enter &#39;help&#39; for a list of built-in commands&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# cat /proc/cpuinfo&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Processor &amp;nbsp; &amp;nbsp; &amp;nbsp; : ARMv7 Processor rev 3 (v7l)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;BogoMIPS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 124.71&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Features &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: swp half thumb fastmult vfp edsp&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CPU implementer : 0x41&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CPU architecture: 7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CPU variant &amp;nbsp; &amp;nbsp; : 0x1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CPU part &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 0xc08&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;CPU revision &amp;nbsp; &amp;nbsp;: 3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cache type &amp;nbsp; &amp;nbsp; &amp;nbsp;: write-through&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cache clean &amp;nbsp; &amp;nbsp; : not required&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cache lockdown &amp;nbsp;: not supported&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cache format &amp;nbsp; &amp;nbsp;: Unified&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cache size &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 768&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cache assoc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cache line length &amp;nbsp; &amp;nbsp; &amp;nbsp; : 8&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cache sets &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 64&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Hardware &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: SAMSUNG-NOWPLUS board&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Revision &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 3430433f&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Serial &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 0000000000000000&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Board Revision &amp;nbsp;: 100&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# cd /mnt/mmc/m1k0/java/&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# ../../ejre1.7.0/bin/java -version&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;java version &quot;1.7.0&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Java(TM) SE Runtime Environment for Embedded (build 1.7.0-b147)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# ../../ejre1.7.0/bin/java CaffeineMarkEmbeddedApp&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Sieve score = 8071 (98)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Loop score = 16731 (2017)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Logic score = 13929 (0)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;String score = 4608 (708)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Float score = 6076 (185)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Method score = 10096 (166650)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Overall score = 9000&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# ../../ejre1.7.0/bin/java CaffeineMarkEmbeddedApp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Sieve score = 8092 (98)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Loop score = 16748 (2017)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Logic score = 13995 (0)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;String score = 4605 (708)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Float score = 6072 (185)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Method score = 10103 (166650)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Overall score = 9012&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# ../../ejre1.7.0/bin/java CaffeineMarkEmbeddedApp&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Sieve score = 8055 (98)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Loop score = 16693 (2017)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Logic score = 14024 (0)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;String score = 4615 (708)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Float score = 6064 (185)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Method score = 10094 (166650)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Overall score = 9003&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# ../ejre1.7.0/bin/java -cp scimark2lib.jar jnt.scimark2.commandline -large &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;SciMark 2.0a&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Composite Score: 16.691350333808735&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;FFT (1048576): 7.226181551615665&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;SOR (1000x1000): &amp;nbsp; 32.32391917394429&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Monte Carlo : 6.472691338972718&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Sparse matmult (N=100000, nz=1000000): 19.875776220915988&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;LU (1000x1000): 17.55818338359501&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;java.vendor: Oracle Corporation&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;java.version: 1.7.0&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;os.arch: arm&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;os.name: Linux&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;os.version: 2.6.24.7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# ../ejre1.7.0/bin/java -cp scimark2lib.jar jnt.scimark2.commandline -large&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;SciMark 2.0a&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Composite Score: 16.551323678544176&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;FFT (1048576): 7.305649811038718&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;SOR (1000x1000): &amp;nbsp; 32.215228331082415&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Monte Carlo : 6.470195302580493&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Sparse matmult (N=100000, nz=1000000): 19.47064086069175&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;LU (1000x1000): 17.294904087327506&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;java.vendor: Oracle Corporation&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;java.version: 1.7.0&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;os.arch: arm&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;os.name: Linux&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;os.version: 2.6.24.7&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: black;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/b3wYnuJyes8?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/7205072527709907553/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/7205072527709907553' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7205072527709907553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7205072527709907553'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2011/09/java-se-embedded-170-by-oracle.html' title='Java SE Embedded 1.7.0 by Oracle'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-1983684537293420790</id><published>2011-07-29T10:56:00.002+02:00</published><updated>2011-07-29T10:59:12.758+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Jigsaw"/><title type='text'>Wreszcie, nareszcie Java SE 7 gotowe!</title><content type='html'>Zgodnie z terminarzem dnia 28 lipca 2011 roku mamy nową Javę o nazwie kodowej Dolphin czyli po polsku delfin.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCCkvcTlSBASGzz4GrEvJf-4g5TreI2sH72EGa6XnKiR_s8K0cRT3mijYwW9cO_hDSFS_802Z8zqXrSBz4W-4C3PKzMN4cDBSN7JDb_YI8Asqw2I1tOxIvnWxdFYDtedQM5KOnkdceri8/s1600/Java+7+Dolphin+and+Java+Duke.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCCkvcTlSBASGzz4GrEvJf-4g5TreI2sH72EGa6XnKiR_s8K0cRT3mijYwW9cO_hDSFS_802Z8zqXrSBz4W-4C3PKzMN4cDBSN7JDb_YI8Asqw2I1tOxIvnWxdFYDtedQM5KOnkdceri8/s1600/Java+7+Dolphin+and+Java+Duke.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Java Se 7 Dolphin and Duke&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
Trwało to aż od lipca 2006 roku a i tak nie została sfinalizowana w takim kształcie jak chciał Sun, np. brak&amp;nbsp;Jigsaw - czyli modularyzacja środowiska tak aby zbliżyć się choć na kroczek do modelu mikrokernela w celu szybszego&amp;nbsp;ładowania&amp;nbsp;klas które są potrzebne - bez zbędnych niepotrzebnych klas, które tylko czas i pamięć zajmują. Ma to ogromny sens w wbudowanych środowiskach uruchomieniowych a tu bliziutko do realnej konkurencji Androida, czyli Jigsaw + JavaFx</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/1983684537293420790/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/1983684537293420790' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/1983684537293420790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/1983684537293420790'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2011/07/wreszcie-nareszcie-java-se-7-gotowe.html' title='Wreszcie, nareszcie Java SE 7 gotowe!'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCCkvcTlSBASGzz4GrEvJf-4g5TreI2sH72EGa6XnKiR_s8K0cRT3mijYwW9cO_hDSFS_802Z8zqXrSBz4W-4C3PKzMN4cDBSN7JDb_YI8Asqw2I1tOxIvnWxdFYDtedQM5KOnkdceri8/s72-c/Java+7+Dolphin+and+Java+Duke.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-5453822238053200794</id><published>2011-07-26T20:55:00.002+02:00</published><updated>2011-07-26T20:58:17.991+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mobile operating system"/><title type='text'>Inicjatywa kolejnego linuksowego mobilnego systemu operacyjnego</title><content type='html'>Tym razem Mozilla postanowiła włączyć się do ostatnio modnego nurtu tworzenia systemów operacyjnych rodziny Unix/Linux/Posix - owo podobne ;)&lt;br /&gt;
Mozilla posiada swój szkielet&amp;nbsp;aplikacji&amp;nbsp;i planuje dodać do niego API dostępowe do zasobów systemowych. A&amp;nbsp;aplikacje&amp;nbsp;byłyby XULowe. Ot, taka kolejna wariacja, która bierze trochę z ChromeOS.&lt;br /&gt;
Obecnie mamy już niezłą rodzinkę:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;LiMo (Linux z GTK+)&lt;/li&gt;
&lt;li&gt;MeeGo (Linux z QT),&lt;/li&gt;
&lt;li&gt;WebOS (Linux z ... gtk+/..)&lt;/li&gt;
&lt;li&gt;Android (Linux z Dalvikiem - klonem Javy),&lt;/li&gt;
&lt;li&gt;iOS (BSD z Cocoa)&lt;/li&gt;
&lt;li&gt;BadaOs (NucleOS z Bada framework)&lt;/li&gt;
&lt;li&gt;BlackBerry (QNX ... może z phononem)&lt;/li&gt;
&lt;li&gt;ciągle produkowany Motorola Linux (Linux z QT)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
A co nam pozostaje spoza rodziny?&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Symbian - wielki schodzący z rynku,&lt;/li&gt;
&lt;li&gt;WindowsCE - też pogrzebany,&lt;/li&gt;
&lt;li&gt;WindowsPhone7 (oparte na dalszym klonie Javy ;)&lt;/li&gt;
&lt;li&gt;BlackBerry&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;Tak to mniej więcej wygląda&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Źródło:&amp;nbsp;&lt;a href=&quot;http://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/7668a9d46a43e482?pli=1&amp;amp;elq=c985faff97ad4eeabd0e19736056e14a&quot;&gt;http://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/7668a9d46a43e482?pli=1&amp;amp;elq=c985faff97ad4eeabd0e19736056e14a&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/5453822238053200794/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/5453822238053200794' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/5453822238053200794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/5453822238053200794'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2011/07/inicjatywa-kolejnego-linuksowego.html' title='Inicjatywa kolejnego linuksowego mobilnego systemu operacyjnego'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5262794852276216895.post-7777061691683786685</id><published>2011-07-20T20:55:00.000+02:00</published><updated>2011-07-20T20:55:30.114+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BadaOS"/><category scheme="http://www.blogger.com/atom/ns#" term="LiMo"/><category scheme="http://www.blogger.com/atom/ns#" term="SDK"/><category scheme="http://www.blogger.com/atom/ns#" term="WAC"/><title type='text'>Mam BadaOS SDK v 2.0.1b!</title><content type='html'>Po zalogowaniu się na developer.bada.com znalazłem&amp;nbsp;bardzo&amp;nbsp;wyczekiwane SDK dla BadaOS 2.&lt;br /&gt;
Niestety, dość często &quot;wywala się&quot; emulator. Rozumiem dobrze, że to nie finalny produkt...muszę to w tym etapie zaakceptować. &amp;nbsp;SDK jest dostępne tylko na Windowsa, choć przyobiecano nam, że pojawi się również na Linuksa. Oby jak najwcześniej.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiChw_vVOF2zp1cOi3Gu-9rRK638ky6mH247TElFKZsnbdIWOieGkZQPqzycYqFfMDFwRV4g7n7YMvViwfRQaauUG4zSYwCdqYBaXZFG0HIhYteq4b4eK149GG5DfXK0a4bbiAi20A7V8Y/s1600/badaSDK2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiChw_vVOF2zp1cOi3Gu-9rRK638ky6mH247TElFKZsnbdIWOieGkZQPqzycYqFfMDFwRV4g7n7YMvViwfRQaauUG4zSYwCdqYBaXZFG0HIhYteq4b4eK149GG5DfXK0a4bbiAi20A7V8Y/s320/badaSDK2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Na załączony zrzucie ekranowym widać aplikację dla sklepu WAC. Samsung ciągle się przy tym trzyma. Rozpoczynał z BONDI na LiMo ale LiMo porzucił. Mam nadzieję, iż BadaOs nie porzuci, wszak dorobił się wersji 2 pomimo, iż LiMo mamy już w wersji 4.</content><link rel='replies' type='application/atom+xml' href='http://adnotacja.blogspot.com/feeds/7777061691683786685/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5262794852276216895/7777061691683786685' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7777061691683786685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5262794852276216895/posts/default/7777061691683786685'/><link rel='alternate' type='text/html' href='http://adnotacja.blogspot.com/2011/07/mam-badaos-sdk-v-201b.html' title='Mam BadaOS SDK v 2.0.1b!'/><author><name>m1k0</name><uri>http://www.blogger.com/profile/04797259056078234848</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiChw_vVOF2zp1cOi3Gu-9rRK638ky6mH247TElFKZsnbdIWOieGkZQPqzycYqFfMDFwRV4g7n7YMvViwfRQaauUG4zSYwCdqYBaXZFG0HIhYteq4b4eK149GG5DfXK0a4bbiAi20A7V8Y/s72-c/badaSDK2.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>