Difference between revisions of "Java"

From Chessprogramming wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 35: Line 35:
 
* [https://dblp.uni-trier.de/pers/hd/y/Yang:Yue Yue Yang], [https://dblp.uni-trier.de/pers/hd/g/Gopalakrishnan:Ganesh Ganesh Gopalakrishnan], [[Gary Lindstrom]] ('''2002'''). ''Specifying Java Thread Semantics Using a Uniform Memory Model''. [https://dblp.uni-trier.de/db/conf/java/java2002.html Java Grande 2002], [http://formalverification.cs.utah.edu/yyang/papers/umm_old.pdf pdf]
 
* [https://dblp.uni-trier.de/pers/hd/y/Yang:Yue Yue Yang], [https://dblp.uni-trier.de/pers/hd/g/Gopalakrishnan:Ganesh Ganesh Gopalakrishnan], [[Gary Lindstrom]] ('''2002'''). ''Specifying Java Thread Semantics Using a Uniform Memory Model''. [https://dblp.uni-trier.de/db/conf/java/java2002.html Java Grande 2002], [http://formalverification.cs.utah.edu/yyang/papers/umm_old.pdf pdf]
 
* [[Andrew Appel]], [https://dblp.uni-trier.de/pers/hd/p/Palsberg:Jens Jens Palsberg] ('''2002'''). ''[http://www.cambridge.org/catalogue/catalogue.asp?isbn=9780521820608 Modern Compiler Implementation in Java]''. 2nd edition, [https://en.wikipedia.org/wiki/Cambridge_University_Press Cambridge University Press]
 
* [[Andrew Appel]], [https://dblp.uni-trier.de/pers/hd/p/Palsberg:Jens Jens Palsberg] ('''2002'''). ''[http://www.cambridge.org/catalogue/catalogue.asp?isbn=9780521820608 Modern Compiler Implementation in Java]''. 2nd edition, [https://en.wikipedia.org/wiki/Cambridge_University_Press Cambridge University Press]
 +
* [https://dblp.uni-trier.de/pers/hd/k/Kerr:Amy_J= Amy J. Kerr], [[Todd W. Neller]], [https://dblp.uni-trier.de/pers/hd/p/Pilla:Christopher_J=_La Christopher J. La Pilla] , [https://dblp.uni-trier.de/pers/hd/s/Schompert:Michael_D= Michael D. Schompert] ('''2002'''). ''[https://www.semanticscholar.org/paper/Java-Resources-for-Teaching-Reinforcement-Learning-Kerr-Neller/3d84018eb8b8668c13d1d4f6efca4442af2915b4 Java Resources for Teaching Reinforcement Learning]''. [https://dblp.uni-trier.de/db/conf/pdpta/pdpta2003-3.html PDPTA 2003] » [[Reinforcement Learning]]
 
* [[Liwu Li]] ('''2004'''). ''[http://www.jot.fm/contents/issue_2004_07/article2.html Extending the Java Language with Dynamic Classification]''.  [https://en.wikipedia.org/wiki/The_Journal_of_Object_Technology Journal of Object Technology], Vol. 3, No 7
 
* [[Liwu Li]] ('''2004'''). ''[http://www.jot.fm/contents/issue_2004_07/article2.html Extending the Java Language with Dynamic Classification]''.  [https://en.wikipedia.org/wiki/The_Journal_of_Object_Technology Journal of Object Technology], Vol. 3, No 7
 
==2005 ...==
 
==2005 ...==
Line 68: Line 69:
 
* <span id="9"></span>[http://www.talkchess.com/forum/viewtopic.php?t=65718 Java problem!] by [[Günther Simon]], [[CCC]], November 13, 2017
 
* <span id="9"></span>[http://www.talkchess.com/forum/viewtopic.php?t=65718 Java problem!] by [[Günther Simon]], [[CCC]], November 13, 2017
 
* [http://www.talkchess.com/forum/viewtopic.php?t=65724 Bitboards and Java] by [[Fred Hamilton]], [[CCC]], November 14, 2017 » [[Bitboards]]
 
* [http://www.talkchess.com/forum/viewtopic.php?t=65724 Bitboards and Java] by [[Fred Hamilton]], [[CCC]], November 14, 2017 » [[Bitboards]]
 +
==2020 ...==
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74256 Java vs C. It's not like one would think] by [[Oliver Brausch]], [[CCC]], June 22, 2020 » [[OliThink]], [[C]]
  
 
=External Links=
 
=External Links=

Latest revision as of 19:19, 22 June 2020

Home * Programming * Languages * Java

Java has been developed by Sun Microsystems since 1991 and is mostly connected with James Gosling. The aim was to design a language that uses as virtual machine and is thus capable to run on any OS. The initial goal was that Java can be also used to control all devices as coffee machines. But he the fact that Java was quite free and OS independent has made Java very popular [1]. And so the environment has grown to several platforms for normal programming (SE), Enterprise Programming (EE) and Mobile Programming (ME). The most important aspect is that Java compiles to a bytecode. And this bytecode is then interpreted by virtual machine, or JIT compiled. And Java is a object oriented language with a lot of additional feature as a good security concept, reflection, annotations, generics, etc. For chess programming Java has lots of advantages but also some disadvantages.

Advantages

  • The usage of a virtual machine makes Java chess programs able to run on any OS as Windows or Linux.
  • Java uses garbage collection. So the programmer doesn't need to care of memory allocation and freeing.
  • The Java Ecosystem is very big. There are millions of free tools as IDEs (Eclipse, NetBeans), TestTools, Profilers, CodeCoverage, Error- and Architecture Checkers, automatic BuildSystems, and so on...
  • Java is a good OO language with lots of modern features and tools like embedded databases (db4o, hsqldb, H2, etc.) that might be useful for chess openings.

Disadvantages

  • Java was long time called a slow engine. Especially by game developers who needed fast graphics speed. In fact Java wasn't designed to deliver fast graphics. But on the other hand Java is not that slow as most people expected. It is one of the fastest vm languages available. A look on benchmarks like the shootout shows that Java is fast. Unfortunately it is about 2-10 times slower that pure C or C++. So in order to have the best engine performance, most developers tend to use C and C++ and not Java.
  • The Java environment can not easily generate *.exe files that represent chess engines. So a bat file has to be called to run the java vm. And this can make trouble in some Chess GUIs.
  • Java has no unsigned long data type that is e.g. used by bitboards. Thus one has to use unsigned right shift operator >>> [2] [3].
  • The Java garbage collector makes ram usage and the response time a little non-deterministic. But this is mostly not regarded as a real problem for chess developers.

Java Engines

See also

Books & Papers

1995 ...

2000 ...

2005 ...

2010 ...

Forum Posts

1997 ...

2000 ...

2010 ...

Re: Yes by Roland Stuckardt, CCC, February 24, 2014 » Fischerle

2020 ...

External Links

Language

Chess Libraries

Video Tutorials

References

Up one Level