background preloader

VM Spec

VM Spec
Java SE 9 The Java Language Specification, Java SE 9 Edition The Java Virtual Machine Specification, Java SE 9 Edition Java SE 8 The Java Language Specification, Java SE 8 Edition The Java Virtual Machine Specification, Java SE 8 Edition Java SE 7 The Java Language Specification, Java SE 7 Edition The Java Virtual Machine Specification, Java SE 7 Edition HTML | PDF | Update (March 2015) Java SE 6 The Java Language Specification, Third Edition The Java Virtual Machine Specification, Second Edition HTML | Update (SE 5.0) | Update (SE 6) | Update (March 2015)

Understanding JVM Performance - It is Fast - Very Fast! JVM code can be just as fast as the equivalent native code. This might come as a shock to some people. Yes - JVM code (like Java or COBOL) can the same speed as native code (like C++ or COBOL). This is generally true. However, in this case I am looking at batch processing, a type of programming which is very common in commercial settings. The nature of traditional batch runs on distributed (non mainframe) hardware means that lots of short run processes are utilised. To demonstrate just how fast JVM programs can be requires overcoming a number of challenges: The Challenges: The first challenge in proving something like this has been the lack of directly comparable languages. As a senior principal developer in the JVM COBOL team at Micro Focus, I am in an almost unique position to compare our battle hardened native COBOL compiler with our soon to be general availability JVM COBOL compiler. The Approach: Javascript comes to the rescue. You can do amazing things with Rhino and JVM COBOL.

Oracle face à la révolte des clients Java suite aux changements de prix : seul 1 client sur 10 souhaite rester, la proportion de ceux qui souhaitent quitter Oracle a atteint 92 % en France et 95 % en Allemagne Oracle augmente fortement le prix des licences Java, s'appuyant désormais sur le nombre d'employés et non de processeurs.Une entreprise qualifie de « prédatrices » les stratégies d'Oracle Oracle est accusé de tactiques de licence « prédatrices » après avoir apporté des modifications au modèle d'abonnement Oracle Java SE qui pourraient obliger les entreprises à payer des dizaines de milliers de dollars de plus chaque mois pour se servir du même logiciel. Les experts du secteur ont souligné que les entreprises ayant une utilisation limitée de Java devraient fournir une licence par employé dans le cadre du nouveau modèle, un changement radical par rapport à celui qu'Oracle leur offrait auparavant qui était plutôt une facturation par utilisateur ou par processeur. Depuis le 23 janvier 2023, Oracle a remplacé les abonnements Oracle Java SE couramment achetés par les clients par un nouvel abonnement Oracle Java SE Universal. Envoyé par Oracle Les réactions des professionnels

C#-VSLP vs J-VSPL, Interesting Stuff Shown Up VSPL - So simple an amoeba can understand it! A Report Of VSPL From C# To Java Gives Some Surprising Results I need a cross platform, easy to use, multi-threaded test system. VSLP has involved into a powerful testing tool, so I just wanted the lastes version in Java rather than C#. The port was really simple. In the port a changes the syntax of VSPL a little, {} replaced [] and : replaced >. I also replaced some of the operator names to make them more consistent (e.g. concat -> $cat). With no optimization, my standard speed test VSPL program produced the following results (green means faster than C# and red means slower - see later for the C# results). But that was not fair so I used JRat (which is really cool - see here to do a little bit of optimization. Now we can see that J-VSPL is running faster in most tests than the C# equivalent. The troublesome tests are marked in pink. Native Binding With JNA The thing I am aiming to test with VSPL is all native C.

Apprendre à créer une application JavaFX avec Kotlin, un billet blog de bouye Salut, ça faisait longtemps ! Il faut dire que le COVID, plusieurs confinements, et des changements de règles coté boulot ont fait que poster sur un blog était devenu peu pratique. De plus, ces dernières années, mon rôle se limite plutôt à faire de l’administration système que du développement. Il n'aura échappé à personne que, ces derniers temps, Java semble être, euh, au creux de la vague... et ce pour diverses raisons sur lesquelles nous ne nous étendrons pas. Bien que Kotlin de JetBrains existe depuis 2011, ce n'est que depuis 2019 qu'il a pris son essor quand Google a décidé d'en faire le langage de développement préféré pour Android. Prérequis Vous avez besoin de : Installez ensuite IntelliJ IDEA, puis lancez l'IDE. Création du projet Sur l’écran d’accueil, optez pour la création d'un nouveau projet vide en faisant New Project mais ne choissisez pas un générateur prédéfini. Au niveau du projet, basculez désormais sur les réglages Modules, puis dans l'onglet Dependancies. La suite ?

JDK: DirectByteBuffers Seem V.Slow On Sun JDK Recently I have been working on the next (GA) release of JVM COBOL from Micro Focus. Hidden away in the guts of part of this system is some JNI. It was using DirectByteBuffers, which are supposed to be the best way to pass blocks of memory from managed to native code. But they are slow! The end of the story is that I found a better way of implementing the functionality which did not require DirectByteBuffers. I am also sure there are situations where they are great. Here is the result: java bbTest Time to 100000 direct byte buffers is: +0000000933 Time to 100000 byte arrays is: +0000000109 That is quite a big difference! Stub + native Method 26.5% 0 + 44 sun.misc.Unsafe.setMemory 21.1% 0 + 35 sun.misc.Unsafe.allocateMemory 9.0% 0 + 15 sun.misc.Unsafe.copyMemory 56.6% 0 + 94 Total stub I went to the source code for DirectByteBuffer and in it we can see the calls to sun.misc.Unsafe.

Développement d'applications mobiles avec Java (Android) : Cours Apprenez à programmer en Java complet, de la logique de programmation à l'avancé | Cursa Le développement d'applications mobiles est devenu l'un des domaines les plus prometteurs et les plus recherchés dans le monde de la programmation. Avec la popularisation des smartphones, la demande d'applications innovantes et fonctionnelles augmente chaque jour. Java, l'un des langages de programmation les plus utilisés au monde, est un excellent choix pour ceux qui souhaitent se lancer dans le développement d'applications pour Android, le système d'exploitation mobile le plus répandu au monde. Présentation de l'environnement de développement Android Avant de commencer la programmation, vous devez configurer l'environnement de développement. Pour installer Android Studio, accédez simplement au site Web officiel d'Android et suivez les instructions d'installation correspondant à votre système d'exploitation. Principes de base de la programmation Android avec Java Développer pour Android avec Java signifie comprendre les éléments fondamentaux de la plate-forme Android. Gestion des données

A High speed variable look up data structure for Java based dynamic languages As part of VSPL I need a way to store variables which is very fast but dynamic. Here is a simple Java implementation. Variables in VSPL (and most lazy, dynamic languages) are represented as Strings and do not have to be declaired before they are used. This is especially so in VSPL where the context in which a variable is used it not known 'up front' due to passing functions and closures around freely at runtime. In the above, the variable 'myVar' gets created twice in two different enclosing contexts. The simple way (as how I did this to start with) is to store variable values in some map which is keyed by the source code's name for the variable. Load the reference to the root node of the tree. We can see that the problems are: We are using multiple objects in key finding and these objects are scattered throughout the memory. A Solution The first realization is that variables do not have to be represented at runtime by the strings by which they are represented in the source.

Le développement avec Java : le tutorial développons en Java et développons en Java avec Eclipse Java est un langage de développement créé par Sun puis racheté par Oracle en 2010 qui a réussi à obtenir une très grande notoriété en seulement quelques années grâce à ses qualités. Aujourd'hui, Java est largement utilisé notamment en entreprise et pour les applications pour appareils mobiles. Java représente la synthèse des bons côtés de plusieurs langages de programmation (notamment C++ et SmallTalk). J'ai découvert Java avec sa version 1.0 mais j'ai réellement commencé à utiliser pleinement Java avec sa version 1.1. Pour partager ma connaissance de ce langage de développement, je vous propose deux didacticiels.

A canyon size flaw in at the heart of C# and Java. C# and Java are starting to show their age. Here is one example at the most fundamental level of these two languages. Both C# and Java inherit a lot of their syntactic and semantic structure from C. However, they enforce a very different programming paradigm than that in which C is normally written. This forces C# and Java to be asymmetric and flawed in a way which causes constant trouble, considerable performance issues (especially for Java) but which is not seen by most developers due to them not having realised that alternatives exist. Let us first consider C. This is perfect for functions which are quite mathematical in nature. The most common paradigm for managing polyadic returning functions in C is to pass parameters in by reference. Both Java and C# have a build in exception handling system. class A { public MyClass myObject; } class B { public void myObjectFactory(A ret) { ret.myObject=new MyClass(); } }

Java dans le développement mobile. Technologies, exigences professionnelles et salaires moyens des développeurs Java Mobile Bien que Java, le langage de programmation, soit largement utilisé dans de multiples domaines technologiques et à des fins diverses, le développement mobile est celui où sa position a toujours été forte et son importance pour le marché indiscutable. Java était le langage par défaut de la plate-forme Android depuis son lancement en 2008, la plate-forme elle-même a été écrite en Java, et ce langage est toujours considéré comme le cœur et préféré des développeurs Android. Même si Google a introduit Kotlin pour le développement Android en 2017, Java reste le langage le plus populaire dans ce domaine, où la demande de développeurs Java est toujours élevée. Aujourd'hui, nous allons donc examiner le développement mobile en tant que domaine professionnel pour les développeurs Java, ce que vous devez savoir sur ce marché, les qualifications que vous devez avoir pour obtenir un emploi et les types de salaire que vous pouvez vous attendre à obtenir en tant que développeur Java. Développeur mobile.

Tuning The JVM For Unusual Uses - Have Some Tricks Under Your Hat Knowing a little more about the guts of the JVM can make a huge difference, especially if you are coding off the beaten track.Speed counts!I have been working with Java all the way from Java 1.0 whilst I was as post doc' at Zurich University. Back then I used Java to create simple molecular visualisation applet for web-browsers. People often think of Java being compiled to Byte Code and the Byte Code being interpreted. With JIT (hotspot etc.) a common misconception sprung up that some code was just in time compiled whilst the rest was interpreted. The real situation is that all code is interpreted, at least to start with (with one exception - see below). Separating the JVM From Java The Java Virtual Machine (JVM) was designed to work with Java. Traversing The Code Graph In my little example above the effect of not compiling huge methods was much bigger than I originally expected; what is more, the understanding which came from learning why has proved invaluable since! Some final thoughts

COBOL vs JAVA for financial calculations For Financial Calculations COBOL Is Still The Queen Of All Languages - Here Is A Worked Demonstration And Explanation COBOL has evolved in a business centric environment. As the language has developed it has done so to support financial calculations. Financial calculations are either right or wrong, there is no in-between. COBOL handles these notions right in the program syntax. Often, people will say things like "You can just use double precision floating-point. COBOL also has floating-point mathematics. It computes a 25 year investment based on a particular interest rate which is given as the yearly interest rate but actually computed and added to the balance each day. This program below performs the same calculations with both floating-point and exact arithmetic: program-id. When run, using the Micro Focus Visual COBOL IDE... ...this program runs many calculations giving the yield from different starting balances. So, can we take the get-yield-exact COBOL program and port it to Java?

Related: