• In chevron_right

      Java proposal would scrap sun.misc.Unsafe memory access

      pubsub.slavino.sk / infoworldcom · Wednesday, 31 January - 19:22 edit

    The memory access methods of Java’s sun.misc.Unsafe class would be deprecated for removal in a future release of the platform, under a JEP (JDK Enhancement Proposal) afoot in the OpenJDK community. Of the class’s 87 methods, 79 would be removed.

    These unsupported methods have had supported replacements since JDK 9 , for accessing on-heap memory, and JDK 22 , for accessing off-heap memory, the proposal states. Library developers are strongly encouraged to migrate from sun.misc.Unsafe to these supported replacements. Goals of the proposal include preparing for the removal of these memory access methods in a future Java release and helping developers know when their applications rely on them. It is not a goal of the proposal to remove the sun.misc.Unsafe class entirely, as a small number of its methods are not used for memory access and will remain undeprecated.

    To read this article in full, please click here


    Značky: #Rozne, #Java

    • In chevron_right

      Machine learning for Java developers: Machine learning data pipelines

      pubsub.slavino.sk / infoworldcom · Wednesday, 31 January - 10:00 edit

    The article, Machine learning for Java developers: Algorithms for machine learning , introduced setting up a machine learning algorithm and developing a prediction function in Java. Readers learned the inner workings of a machine learning algorithm and walked through the process of developing and training a model. This article picks up where that one left off. You'll get a quick introduction to Weka, a machine learning framework for Java. Then, you'll see how to set up a machine learning data pipeline, with a step-by-step process for taking your machine learning model from development into production. We'll also briefly discuss how to use Docker containers and REST to deploy a trained ML model in a Java-based production environment.

    To read this article in full, please click here


    Značky: #Rozne, #Java, #Containers

    • In chevron_right

      Java proposal would streamline record creation

      pubsub.slavino.sk / infoworldcom · Monday, 29 January - 20:29 edit

    In an effort to streamline code, Java would be enhanced with derived record creation, via a proposal that would provide a means to create record instances from existing records through a block of transformation code.

    The OpenJDK proposal authored by Oracle technical staff, titled “Derived Record Creation,” would streamlinescode by deriving a new record from an existing record, updating only components that need to change. The proposal notes that because records are immutable values, developers frequently build new records to reflect new data. The feature would enter Java in a preview state.

    To read this article in full, please click here


    Značky: #Rozne, #Java

    • In chevron_right

      JDK 22: The new features in Java 22

      pubsub.slavino.sk / infoworldcom · Friday, 19 January - 00:00 edit

    Java Development Kit 22, due in March 2024 as the next version of Java Standard Edition, will include 12 features, with a second preview of scoped values and a preview of stream gatherers being the last additions.

    JDK 22 reached the rampdown one phase, with the feature set frozen, on December 7, 2023, and entered rampdown phase two on January 18, 2024. General availability is set for March 19, with two release candidates planned for February. Bugs will be examined between now and the general release.

    Scoped values enable the safe and efficient sharing of immutable data within and across threads. These are preferred to thread-local variables, especially when using large numbers of thread variables. Goals include ease of use, comprehensibility, robustness, and performance.

    To read this article in full, please click here


    Značky: #Java, #Rozne

    • In chevron_right

      11 reasons the new Java is not like the old Java

      pubsub.slavino.sk / infoworldcom · Monday, 15 January - 10:00 edit

    Is Java ancient yet? The kind of programming language used by old timers who prattle on about front panels with blinking lights and the days of floppy disks? Or is it still hip, with all the latest language enhancements for intuitive coding and top-notch performance? Maybe Java is somewhere in between: a mature language, but young at heart.

    Close to 30 years ago on May 23, 1995, Java officially entered the world. It began as an enabling technology called “Oak” for a set-top box that Sun Microsystems imagined would soon colonize the American living room. That plan didn't work out, not at first, anyway. But the language grew into one of the core foundations for modern software, running on everything from tiny sensor chips to large server boxes.

    To read this article in full, please click here


    Značky: #Java, #Rozne

    • In chevron_right

      How to copy objects in Java: Shallow copy and deep copy

      pubsub.slavino.sk / infoworldcom · Thursday, 4 January - 10:00 edit

    Copying objects is a common operation in enterprise projects. When copying an object, we must ensure that we end up with a new instance that holds the values we want.

    Domain objects are usually complex. Making a copy with the root object and composed objects is also not trivial.

    Let's explore the most effective ways to copy an object using shallow and deep copy techniques.

    Object references

    To correctly perform a shallow or deep object copy, we must first know what not to do. Understanding object references is essential for using shallow and deep copy techniques.

    When making a copy of an object, it is important to avoid using the same object reference. It's an easy mistake, as this example shows. To start, here's the Product object we'll use in our examples:

    To read this article in full, please click here


    Značky: #Rozne, #Java

    • In chevron_right

      Java persistence with JPA and Hibernate: Persisting data to a database

      pubsub.slavino.sk / infoworldcom · Wednesday, 27 December - 10:00 edit

    In this second half of the Java persistence with JPA and Hibernate tutorial, we move past concepts and start writing code that persists data to and from a relational database using JPA with Hibernate. We'll start by configuring an example application to use Hibernate as the JPA provider, then quickly configure the EntityManager and write two classes that we want to persist to the database: Book and Author . Finally, we'll write a simple application that pulls together all the application components and successfully persists our two entities to the database.

    To read this article in full, please click here


    Značky: #Java, #Rozne, #APIs

    • In chevron_right

      Java persistence with JPA and Hibernate: Entities and relationships

      pubsub.slavino.sk / infoworldcom · Wednesday, 20 December - 10:00 edit

    The Jakarta Persistence API (JPA) is a Java specification that bridges the gap between relational databases and object-oriented programming. This two-part tutorial introduces JPA and explains how Java objects are modeled as JPA entities, how entity relationships are defined, and how to use JPA's EntityManager with the Repository pattern in your Java applications. This gives you all the basics for saving and loading application state.

    Note that this tutorial uses Hibernate as the JPA provider. Most concepts can be extended to other Java persistence frameworks.

    To read this article in full, please click here


    Značky: #Database, #Rozne, #Java

    • chevron_right

      IBM’s generative AI tool aims to refactor ancient COBOL code for its mainframes

      news.movim.eu / ArsTechnica · Wednesday, 23 August, 2023 - 16:34

    COBOL 73 running on an IRS computer in an emulator

    Enlarge / COBOL 73, as seen (inside Windows) in the IRS's Austin, Texas, offices in 2022. (credit: Washington Post / Getty Images)

    There are hundreds of billions of lines of COBOL code running on production systems worldwide. That's not ideal for a language over 60 years old and whose primary architects are mostly retired or dead.

    IBM, eager to keep those legacy functions on its Z mainframe systems , wants that code rewritten in Java. It tried getting humans to do it a few years back, but now it has another idea. Yes, you guessed it: It's putting AI on the job.

    The IBM watsonx Code Assistant , slated to be available in Q4 this year, intends to keep humans in the mix, but with a push from generative AI in analyzing, refactoring, and testing the new object-oriented code. It's not an all-or-nothing process, either, as IBM claims that watsonx-generated code should be interoperable with COBOL and certain Z mainframe functions.

    Read 5 remaining paragraphs | Comments