Sorry

This feed does not validate.

In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://blog.jetbrains.com/idea/feed/

  1. <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
  2. xmlns:content="http://purl.org/rss/1.0/modules/content/"
  3. xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  4. xmlns:dc="http://purl.org/dc/elements/1.1/"
  5. xmlns:atom="http://www.w3.org/2005/Atom"
  6. xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  7. xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  8. xmlns:media="http://search.yahoo.com/mrss/" >
  9.  
  10. <channel>
  11. <title>IntelliJ IDEA : IntelliJ IDEA – the IDE for Professional Development in Java and Kotlin | The JetBrains Blog</title>
  12. <atom:link href="https://blog.jetbrains.com/idea/feed/" rel="self" type="application/rss+xml" />
  13. <link>https://blog.jetbrains.com</link>
  14. <description>Developer Tools for Professionals and Teams</description>
  15. <lastBuildDate>Tue, 01 Jul 2025 12:12:13 +0000</lastBuildDate>
  16. <language>en-US</language>
  17. <sy:updatePeriod>
  18. hourly </sy:updatePeriod>
  19. <sy:updateFrequency>
  20. 1 </sy:updateFrequency>
  21.  
  22. <image>
  23. <url>https://blog.jetbrains.com/wp-content/uploads/2024/01/cropped-mstile-310x310-1-32x32.png</url>
  24. <title>IntelliJ IDEA : IntelliJ IDEA – the IDE for Professional Development in Java and Kotlin | The JetBrains Blog</title>
  25. <link>https://blog.jetbrains.com</link>
  26. <width>32</width>
  27. <height>32</height>
  28. </image>
  29. <item>
  30. <title>Module Import Declarations: No More Import Hell </title>
  31. <link>https://blog.jetbrains.com/idea/2025/07/module-import-declarations-no-more-import-hell/</link>
  32. <dc:creator><![CDATA[Mala Gupta]]></dc:creator>
  33. <pubDate>Tue, 01 Jul 2025 11:05:32 +0000</pubDate>
  34. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-social-BlogFeatured-1280x720-2x-2.png</featuredImage> <category><![CDATA[tutorials]]></category>
  35. <category><![CDATA[java25]]></category>
  36. <category><![CDATA[module-import-declarations]]></category>
  37. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=573921</guid>
  38.  
  39. <description><![CDATA[Imagine you are proud of yourself for creating an amazing Java application, framework, or a library. You open one of its source files to make some changes and this is what you see: While looking at this long list of imports, are you wondering why you need to know the name of every single class [&#8230;]]]></description>
  40. <content:encoded><![CDATA[
  41. <p>Imagine you are proud of yourself for creating an amazing Java application, framework, or a library. You open one of its source files to make some changes and this is what you see:</p>
  42.  
  43.  
  44.  
  45. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import java.lang.reflect.*;
  46. import java.nio.file.Path;
  47. import java.io.BufferedReader;
  48. import java.io.InputStreamReader;
  49. import java.util.ArrayList;
  50. import java.util.List;
  51. import java.util.stream.Collector;
  52. import java.util.concurrent.CompletableFuture;
  53. import java.util.concurrent.locks.ReadWiteLock;
  54. import java.time.LocalDateTime;
  55. // more import statements</pre>
  56.  
  57.  
  58.  
  59. <p>While looking at this long list of imports, are you wondering why you need to know the name of every single class or interface used in your class (apart from its configuration)? It seems like a cognitive load to me. Most of the developers I know collapse this section in their IDE and don’t bother expanding it.</p>
  60.  
  61.  
  62.  
  63. <p>The business logic in this source file probably starts after line twenty. Can you do something about it because importing packages won’t help much. Don’t worry, <a href="https://openjdk.org/jeps/511" target="_blank" rel="noopener">Module Import Declarations</a> can help address this import hell for you.</p>
  64.  
  65.  
  66.  
  67. <h2 class="wp-block-heading">What is ‘Module Import Declarations’?</h2>
  68.  
  69.  
  70.  
  71. <p>Introduced as a preview feature in Java 23 and a production feature in Java 25, <a href="https://openjdk.org/jeps/511" target="_blank" rel="noopener">Module import declarations</a> enable you to import an entire module using a single import statement. In the above example, you can replace all the import statements with the following line of code, since all those packages are defined as part of the <code>java.base</code> module:</p>
  72.  
  73.  
  74.  
  75. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import module java.base.*;</pre>
  76.  
  77.  
  78.  
  79. <p>Yes, just one line of code. The source file can now use <code>List</code>, <code>Map</code>, <code>Stream</code>, <code>Path</code>, and many more classes. As a developer, you no longer need to think about which package they live in. With this single statement, you can import all of the packages exported by the module <code>java.base</code>.</p>
  80.  
  81.  
  82.  
  83. <h2 class="wp-block-heading">Why should you care about this feature?</h2>
  84.  
  85.  
  86.  
  87. <p>Apart from the obvious benefits of concise code and escaping from the import hell, this feature helps us developers focus on <i>solving business problems</i> rather than finding the fully qualified names for classes or interfaces to use. Do you think it is worth your time to find out whether the interface <code>Function</code> is defined in the package <code>java.util.function</code> or <code>java.util</code>?. An intelligent IDE such as IntelliJ IDEA helps you to get around it by adding the relevant imports as soon as you use a type in your code (more about it in a later section in this blog post).</p>
  88.  
  89.  
  90.  
  91. <p>It offers <i>convenience</i> for new developers. Imagine you are a new Java developer. Would you prefer having an umbrella import statement so that you need not be bothered about knowing which package defines the commonly used data structures, such as List, Map, or Stream? If you are teaching Java, talking about importing classes interfaces from packages before folks get comfortable using basic data structures could make them lose focus. It would be better for them to get started writing programs that use List and Stream, rather than having them figure out which Java package defines them. Module import declarations help beginners focus on learning Java without getting confused or frustrated by things they don&#8217;t need to worry about yet.</p>
  92.  
  93.  
  94.  
  95. <p>It enables <i>faster prototyping</i>. When we are prototyping, we try to get things to work as quickly as possible. In such cases, an umbrella import statement, such as the import module declaration, lets us jump straight into coding. It also keeps the code concise, cleaner and easier to read when we are using large APIs. But this doesn’t imply that you should define your code in a module to use a module import statement.</p>
  96.  
  97.  
  98.  
  99. <p>Before moving forward, let’s cover the IntelliJ IDEA configurations for using this feature.</p>
  100.  
  101.  
  102.  
  103. <h2 class="wp-block-heading">IntelliJ IDEA Configuration</h2>
  104.  
  105.  
  106.  
  107. <p>Import Module declaration was introduced as a preview feature in Java 23 and IntelliJ IDEA has supported this feature since version 2024.3. In soon to be released Java 25, it becomes a production feature (it is now a permanent language feature, and safe to use in your production code).&nbsp;</p>
  108.  
  109.  
  110.  
  111. <p>Java 25 is scheduled to be released in September 2025. To use this feature as a production feature (without needing the <code>--enable-preview</code> flag during compilation and runtime), you should download the early access version of JDK. You can also do this from IntelliJ IDEA’s settings dialog (Yes! IntelliJ IDEA allows you to download and configure EA versions of the JDK):</p>
  112.  
  113.  
  114.  
  115. <figure class="wp-block-image"><img decoding="async" fetchpriority="high" width="1600" height="742" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image.gif" alt="" class="wp-image-578473"/></figure>
  116.  
  117.  
  118.  
  119. <p>In your Project Settings, set the SDK to Java 25. For the language level, select ‘X &#8211; Experimental features’ on both the Project and Modules tabs. This enables you to use all Java 25 features, including those currently under review. Java 25 is due to be released in September 2025, and we at JetBrains are working on adding more support. New language options will be accessible in IntelliJ IDEA soon.</p>
  120.  
  121.  
  122.  
  123. <h2 class="wp-block-heading">More about Module Import Declarations</h2>
  124.  
  125.  
  126.  
  127. <p>Knowing why we need a feature is the first step to using it. Let’s look at how to use it and also answer some frequently asked questions from developers about this feature.</p>
  128.  
  129.  
  130.  
  131. <h3 class="wp-block-heading">Syntax of Module Import Declarations</h3>
  132.  
  133.  
  134.  
  135. <p>The syntax is simple. It starts with the keyword <code>import</code>, followed by module and the name of the module (without a wildcard, that is, <code>*</code>):</p>
  136.  
  137.  
  138.  
  139. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import module java.base.*;</pre>
  140.  
  141.  
  142.  
  143. <p>This feature doesn’t work with unnamed modules. Revisit the syntax of this feature: it requires you to name the module you want to import. The example in this section imports the <code>java.base</code> module. </p>
  144.  
  145.  
  146.  
  147. <h3 class="wp-block-heading">How to determine the fully qualified name of types in your source code?</h3>
  148.  
  149.  
  150.  
  151. <p>Are you wondering how to determine the fully qualified name of a type or variable in your source code when using import module declarations? This was one of the main reasons for using individual imports in source files. This applies to all types of imports, including wildcard and static imports.</p>
  152.  
  153.  
  154.  
  155. <p>Move your cursor to the type in a variable declaration and use the Quick Documentation feature (Ctrl+Q for Win/Linux, or F1 on macOS) to view a documentation popup that shows the package name at the top, followed by the name and its documentation—without having to open another source file in your editor window. You can also use the Quick Definition feature (Ctrl+Shift+I) to view the fully qualified name, along with the definitions of its members, in a popup window. Alternatively, you can hover over the type using your mouse to view the fully qualified name.</p>
  156.  
  157.  
  158.  
  159. <figure class="wp-block-image size-full"><img decoding="async" width="3228" height="1866" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/fully-qualified-name.gif" alt="" class="wp-image-578101"/></figure>
  160.  
  161.  
  162.  
  163. <p>On a separate note, if you don’t like showing Quick Documentation popups on mouse hover, you can clear the ‘Show quick documentation on hover’ checkbox in the settings (find it using Shift+Shift). If you want to browse the source code of the used type, use the ‘Go to Declaration or Usages’ feature (Ctrl+B / Cmd+B), which opens the source code in a new editor window.</p>
  164.  
  165.  
  166.  
  167. <p>In the next section, let&#8217;s see how to use the import module statement with different libraries or APIs.</p>
  168.  
  169.  
  170.  
  171. <h3 class="wp-block-heading">How to import JUnit 3.8.1 using import module declaration?</h3>
  172.  
  173.  
  174.  
  175. <p>I know it is an old version, but it is still around and in use. How would you import classes and interfaces defined in JUnit 3.8.1 (if you had to) in your source files? To import it using an import module declaration, you must use its module name. The short answer is you cannot because there is no module name for it. JUnit 3.8.1 was created before Java 9 introduced modules.</p>
  176.  
  177.  
  178.  
  179. <p>What about other libraries? How do we find their module names? We usually use build tools, such as Maven, to import dependencies as jar files. If a dependency supports modules, its jar file includes module-info.class (mandatory for modules), which contains the module name. You’ll notice that the JUnit 3.8.1 jar doesn’t include module-info.class.</p>
  180.  
  181.  
  182.  
  183. <p>IntelliJ IDEA users can view module info in <em>External libraries</em>, in the <em>Project Structure </em>window, as&nbsp; shown below:</p>
  184.  
  185.  
  186.  
  187. <figure class="wp-block-image"><img decoding="async" width="1600" height="1268" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image-3.gif" alt="" class="wp-image-578521"/></figure>
  188.  
  189.  
  190.  
  191. <p>Of course, you could ask the AI Chat window in IntelliJ IDEA how to find these module names.</p>
  192.  
  193.  
  194.  
  195. <h3 class="wp-block-heading">Which packages are exported by the modules you import?</h3>
  196.  
  197.  
  198.  
  199. <p>Each module defines a module-info.java file that includes information about the packages that module exports to all modules or to specific other modules.&nbsp;</p>
  200.  
  201.  
  202.  
  203. <p>Let’s try to understand this by checking out what happens when you import the module <code>java.base</code> using IntelliJ IDEA. Click on the module name in the editor or use the relevant shortcut (<em>Go to Declaration</em> or <em>Usages</em>) and you could view the definition of this module to find out all the modules exported by this module. This is shown in the following gif:</p>
  204.  
  205.  
  206.  
  207. <figure class="wp-block-image"><img decoding="async" loading="lazy" width="1600" height="1162" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image-2.gif" alt="" class="wp-image-578509"/></figure>
  208.  
  209.  
  210.  
  211. <p>The public API in these packages are available to source files that import these modules.</p>
  212.  
  213.  
  214.  
  215. <h3 class="wp-block-heading">What do you mean by on-demand import?</h3>
  216.  
  217.  
  218.  
  219. <p>Developers often argue about importing a single class or interface versus importing all public entities by importing a package using a wildcard character. Which of these do you think is better?</p>
  220.  
  221.  
  222.  
  223. <p>When you import a module or a package using a wildcard (*), you import types <em>on demand</em>. This means you can use any public class, interface, or entity from a package or module without importing each one individually.</p>
  224.  
  225.  
  226.  
  227. <p>Often, developers ask if importing a full module increases the size of their .class files. The short answer is no. On-demand imports make all public classes and interfaces in the module available to use in a source file, but the compiler includes only those that are actually used in your code.</p>
  228.  
  229.  
  230.  
  231. <h3 class="wp-block-heading">Name conflicts (compilation error)</h3>
  232.  
  233.  
  234.  
  235. <p>When you import one or more modules, it is possible that packages within the same module or across modules define classes with the same name. For an example, in the example code below, code at line number 5 (Date date;) won’t compile because importing <code>java.base</code> module makes <code>java.util.Date</code> class available, and importing the java.sql module makes java.sql.Date available:</p>
  236.  
  237.  
  238.  
  239. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">1.    import module java.base;  // Makes available java.util.Date
  240. 2.    import module java.sql;   // Makes available java.sql.Date
  241. 3. 
  242. 4.    public class NameConflicts {
  243. 5.        Date date;  // compilation error
  244. 6.    }</pre>
  245.  
  246.  
  247.  
  248. <p>Let’s assume you want to use the Date class from module <em>java.sql</em>. To address this issue, you could either add a single import statement, as follows:</p>
  249.  
  250.  
  251.  
  252. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">1.    import module java.base;  // Makes available java.util.Date
  253. 2.    import module java.sql;   // Makes available java.sql.Date
  254. 3.    import java.sql.Date;
  255. 4.    
  256. 5.    public class NameConflicts {
  257. 6.        Date date;  
  258. 7.    }</pre>
  259.  
  260.  
  261.  
  262. <p>You could also resolve it by using a fully qualified class name, as follows:</p>
  263.  
  264.  
  265.  
  266. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">1.    import module java.base;  // Makes available java.util.Date
  267. 2.    import module java.sql;   // Makes available java.sql.Date
  268. 3. 
  269. 4.    public class NameConflicts {
  270. 5.        java.sql.Date date;  
  271. 6.    }</pre>
  272.  
  273.  
  274.  
  275. <p>IntelliJ IDEA can highlight name conflicts as you type your code. Invoke context actions to view a list of qualified class names (package name + class name) to choose from, as shown below:</p>
  276.  
  277.  
  278.  
  279. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image.gif" alt="" class="wp-image-578455"/></figure>
  280.  
  281.  
  282.  
  283. <p>If you are wondering whether it is a good idea to import modules since it could lead to namespace conflicts, these issues can occur with importing packages too. Don’t worry; it results in a compilation error and can be fixed easily.</p>
  284.  
  285.  
  286.  
  287. <p>Also, a module and one of the packages it includes can have the same name. Notice that the module java.sql contains a package java.sql. The fully qualified name of a class or an interface includes its package name, not the name of the module the package is defined in.</p>
  288.  
  289.  
  290.  
  291. <h3 class="wp-block-heading">Compact Source Files integration</h3>
  292.  
  293.  
  294.  
  295. <p>Gavin Bierman mentioned that the idea of this Import Module Declarations came up while the Java team was working on JEP <a href="https://openjdk.org/jeps/512" target="_blank" rel="noopener">Compact Source Files and Instance main Methods</a>, which aim to reduce the ceremony to learning Java.&nbsp;</p>
  296.  
  297.  
  298.  
  299. <p>Compact source files implicitly import the module <code>java.base</code>. It implies that the new developers can use any public class or interface from the multiple packages exported by the java.base module, without explicit import statements.</p>
  300.  
  301.  
  302.  
  303. <h3 class="wp-block-heading">JShell Integration</h3>
  304.  
  305.  
  306.  
  307. <p>One of the main benefits of using JShell is that it allows you to quickly evaluate expressions, execute code statements or snippets (and much more) without the ceremony of defining classes.</p>
  308.  
  309.  
  310.  
  311. <p>Prior to Import Module Declarations, JShell automatically imported the ten most used packages (and java.lang) so that developers could easily use those classes or interfaces without explicit import statements. However, you still need import statements for classes or interfaces not defined in these packages, such as the <code>LocalDateTime</code> class from the <code>package java.time</code>:</p>
  312.  
  313.  
  314.  
  315. <figure class="wp-block-image is-resized"><img decoding="async" loading="lazy" width="1600" height="1080" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image.png" alt="" class="wp-image-578445" style="aspect-ratio:1.0680907877169559;width:471px;height:auto"/></figure>
  316.  
  317.  
  318.  
  319. <p>With import module declarations, JShell automatically imports the module java.base. This helps developers use many more classes (such as <code>LocalDateTime</code>), without needing explicit import statement, as shown in the following image:</p>
  320.  
  321.  
  322.  
  323. <figure class="wp-block-image is-resized"><img decoding="async" loading="lazy" width="1600" height="1080" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image.png" alt="" class="wp-image-578442" style="aspect-ratio:2.3494860499265786;width:476px;height:auto"/></figure>
  324.  
  325.  
  326.  
  327. <h3 class="wp-block-heading">One import statement to use the entire standard Java API</h3>
  328.  
  329.  
  330.  
  331. <p>By importing the java.se module you can use the entire standard Java API in your source file. Here’s the module information for this module:</p>
  332.  
  333.  
  334.  
  335. <figure class="wp-block-image is-resized"><img decoding="async" loading="lazy" width="1281" height="1600" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image-1.png" alt="" class="wp-image-578461" style="aspect-ratio:0.800625;width:473px;height:auto"/></figure>
  336.  
  337.  
  338.  
  339. <p>The java.se module is an aggregator module. It does not export any package, but requires other modules transitively. In other words, source files importing java.se import the packages exported by modules that are marked required transitive in <a href="http://java.se" target="_blank" rel="noopener">java.se</a>.</p>
  340.  
  341.  
  342.  
  343. <h3 class="wp-block-heading">Interview with creators of this feature</h3>
  344.  
  345.  
  346.  
  347. <p>We also <a href="https://youtu.be/mSYA3cZ5o6c" target="_blank" rel="noopener">interviewed</a> the owner of this feature, <a href="https://x.com/GavinBierman" target="_blank">Gavin Bierman</a>, Programming Language Designer at Oracle.</p>
  348.  
  349.  
  350.  
  351. <figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
  352. <iframe loading="lazy" title="JEP Explained. JEP 476: Module Import Declarations" width="500" height="281" src="https://www.youtube.com/embed/mSYA3cZ5o6c?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
  353. </div></figure>
  354.  
  355.  
  356.  
  357. <p><a href="https://youtu.be/mSYA3cZ5o6c" target="_blank" rel="noopener"></a></p>
  358.  
  359.  
  360.  
  361. <p>Gavin mentioned that this feature was co-developed with the JEP <a href="https://openjdk.org/jeps/512" target="_blank" rel="noopener">Compact Source Files and Instance Main Methods</a>. He covered the differences between single-type imports and type-import-on-demand declarations, explaining what they are and why individuals and organizations prefer one style over the other. He also talked about how the “Module Import Declarations” feature automatically imports on demand from transitive dependencies of modules. He discussed ambiguous imports and how to deal with them, name ambiguity, and how to submit relevant feedback on this feature to the teams at OpenJDK.</p>
  362.  
  363.  
  364.  
  365. <h2 class="wp-block-heading">Practical Tips</h2>
  366.  
  367.  
  368.  
  369. <p>Practical tips and wisdom are always useful when using a feature.</p>
  370.  
  371.  
  372.  
  373. <h3 class="wp-block-heading">Migrating your codebases to use import module declarations</h3>
  374.  
  375.  
  376.  
  377. <p>I’d recommend not replacing all the individual import statements or package statements with import module statements in your codebase. Try module imports in new files or when you&#8217;re already touching existing code.</p>
  378.  
  379.  
  380.  
  381. <p>This feature is syntactic sugar; it makes your code more readable but doesn’t offer any performance benefits. The folks who maintain your code are more important than using the latest shiny features in your codebase. If they understand the code in its existing format, respect that.</p>
  382.  
  383.  
  384.  
  385. <h3 class="wp-block-heading">Group Your Imports</h3>
  386.  
  387.  
  388.  
  389. <p>With module imports, Java offers multiple types of imports, such as, importing modules, importing packages, importing classes/interfaces, and static imports of fields or methods. Grouping imports could make them more readable.</p>
  390.  
  391.  
  392.  
  393. <h3 class="wp-block-heading">IntelliJ IDEA supports importing types as you type them</h3>
  394.  
  395.  
  396.  
  397. <p>Whether you are copy-pasting code or typing it, IntelliJ IDEA adds the relevant imports to your codebase, either automatically or by prompting you to select the correct version to import, as shown in the following gif:</p>
  398.  
  399.  
  400.  
  401. <figure class="wp-block-image"><img decoding="async" loading="lazy" width="1600" height="1047" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image-1.gif" alt="" class="wp-image-578474"/></figure>
  402.  
  403.  
  404.  
  405. <p>Just in case, the preceding settings don’t work for you, ensure you have enabled the relevant import settings in ‘<em>Intentions</em>’ (use IntelliJ IDEA <em>Settings</em>), as follows:</p>
  406.  
  407.  
  408.  
  409. <figure class="wp-block-image"><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/07/image.png" alt="" class="wp-image-578453"/></figure>
  410.  
  411.  
  412.  
  413. <p>If you haven’t been using this feature in IntelliJ IDEA, you are missing out on a great user experience.</p>
  414.  
  415.  
  416.  
  417. <h2 class="wp-block-heading">Summary</h2>
  418.  
  419.  
  420.  
  421. <p>Introduced as a preview feature in Java 23 and a production feature in Java 25, <a href="https://openjdk.org/jeps/511" target="_blank" rel="noopener">Module Import Declarations</a> allow importing an entire module with a single import statement.</p>
  422.  
  423.  
  424.  
  425. <p>Apart from the obvious benefits of replacing multiple import statements with a single import, this feature helps us developers escape import hell. It works only with named modules, not unnamed ones or older libraries without module definitions (such as JUnit 3.8.1). Classes and interfaces are imported on demand. Importing a module makes its public classes/interfaces available, but only those actually used are included by the compiler. Importing multiple modules might lead to class name conflicts, requiring specific imports or fully qualified names.</p>
  426.  
  427.  
  428.  
  429. <p>JShell and compact source files automatically import java.base with this feature. If you want to extend it, try importing the java.se module, which provides access to the entire standard Java API. The release of Java 25 is scheduled for September, but IntelliJ IDEA already supports this feature. Try it out and let us know your feedback.</p>
  430.  
  431.  
  432.  
  433. <p>Happy coding.</p>
  434. ]]></content:encoded>
  435. </item>
  436. <item>
  437. <title>Demystifying Spring Boot With Spring Debugger</title>
  438. <link>https://blog.jetbrains.com/idea/2025/06/demystifying-spring-boot-with-spring-debugger/</link>
  439. <dc:creator><![CDATA[Andrey Belyaev]]></dc:creator>
  440. <pubDate>Wed, 25 Jun 2025 07:22:11 +0000</pubDate>
  441. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-social-BlogFeatured-1280x720-2x-5.png</featuredImage> <category><![CDATA[tutorials]]></category>
  442. <category><![CDATA[debug]]></category>
  443. <category><![CDATA[intellij-idea]]></category>
  444. <category><![CDATA[spring-boot]]></category>
  445. <category><![CDATA[spring-debugger]]></category>
  446. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=577488</guid>
  447.  
  448. <description><![CDATA[Spring Boot is a marvel of developer productivity. It hides the plumbing and gets you up and running fast. Components are &#8220;miraculously” autowired, properties are “magically” resolved, and database connections materialize seemingly without explicit configuration. But when something goes wrong, the magic becomes a mystery, and debugging becomes a deep dive into the framework&#8217;s internal [&#8230;]]]></description>
  449. <content:encoded><![CDATA[
  450. <p>Spring Boot is a marvel of developer productivity. It hides the plumbing and gets you up and running fast. Components are &#8220;miraculously” autowired, properties are “magically” resolved, and database connections materialize seemingly without explicit configuration.</p>
  451.  
  452.  
  453.  
  454. <p>But when something goes wrong, the magic becomes a mystery, and debugging becomes a deep dive into the framework&#8217;s internal mechanics.</p>
  455.  
  456.  
  457.  
  458. <p>Regular debuggers handle plain Java classes and objects, lacking framework-specific context. To inspect a property, track a bean, or examine an entity state, you need to dig into the internals of Spring Boot. (Remember how to access the application context from the debugger evaluator? Neither do we.)<br><br>The rabbit was always in the hat – you just had to know where to look. IntelliJ IDEA has long allowed you to inspect loaded beans or trace the source of a property value using the debugger, but doing so wasn’t exactly straightforward. Our goal is to change that – to make debugging Spring applications as comfortable and productive as the rest of your development experience in IntelliJ IDEA. The first step was an additional <a href="https://blog.jetbrains.com/idea/2024/11/from-code-to-clarity-with-the-redesigned-structure-tool-window/">structure view</a>, and now we’re going further.&nbsp;</p>
  459.  
  460.  
  461.  
  462. <p>Let’s pull back the curtain on the Spring Boot magic and see how the <a href="https://plugins.jetbrains.com/plugin/25302-spring-debugger" target="_blank" rel="noopener">Spring Debugger</a> plugin makes the invisible visible. </p>
  463.  
  464.  
  465.  
  466. <p>If you prefer watching and listening, have a look at Marco Behler&#8217;s talk at Spring I/O 2025.</p>
  467.  
  468.  
  469.  
  470. <figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
  471. <iframe loading="lazy" title="Spring Debugger: A New Way To Demystify Spring Boot&#039;s Magic by Marco Behler @ Spring I/O 2025" width="500" height="281" src="https://www.youtube.com/embed/K2tYAHG2XJ8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
  472. </div><figcaption class="wp-element-caption">Spring Debugger: A New Way To Demystify Spring Boot&#8217;s Magic by Marco Behler @ Spring I/O 2025</figcaption></figure>
  473.  
  474.  
  475.  
  476. <h2 class="wp-block-heading"><strong>The bean that wasn’t there</strong></h2>
  477.  
  478.  
  479.  
  480. <p>Spring Debugger is built with a focus on real-world tasks, helping you uncover what&#8217;s really happening inside your Spring application.&nbsp;</p>
  481.  
  482.  
  483.  
  484. <p>You’ve written the class. You’ve annotated it as a bean. But it’s not doing anything.&nbsp;</p>
  485.  
  486.  
  487.  
  488. <p>Maybe it’s not in the right package. Maybe it’s excluded by a conditional. Maybe it’s overridden in a test.&nbsp;</p>
  489.  
  490.  
  491.  
  492. <p>Spring Debugger exposes the full bean landscape:</p>
  493.  
  494.  
  495. <div class="wp-block-image">
  496. <figure class="alignright is-resized"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXefCypu3nbH5O5mom6Ag0zpCBgMJyFVzPOxnZu_Ux2SB1SmziV3pD3wfyHYLW87B_wZEfbHWrJBv-t3bI3n5G3g2JvuYF9WYPK_5uYOC5OYnOqPX6pwGrHtn_mol5Xnwebxl1bY?key=LvQR1ZdOOW3a1cEaOR6hqg" alt="" style="aspect-ratio:2.1676470588235293;width:409px;height:auto"/></figure></div>
  497.  
  498.  
  499. <ul>
  500. <li>You can see all Spring-managed beans directly in the <em>Project</em> view.</li>
  501.  
  502.  
  503.  
  504. <li>Grayed-out entries tell you which ones were scanned but not instantiated.</li>
  505.  
  506.  
  507.  
  508. <li>Using Mockito in tests? All mocked beans are clearly marked in orange.</li>
  509. </ul>
  510.  
  511.  
  512.  
  513. <p>And it goes deeper.&nbsp;</p>
  514.  
  515.  
  516.  
  517. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="2580" height="1922" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/5_1.png" alt="" class="wp-image-577489"/></figure>
  518.  
  519.  
  520.  
  521. <p>While stepping through the code, you can inspect a bean’s metadata, including the scope, profile, context, and even originating factory method. No more guesswork – bean definitions are now first-class citizens in your debugging workflow.&nbsp;</p>
  522.  
  523.  
  524.  
  525. <h2 class="wp-block-heading"><strong>The property maze</strong></h2>
  526.  
  527.  
  528.  
  529. <p>You set a property in <code>application.properties</code>, but your app uses a different value. Why?</p>
  530.  
  531.  
  532.  
  533. <p>Spring Boot’s property resolution is layered: file values, profiles, environment variables, system properties, command-line args, post-processors&#8230; It’s a maze. Even professional developers need additional tools to get through.</p>
  534.  
  535.  
  536.  
  537. <p>Spring Debugger flattens the hierarchy:</p>
  538.  
  539.  
  540.  
  541. <ul>
  542. <li>It shows the effective runtime value inline in <code>.properties</code> and <code>.yaml</code> files.</li>
  543.  
  544.  
  545.  
  546. <li>It highlights overridden values and source locations.</li>
  547.  
  548.  
  549.  
  550. <li>For environment-based or external values, the evaluator reveals the origin clearly.</li>
  551. </ul>
  552.  
  553.  
  554.  
  555. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdmi5Kc3fimapQFDB2orGMVla8aQIJt3fvnLZRgkjU7_2DN9yF_ODFNKQhW4GNkwq8_TU-IpTma6gQCHnrI41gK8qFx17HhAQ-dC5YptRe_gJ9lpZJ57MC85qZeYEc41985h4IhlA?key=LvQR1ZdOOW3a1cEaOR6hqg" alt=""/></figure>
  556.  
  557.  
  558.  
  559. <p>For values from environment variables or external sources, it still shows where they came from in the debugger evaluator. Since you no longer need to trace values back manually, you save time and reduce the number of misconfigurations.</p>
  560.  
  561.  
  562.  
  563. <h2 class="wp-block-heading"><strong>The missing transaction</strong></h2>
  564.  
  565.  
  566.  
  567. <p>You annotated your method with <code>@Transactional</code>, but it is not committing. Even worse, you&#8217;re getting a <code>LazyInitializationException</code>. What happened?</p>
  568.  
  569.  
  570.  
  571. <p>Spring Debugger helps you understand what’s going on:</p>
  572.  
  573.  
  574.  
  575. <ul>
  576. <li>It shows inline indicators for methods executing inside active transactions.</li>
  577.  
  578.  
  579.  
  580. <li>It displays full transaction details, including isolation, propagation, and the method that started it all.</li>
  581.  
  582.  
  583.  
  584. <li>A visual hierarchy for nested transactions helps you understand call chains and propagation effects.</li>
  585.  
  586.  
  587.  
  588. <li>For JPA, it shows the L1 cache state and updates it in real time.</li>
  589. </ul>
  590.  
  591.  
  592.  
  593. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcIqPaUk80KBL3mFqhocnSwgTUXX0VUsbvGyewnWGC8Y07s6gmoYX2cXkgDpP1qnVP2vmLzQ0-bG9afHH56o_W0y_KMoIB4klokohQij_T5BPFsz8_O098ndzi2RFnlGHgT799M?key=LvQR1ZdOOW3a1cEaOR6hqg" alt=""/></figure>
  594.  
  595.  
  596.  
  597. <p>Now you know whether your method is inside the transaction you expected – and where it actually began.&nbsp;</p>
  598.  
  599.  
  600.  
  601. <h2 class="wp-block-heading"><strong>The database client that configured itself</strong></h2>
  602.  
  603.  
  604.  
  605. <p>Your app connects to a database – but how? From which config? Which JDBC URL is used? In tests, is it using a Testcontainer? Or is it perhaps an in-memory database like H2?</p>
  606.  
  607.  
  608. <div class="wp-block-image">
  609. <figure class="alignright is-resized"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdin2lbLH4m7s4kfQve85eGiP4d7tVWy7yC5uPII0BfnZC1qZJGlQNh_UCOV77B-7AbRwyo8kUOoczz60CAafoHZdVo6iHjHTBYqbPwALUJO3xjb1wdVfYxp67JstdxFBOiAOUrgw?key=LvQR1ZdOOW3a1cEaOR6hqg" alt="" style="aspect-ratio:0.702928870292887;width:310px;height:auto"/></figure></div>
  610.  
  611.  
  612. <p>Spring Debugger makes all of this explicit:</p>
  613.  
  614.  
  615.  
  616. <ul>
  617. <li>It detects all active <code>DataSource</code> connections automatically.</li>
  618.  
  619.  
  620.  
  621. <li>It groups them under their corresponding run/debug configurations.</li>
  622.  
  623.  
  624.  
  625. <li>It integrates with IntelliJ IDEA’s <em>Database </em>tool window for inspection.</li>
  626. </ul>
  627.  
  628.  
  629.  
  630. <p>No need to manually register database connections or dig through logs. You can see every live DataSource and explore it interactively.</p>
  631.  
  632.  
  633.  
  634. <p>📌 In-memory databases are currently shown, but browsing data is not supported.</p>
  635.  
  636.  
  637.  
  638. <h2 class="wp-block-heading"><strong>Reading beans from thin air</strong></h2>
  639.  
  640.  
  641.  
  642. <p>The debugger is paused. You want to trigger a service, add test data, or inspect a Spring bean. Can you do this the normal way? No.</p>
  643.  
  644.  
  645.  
  646. <p>Spring Debugger changes that by letting you:</p>
  647.  
  648.  
  649.  
  650. <ul>
  651. <li>Auto-complete all loaded beans in the expression evaluator.</li>
  652.  
  653.  
  654.  
  655. <li>Invoke any method on any bean on the fly.</li>
  656. </ul>
  657.  
  658.  
  659.  
  660. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdcBBP4bfMrowE3G0HCPvaVdQK2Cxbg1mNYoeAAxAOL7YE5SRkQVitxo2YXB-HNKji3Wz2ri45VEfYnKJqFApR7ieBGQKOaiihHgx6sasJv3WXDyi47FJP-_PSH-8MmsIL0j1zk?key=LvQR1ZdOOW3a1cEaOR6hqg" alt=""/></figure>
  661.  
  662.  
  663.  
  664. <p>The process of bean evaluation is getting better: We can evaluate any configuration property value right in the debugger. All we need to do is select the evaluator on the right side.&nbsp;</p>
  665.  
  666.  
  667.  
  668. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcCslrh_inD11HBBE7fh-OSh6TpNoBE1kbIjUuVkkSo4j3WKWAkcHFe0npvj_d4LRJNLVqC1H4P7rLkU-5JA7GIazuYf8X1KY0_MKkE4Of5eF0_PHchZZNlVGuDNYZz5kbpYxt5rg?key=LvQR1ZdOOW3a1cEaOR6hqg" alt=""/></figure>
  669.  
  670.  
  671.  
  672. <p>It’s like a REPL for your Spring context. You can poke, prod, simulate, and confirm behavior without restarting the app or adding test code.</p>
  673.  
  674.  
  675.  
  676. <h2 class="wp-block-heading"><strong>For curious developers: How it works internally&nbsp;</strong></h2>
  677.  
  678.  
  679.  
  680. <p>Spring Debugger doesn’t require Spring Boot Actuator or any additional runtime agent. All data is analyzed locally without any network calls, data sharing, or risks of leakage, ensuring full privacy. Under the hood, the plugin uses non-suspending <a href="https://www.jetbrains.com/help/idea/using-breakpoints.html#suspend_policy" target="_blank" rel="noopener">breakpoints</a> set inside the Spring Boot framework libraries. During application startup, after the context is loaded, Spring Debugger gathers information from the debug session, memory heap, and stack trace. This lets it access “raw” internal application data without relying on external libraries.</p>
  681.  
  682.  
  683.  
  684. <p>Thanks to the IntelliJ IDEA Debugger API, we were able to invoke required methods from Spring Boot libraries, build an application runtime model, and display it in the IDE.</p>
  685.  
  686.  
  687.  
  688. <p>The Spring Debugger project also led to an extension of the debugger’s evaluator API, allowing us to add property evaluators alongside the standard Java one. In the future, we may extend this further to evaluate not just properties but also SpEL, SQL, or similar expressions.</p>
  689.  
  690.  
  691.  
  692. <h2 class="wp-block-heading"><strong>Summary</strong></h2>
  693.  
  694.  
  695.  
  696. <p>Spring Boot is powerful, but its abstractions can be hard to debug. Spring Debugger turns IntelliJ IDEA into a lens that sees through those layers. It’s designed to keep you productive, improve code quality, and clarify real-world problems, all while offering ultimate comfort in your daily workflow.</p>
  697.  
  698.  
  699.  
  700. <ul>
  701. <li>Beans, configs, and contexts – visually decoded.</li>
  702.  
  703.  
  704.  
  705. <li>Transactions – made traceable.</li>
  706.  
  707.  
  708.  
  709. <li>Properties – unmasked and source-mapped.</li>
  710.  
  711.  
  712.  
  713. <li>Databases – auto-detected and accessible.</li>
  714.  
  715.  
  716.  
  717. <li>Evaluator – context-aware and interactive.</li>
  718. </ul>
  719.  
  720.  
  721.  
  722. <p>The debugger doesn’t undermine the “magic” of the Spring. It lets you understand and control it. Simply run your app in debug mode and see what’s really happening.</p>
  723.  
  724.  
  725.  
  726. <p>Try it now! <a href="https://plugins.jetbrains.com/plugin/25302-spring-debugger" target="_blank" rel="noopener">Install Spring Debugger</a> and make Spring internals visible. <a href="https://www.jetbrains.com/help/idea/spring-debugger.html" target="_blank" rel="noopener">Documentation</a> is available to help you get started.&nbsp;</p>
  727.  
  728.  
  729.  
  730. <p>We value your feedback!&nbsp; Feel free to share your thoughts via plugin reviews or in the comments.&nbsp;</p>
  731.  
  732.  
  733.  
  734. <p>Happy coding!</p>
  735. ]]></content:encoded>
  736. </item>
  737. <item>
  738. <title>IntelliJ IDEA 2025.1.3 Is Out!</title>
  739. <link>https://blog.jetbrains.com/idea/2025/06/intellij-idea-2025-1-3/</link>
  740. <dc:creator><![CDATA[Maria Kosukhina]]></dc:creator>
  741. <pubDate>Mon, 23 Jun 2025 18:51:04 +0000</pubDate>
  742. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-IDEA-2025.1.3.png</featuredImage> <category><![CDATA[releases]]></category>
  743. <category><![CDATA[bug-fix-update]]></category>
  744. <category><![CDATA[intellij-idea-2025-1]]></category>
  745. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=576297</guid>
  746.  
  747. <description><![CDATA[IntelliJ IDEA 2025.1.3 is out with a number of useful fixes. You can update to this version from inside the IDE, using the&#160;Toolbox App, or using snaps if you are a Ubuntu user. You can also download it from our&#160;website. The latest update brings the following improvements: For a comprehensive overview of the fixes, see [&#8230;]]]></description>
  748. <content:encoded><![CDATA[
  749. <p>IntelliJ IDEA 2025.1.3 is out with a number of useful fixes.</p>
  750.  
  751.  
  752.  
  753. <p>You can update to this version from inside the IDE, using the&nbsp;<a href="https://www.jetbrains.com/toolbox-app/" target="_blank" rel="noreferrer noopener">Toolbox App</a>, or using snaps if you are a Ubuntu user. You can also download it from our&nbsp;<a href="https://www.jetbrains.com/idea/download/" target="_blank" rel="noreferrer noopener">website</a>.</p>
  754.  
  755.  
  756.  
  757. <p>The latest update brings the following improvements: </p>
  758.  
  759.  
  760.  
  761. <ul>
  762. <li>The IDE no longer erroneously displays <code>&lt;no name&gt;</code> in the <em>Test Results</em> tree in the <em>Run</em> tool window for Dart tests. [<a href="https://youtrack.jetbrains.com/issue/IDEA-328307/Dart-tests-no-name-shown-under-Test-Results" target="_blank" rel="noopener">IDEA-328307</a>]&nbsp;</li>
  763. </ul>
  764.  
  765.  
  766.  
  767. <ul>
  768. <li>The preview panel is now available for AsyncAPI 3.0 files. [<a href="https://youtrack.jetbrains.com/issue/IJPL-63246/AsyncAPI-Preview-not-available-for-version-3.0" target="_blank" rel="noopener">IJPL-63246</a>]</li>
  769. </ul>
  770.  
  771.  
  772.  
  773. <ul>
  774. <li>The IDE no longer truncates <code>postCreateCommand</code> environment variables at equals signs in the build process output. [<a href="https://youtrack.jetbrains.com/issue/IJPL-188006/PostCreateCommand-environment-variables-are-truncated-at-equals-signs" target="_blank" rel="noopener">IJPL-188006</a>]&nbsp;</li>
  775. </ul>
  776.  
  777.  
  778.  
  779. <ul>
  780. <li>The IDE no longer misses OS-specific plugins in Aarch64 distributions, including those required for WSL support in the Python interpreter. [<a href="https://youtrack.jetbrains.com/issue/IJPL-189778/OS-specific-plugins-could-be-missing-in-Aarch64-distributions" target="_blank" rel="noopener">IJPL-189778</a>]</li>
  781. </ul>
  782.  
  783.  
  784.  
  785. <ul>
  786. <li>The <em>Modify classpath</em> area in the <em>Run/Debug Configuration</em> interface now displays at the correct size. [<a href="https://youtrack.jetbrains.com/issue/IJPL-190373/Run-Debug-Configuration-Interface-Modify-classpath-area-is-too-small" target="_blank" rel="noopener">IJPL-190373</a>]</li>
  787. </ul>
  788.  
  789.  
  790.  
  791. <ul>
  792. <li>The IDE now correctly suggests <em>Implement methods</em> at the top of the list of quick-fixes instead of <em>Make class abstract</em>, where appropriate. [<a href="https://youtrack.jetbrains.com/issue/IDEA-371881/Make-interface-abstract-is-the-first-fix-now-instead-of-implement-interface" target="_blank" rel="noopener">IDEA-371881</a>]&nbsp;</li>
  793.  
  794.  
  795.  
  796. <li>The IDE no longer shows misleading warnings when searching for tasks using GitHub as the task server. [<a href="https://youtrack.jetbrains.com/issue/IJPL-184393/Weird-warnings-during-the-search-of-a-task" target="_blank" rel="noopener">IJPL-184393</a>]</li>
  797. </ul>
  798.  
  799.  
  800.  
  801. <p></p>
  802.  
  803.  
  804.  
  805. <p>For a comprehensive overview of the fixes, see the <a href="https://youtrack.jetbrains.com/articles/IDEA-A-2100662461/IntelliJ-IDEA-2025.1.3-251.26927.53-build-Release-Notes" data-type="link" data-id="https://youtrack.jetbrains.com/articles/IDEA-A-2100662461/IntelliJ-IDEA-2025.1.3-251.26927.53-build-Release-Notes" target="_blank" rel="noopener">release notes</a>. If you spot any issues, let us know via the <a href="https://youtrack.jetbrains.com/issues/IDEA" data-type="link" data-id="https://youtrack.jetbrains.com/issues/IDEA" target="_blank" rel="noopener">issue tracker</a>.</p>
  806.  
  807.  
  808.  
  809. <p>Happy developing!</p>
  810. ]]></content:encoded>
  811. </item>
  812. <item>
  813. <title>K2 Mode Takes Off: High Adoption, Fewer Bugs, and Major Improvements in 2025.1</title>
  814. <link>https://blog.jetbrains.com/idea/2025/06/k2-mode-takes-off-high-adoption-fewer-bugs-and-major-improvements-in-2025-1/</link>
  815. <dc:creator><![CDATA[Teodor Irkhin]]></dc:creator>
  816. <pubDate>Thu, 19 Jun 2025 12:47:19 +0000</pubDate>
  817. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-social-BlogFeatured-1280x720-2x-3.png</featuredImage> <category><![CDATA[news]]></category>
  818. <category><![CDATA[intellij-idea]]></category>
  819. <category><![CDATA[k2-mode]]></category>
  820. <category><![CDATA[kotlin]]></category>
  821. <category><![CDATA[kotlin-k2-mode]]></category>
  822. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=576687</guid>
  823.  
  824. <description><![CDATA[We want to share how things are going with K2 mode, which became the default in IntelliJ IDEA 2025.1. In this post, we’ll give an overview of the current state of K2 mode, share its adoption metrics, highlight the improvements delivered in 2025.1, and preview what’s coming next. We recommend updating to the latest IntelliJ [&#8230;]]]></description>
  825. <content:encoded><![CDATA[
  826. <p>We want to share how things are going with K2 mode, which <a href="https://blog.jetbrains.com/idea/2025/04/k2-mode-in-intellij-idea-2025-1-current-state-and-faq/">became the default in IntelliJ IDEA 2025.1</a>. In this post, we’ll give an overview of the current state of K2 mode, share its adoption metrics, highlight the improvements delivered in 2025.1, and preview what’s coming next.</p>
  827.  
  828.  
  829.  
  830. <p>We recommend updating to the latest IntelliJ IDEA version to enjoy the best K2 mode experience.</p>
  831.  
  832.  
  833.  
  834. <h2 class="wp-block-heading"><strong>Adoption</strong></h2>
  835.  
  836.  
  837.  
  838. <p>The number of users who have now adopted K2 mode is already very high and continues to grow. Indeed, among IntelliJ IDEA 2025.1 users, <strong>95%</strong> of Ultimate and <strong>9%</strong> of Community Edition developers use K2 mode.</p>
  839.  
  840.  
  841.  
  842. <p>Most users update their IDEs within the first few months after a release, so we also track combined usage across versions 2024.3 and 2025.1. Even with 2024.3 users included, K2 mode has already reached over <strong>76% </strong>adoption – and the number continues to grow steadily every week.</p>
  843.  
  844.  
  845.  
  846. <figure class="wp-block-image"><img decoding="async" loading="lazy" width="1600" height="1043" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/image-27.png" alt="" class="wp-image-576922"/></figure>
  847.  
  848.  
  849.  
  850. <h2 class="wp-block-heading"><strong>Thank you for your feedback</strong></h2>
  851.  
  852.  
  853.  
  854. <p>Your feedback is the driving force behind all the improvements and enhancements we make.</p>
  855.  
  856.  
  857.  
  858. <p>We’ve received valuable input through <a href="https://youtrack.jetbrains.com/newIssue?draftId=25-6414130" target="_blank" rel="noopener">YouTrack issues</a>, <a href="https://kotlinlang.slack.com/archives/C0B8H786P" target="_blank" rel="noopener">Slack messages</a>, <a href="https://x.com/intellijidea" target="_blank">threads</a>, and countless conversations in person at different conferences and meetups – all of which has directly shaped the evolution of Kotlin support.</p>
  859.  
  860.  
  861.  
  862. <p>Our dedicated support team reviews and monitors YouTrack reports daily, ensuring that the issues you raise are heard and addressed.</p>
  863.  
  864.  
  865.  
  866. <p>Your feedback doesn’t just help us fix problems – it helps us shape the future of Kotlin tooling. Thanks for continuing to share it!</p>
  867.  
  868.  
  869.  
  870. <h3 class="wp-block-heading">Bug reports</h3>
  871.  
  872.  
  873.  
  874. <p>The number of bug reports submitted in the first 3–4 weeks after this latest release is on par with what we saw following the 2024.3 release.</p>
  875.  
  876.  
  877.  
  878. <p>Other feedback channels also show a significant drop in negative mentions, and overall sentiment is more positive than expected.</p>
  879.  
  880.  
  881.  
  882. <p>Some users are using K2 mode in the 2024.3 and 2024.2 versions. We strongly recommend that you update to the latest version of IntelliJ IDEA, as the 2025.1 release has brought huge improvements to K2 mode, both in terms of quality and feature completeness.</p>
  883.  
  884.  
  885.  
  886. <p>Let’s take a look at what has been updated.</p>
  887.  
  888.  
  889.  
  890. <h3 class="wp-block-heading">Fixes and improvements in 2025.1:</h3>
  891.  
  892.  
  893.  
  894. <ul>
  895. <li>Stability has been improved, meaning there are fewer crashes and freezes.</li>
  896.  
  897.  
  898.  
  899. <li>More than 100 inspections and intentions have been improved and migrated from K1 to K2 mode.</li>
  900.  
  901.  
  902.  
  903. <li>Better support is now available for scratch files and scripting (<code>.kts</code>).</li>
  904.  
  905.  
  906.  
  907. <li>False positives in error reporting (e.g. <em>Constructor expected</em> and <em>Unknown symbol</em>) have been fixed.</li>
  908.  
  909.  
  910.  
  911. <li><code>Expected String?</code>, got <code>String</code>-type errors no longer appear incorrectly.</li>
  912.  
  913.  
  914.  
  915. <li>There is now an inspection for unused functions or properties.</li>
  916.  
  917.  
  918.  
  919. <li>Highlighting is now supported for <code>.serializer()</code>.</li>
  920.  
  921.  
  922.  
  923. <li>The <em>Create member from usage</em> quick-fix now works as expected.</li>
  924.  
  925.  
  926.  
  927. <li>Frequent reindexing triggers have been reduced.</li>
  928.  
  929.  
  930.  
  931. <li>Project-switch caching issues have been resolved.</li>
  932.  
  933.  
  934.  
  935. <li>All external and internal major plugins now support K2 mode.</li>
  936.  
  937.  
  938.  
  939. <li>JetBrains Academy integration is fully functioning.&nbsp;</li>
  940.  
  941.  
  942.  
  943. <li>Various Spring support improvements have been implemented.</li>
  944.  
  945.  
  946.  
  947. <li>The K2 mode debugger has reached parity with its K1 mode counterpart.</li>
  948. </ul>
  949.  
  950.  
  951.  
  952. <p>We’ve improved many other aspects of K2 mode. Check out <a href="https://youtrack.jetbrains.com/articles/IDEA-A-2100662435/IntelliJ-IDEA-2025.2-EAP-1-252.13776.59-build-Release-Notes" target="_blank" rel="noopener">our release notes</a> for a comprehensive list.</p>
  953.  
  954.  
  955.  
  956. <h3 class="wp-block-heading"><strong><em>Move</em> refactoring</strong></h3>
  957.  
  958.  
  959.  
  960. <p>In K2 mode, we rewrote how the <em>Move</em> refactoring works. It’s now far more reliable and predictable. Edge cases are handled correctly, and the resulting code is cleaner and more accurate.</p>
  961.  
  962.  
  963.  
  964. <h2 class="wp-block-heading"><strong>What’s coming in 2025.2:</strong></h2>
  965.  
  966.  
  967.  
  968. <ul>
  969. <li>General code completion improvements.&nbsp;</li>
  970.  
  971.  
  972.  
  973. <li><a href="https://www.jetbrains.com/help/idea/auto-completing-code.html#smart_type_matching_completion" target="_blank" rel="noopener">Type-matching smart completion</a> support.</li>
  974.  
  975.  
  976.  
  977. <li>Spring support is on par with K1 mode.</li>
  978.  
  979.  
  980.  
  981. <li>Refactorings like <em>Convert Enum to Sealed Class</em>, <em>Extract Interface</em>,<em> Create test / Navigate to test </em>for files and for functions, <em>Rearrange Code</em>.</li>
  982.  
  983.  
  984.  
  985. <li>Fixes for regression highlighting, including the consistent behavior of DSLs, annotations, and Kotlin-specific syntax.</li>
  986.  
  987.  
  988.  
  989. <li>Fixes for false-positive errors like <em>Constructor expected</em> and <em>Unknown symbol</em>.&nbsp;</li>
  990.  
  991.  
  992.  
  993. <li>More reliable execution of Kotlin scripts, including standalone and <code>Gradle .kts</code> files.</li>
  994.  
  995.  
  996.  
  997. <li>Correct loading of script definitions and resolution of project-specific symbols.</li>
  998.  
  999.  
  1000.  
  1001. <li>Correct recognition and highlighting of functions annotated with <code>@DslMarker</code>.</li>
  1002.  
  1003.  
  1004.  
  1005. <li>A more reliable <em>Extract Interface</em> refactoring across all project configurations.</li>
  1006. </ul>
  1007.  
  1008.  
  1009.  
  1010. <p>There’s much more to come, so stay tuned!</p>
  1011.  
  1012.  
  1013.  
  1014. <h3 class="wp-block-heading"><strong>Coroutines inspections</strong></h3>
  1015.  
  1016.  
  1017.  
  1018. <p>Coroutines are one of our most loved and frequently mentioned features, but they can be tricky to get right, especially for those just starting out.</p>
  1019.  
  1020.  
  1021.  
  1022. <p>We’re working to make them easier to use and have already introduced a growing set of coroutine inspections. These are designed to catch common issues, offer helpful suggestions, and guide you toward writing correct and idiomatic coroutine code more smoothly and with more confidence. Here are some of the tickets we’ve addressed with this initiative:</p>
  1023.  
  1024.  
  1025.  
  1026. <ul>
  1027. <li><a href="https://youtrack.jetbrains.com/issue/KTIJ-32417" target="_blank" rel="noopener">Warning</a> about calling <code>runBlocking</code> in a suspend function.</li>
  1028.  
  1029.  
  1030.  
  1031. <li><a href="https://youtrack.jetbrains.com/issue/KTIJ-34526" target="_blank" rel="noopener">Inspection</a> to replace <em>`kotlin.coroutine.coroutineContex</em>t` access with `<em>kotlinx.coroutines.currentCoroutineContext</em>` call where possible.</li>
  1032.  
  1033.  
  1034.  
  1035. <li><a href="https://youtrack.jetbrains.com/issue/KTIJ-17625" target="_blank" rel="noopener">Inspection</a> when a Flow from<em> kotlin.coroutines </em>is not used.</li>
  1036.  
  1037.  
  1038.  
  1039. <li><a href="https://youtrack.jetbrains.com/issue/KTIJ-34236" target="_blank" rel="noopener">Inspection</a> to replace ‘<em>map { it.await() }’ with ‘awaitAll()</em>’ on collections of ‘<em>Deferred</em>’ objects.</li>
  1040.  
  1041.  
  1042.  
  1043. <li><a href="https://youtrack.jetbrains.com/issue/KTIJ-34346" target="_blank" rel="noopener">Inspection</a> to replace ‘<em>forEach { it.join() }’ with ‘joinAll()</em>’ on collections of ‘<em>Job</em>’ objects.</li>
  1044. </ul>
  1045.  
  1046.  
  1047.  
  1048. <h3 class="wp-block-heading"><strong>Support for Kotlin 2.2 feature previews</strong></h3>
  1049.  
  1050.  
  1051.  
  1052. <p>Kotlin 2.2 will bring a variety of interesting new features that have IDE support in K2 mode, including:</p>
  1053.  
  1054.  
  1055.  
  1056. <ul>
  1057. <li>Guard conditions in when, multi-dollar interpolation, and non-local <em>break</em> and <em>continue</em>.</li>
  1058.  
  1059.  
  1060.  
  1061. <li>Nested type aliases.</li>
  1062.  
  1063.  
  1064.  
  1065. <li>Improvements to use-site defaulting for annotations in Kotlin.</li>
  1066.  
  1067.  
  1068.  
  1069. <li>Context parameters (non-stable).</li>
  1070.  
  1071.  
  1072.  
  1073. <li>Exposing functions with inline classes to Java (non-stable).</li>
  1074.  
  1075.  
  1076.  
  1077. <li>Prototype of context-sensitive resolution (non-stable).</li>
  1078. </ul>
  1079.  
  1080.  
  1081.  
  1082. <h3 class="wp-block-heading"><strong>Performance</strong></h3>
  1083.  
  1084.  
  1085.  
  1086. <p>Version 2025.1 brought noticeable performance improvements, and 2025.2 is building upon that work.</p>
  1087.  
  1088.  
  1089.  
  1090. <p>In 2025.1, highlighting and actions like <em>Find Usages</em> became faster and more responsive. In preparation for the 2025.2 release, we’ve also improved completion speed and memory usage, making everyday editing smoother and more efficient.</p>
  1091.  
  1092.  
  1093.  
  1094. <p>These updates are part of our ongoing effort to make K2 mode more powerful. We’re continuing to track the impact of these changes and will share more detailed metrics later this year.</p>
  1095.  
  1096.  
  1097.  
  1098. <h2 class="wp-block-heading"><strong>What’s next?</strong></h2>
  1099.  
  1100.  
  1101.  
  1102. <p>We’re continuing our efforts to refine and enhance K2’s architecture, address remaining limitations, and ensure a stable, reliable experience for all developers. Your feedback is key to helping us prioritize and improve where it matters most.</p>
  1103.  
  1104.  
  1105.  
  1106. <p>If you have ideas, suggestions, or issues to report, we’d love to hear from you via <a href="https://kotlinlang.slack.com/archives/C0B8H786P" data-type="link" data-id="https://kotlinlang.slack.com/archives/C0B8H786P" target="_blank" rel="noopener">Slack</a>, <a href="https://youtrack.jetbrains.com/newIssue?draftId=25-6414130" data-type="link" data-id="https://youtrack.jetbrains.com/newIssue?draftId=25-6414130" target="_blank" rel="noopener">YouTrack</a>, or <a href="mailto:k2-mode-feedback@jetbrains.com(opens in a new tab)">email</a>.</p>
  1107.  
  1108.  
  1109.  
  1110. <p>Happy coding!</p>
  1111. ]]></content:encoded>
  1112. </item>
  1113. <item>
  1114. <title>New Livestream – Java Enable Preview: Vector API</title>
  1115. <link>https://blog.jetbrains.com/idea/2025/06/new-livestream-new-livestream-new-livestream-java-enable-preview-vector-api-2/</link>
  1116. <dc:creator><![CDATA[Anna Rovinskaia]]></dc:creator>
  1117. <pubDate>Mon, 16 Jun 2025 10:18:02 +0000</pubDate>
  1118. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-livestream-BlogFeaturedLivestream-1280x720-2x.png</featuredImage> <category><![CDATA[livestreams]]></category>
  1119. <category><![CDATA[intellij-idea]]></category>
  1120. <category><![CDATA[intellijidealivestream]]></category>
  1121. <category><![CDATA[livestream]]></category>
  1122. <category><![CDATA[webinars]]></category>
  1123. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=567537</guid>
  1124.  
  1125. <description><![CDATA[Updated on June 26, 2025. On June 25, 2025, we hosted our IntelliJ IDEA Livestream episode with Daniel Hinojosa and explored the Vector API – a powerful tool for writing high-performance code in Java. Session abstract In this session, we will discuss the Vector API in a preview in Java. We will begin by introducing [&#8230;]]]></description>
  1126. <content:encoded><![CDATA[
  1127. <p><em>Updated on June 26, 2025.</em></p>
  1128.  
  1129.  
  1130.  
  1131. <p>On June 25, 2025, we hosted our IntelliJ IDEA Livestream episode with Daniel Hinojosa and explored the Vector API – a powerful tool for writing high-performance code in Java. </p>
  1132.  
  1133.  
  1134.  
  1135. <figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
  1136. <iframe loading="lazy" title="Java Enable Preview: Vector API" width="500" height="281" src="https://www.youtube.com/embed/g553Hyee6CE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
  1137. </div></figure>
  1138.  
  1139.  
  1140.  
  1141. <h2 class="wp-block-heading">Session abstract</h2>
  1142.  
  1143.  
  1144.  
  1145. <p><p>In this session, we will discuss the Vector API in a preview in Java. We will begin by introducing SIMD (single instruction, multiple data) and explore how it can be used to maximize computation speed. The session will then cover the setup required to use the Vector API, including how to establish a species, define and use components and lanes, and apply masking with different strategies. We will also discuss same-lane and cross-lane computation. Finally, we will conclude by presenting metrics comparing the performance of using the Vector API versus not using it.</p>
  1146. <p>This session is primarily aimed at backend developers working on performance-intensive applications, as they can leverage the Vector API to optimize computational tasks. Software architects are the secondary audience, as they need to understand the implications of using the Vector API when designing high-performance systems that require efficient data processing. DeepTech professionals may also find this session valuable on account of its focus on advanced computational techniques and performance optimizations using SIMD and the Vector API.</p></p>
  1147.  
  1148.  
  1149.  
  1150. <h2 class="wp-block-heading">Asking questions</h2>
  1151.  
  1152.  
  1153.  
  1154. <p>Daniel will try to answer all of your questions during the session. If we run out of time, we’ll publish answers to any remaining questions in a follow-up blog post.</p>
  1155.  
  1156.  
  1157.  
  1158. <h2 class="wp-block-heading">Your speaker and host</h2>
  1159.  
  1160.  
  1161.  
  1162. <h3 class="wp-block-heading">Speaker</h3>
  1163.  
  1164.  
  1165.    <div class="about-author ">
  1166.        <div class="about-author__box">
  1167.            <div class="row">
  1168.                                                            <div class="about-author__box-img">
  1169.                            <img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-livestream-SpeakerPhotoLivestream-400x400-1.png" alt="" loading="lazy">
  1170.                        </div>
  1171.                                        <div class="about-author__box-text">
  1172.                                                    <h4>Daniel Hinojosa</h4>
  1173.                                                <p>Daniel Hinojosa has been a self-employed developer, teacher, and speaker for private business, education, and government since 1999. A Java Champion, he is passionate about languages, frameworks, and programming education. Daniel is a Pomodoro Technique practitioner and is the co-founder of the Albuquerque Java User Group in Albuquerque, New Mexico.</p>
  1174.                    </div>
  1175.                            </div>
  1176.        </div>
  1177.    </div>
  1178.  
  1179.  
  1180.  
  1181. <h3 class="wp-block-heading">Host</h3>
  1182.  
  1183.  
  1184.    <div class="about-author ">
  1185.        <div class="about-author__box">
  1186.            <div class="row">
  1187.                                                            <div class="about-author__box-img">
  1188.                            <img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2021/12/Mala-Gupta-e1595919910139-edited.jpg" alt="Mala Gupta" loading="lazy">
  1189.                        </div>
  1190.                                        <div class="about-author__box-text">
  1191.                                                    <h4>Mala Gupta</h4>
  1192.                                                <p><!-- wp:paragraph --></p>
  1193. <p>A Java Champion and JUG leader, <a href="https://twitter.com/eMalaGupta" target="_blank" rel="noopener">Mala</a> <span style="font-weight: 400;">has authored multiple books with Manning, Packt, and O’Reilly Publications. She has more than two decades of experience in the software industry and is a regular speaker at industry conferences around the world. She is a vocal supporter of Java certification as a path to career advancement.</span></p>
  1194. <p><!-- /wp:paragraph --></p>
  1195.                    </div>
  1196.                            </div>
  1197.        </div>
  1198.    </div>
  1199.  
  1200.  
  1201.  
  1202. <p>Happy developing!</p>
  1203. ]]></content:encoded>
  1204. </item>
  1205. <item>
  1206. <title>Migrate from Cursor to IntelliJ IDEA</title>
  1207. <link>https://blog.jetbrains.com/idea/2025/06/migrate-cursor-to-intellij-idea/</link>
  1208. <dc:creator><![CDATA[Julia Shashkova]]></dc:creator>
  1209. <pubDate>Thu, 12 Jun 2025 07:33:07 +0000</pubDate>
  1210. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-social-BlogFeatured-1280x720-2x-cursor.png</featuredImage> <category><![CDATA[news]]></category>
  1211. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=574594</guid>
  1212.  
  1213. <description><![CDATA[If you’re a developer working with Cursor, exploring alternatives for your growing project, and are curious to see what IntelliJ IDEA has to offer, this article is for you. While Cursor emphasizes a minimalistic setup approach, IntelliJ IDEA strikes a balance between out-of-the-box functionality and powerful customization, enabling developers to effortlessly scale from small projects [&#8230;]]]></description>
  1214. <content:encoded><![CDATA[
  1215. <p>If you’re a developer working with Cursor, exploring alternatives for your growing project, and are curious to see what IntelliJ IDEA has to offer, this article is for you.</p>
  1216.  
  1217.  
  1218.  
  1219. <p>While Cursor emphasizes a minimalistic setup approach, IntelliJ IDEA strikes a balance between out-of-the-box functionality and powerful customization, enabling developers to effortlessly scale from small projects to enterprise-grade applications.</p>
  1220.  
  1221.  
  1222.  
  1223. <p>Ready for an upgrade? Let’s explore how IntelliJ IDEA simplifies the <a href="#how-to-migrate-to-intellij-idea" data-type="internal" data-id="#how-to-migrate-to-intellij-idea">migration process</a> and why it’s worth the switch.</p>
  1224.  
  1225.  
  1226.  
  1227. <p align="center"><a class="jb-download-button" href="https://jb.gg/button-idea-download" target="_blank" rel="noopener">Download IntelliJ IDEA</a></p>
  1228.  
  1229.  
  1230.  
  1231. <h2 class="wp-block-heading">Why migrate to IntelliJ IDEA</h2>
  1232.  
  1233.  
  1234.  
  1235. <h3 class="wp-block-heading">Boost productivity with AI-powered tools</h3>
  1236.  
  1237.  
  1238.  
  1239. <p>Cursor has gained popularity for its AI-centric design, leveraging third-party GPT models. IntelliJ IDEA takes AI integration to the next level by embedding its native AI capabilities directly into the IDE&#8217;s toolset.</p>
  1240.  
  1241.  
  1242.  
  1243. <p>IntelliJ IDEA’s powerful AI Assistant provides context-aware code completion, helps you understand complex code and generate improvements, writes boilerplate code based on contextual understanding, and does much more – all in-editor or via an AI Chat.</p>
  1244.  
  1245.  
  1246.  
  1247. <figure class="wp-block-image size-full is-resized"><img decoding="async" loading="lazy" width="1500" height="840" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/ai-editor-min.png" alt="AI Assistant in editor IntelliJ IDEA" class="wp-image-574787" style="aspect-ratio:1.7857142857142858;width:677px;height:auto"/></figure>
  1248.  
  1249.  
  1250.  
  1251. <p>Junie takes things further by performing autonomous coding tasks. Unlike traditional code suggestions, Junie automates repetitive development tasks, such as writing unit tests, refactoring blocks of code, or even generating boilerplate configurations for frameworks like Spring.</p>
  1252.  
  1253.  
  1254.  
  1255. <figure class="wp-block-image size-full is-resized"><img decoding="async" loading="lazy" width="1296" height="804" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/junie-test-min.png" alt="" class="wp-image-574606" style="aspect-ratio:1.6119402985074627;width:675px;height:auto"/></figure>
  1256.  
  1257.  
  1258.  
  1259. <h3 class="wp-block-heading">An out-of-the-box experience with preconfigured environments</h3>
  1260.  
  1261.  
  1262.  
  1263. <p>Cursor uses a blank canvas philosophy (without preconfigured environments), leaving developers to manually search and set up everything as they go, including libraries, frameworks, testing, and debugging tools.IntelliJ IDEA, on the other hand, provides a more guided experience. Its <em>Project Wizard</em> simplifies the setup process by configuring the environment based on the developer’s tasks and requirements. From JDKs to framework-specific libraries installed right within the IDE, it allows you to jump straight to coding rather than spending time on manual configuration.</p>
  1264.  
  1265.  
  1266.  
  1267. <figure class="wp-block-image size-full is-resized"><img decoding="async" loading="lazy" width="1500" height="1448" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/new-project-spring-min.png" alt="" class="wp-image-574617" style="aspect-ratio:1.0359116022099448;width:614px;height:auto"/></figure>
  1268.  
  1269.  
  1270.  
  1271. <p>IntelliJ IDEA is ready to use right from the first launch. It offers a full suite of built-in tools and integrations designed to support all aspects of development and eliminates the need to search for and install external tools and plugins, like Database tools, Profiler, the HTTP Client for API testing, Version Control integration with Git, and many more.</p>
  1272.  
  1273.  
  1274.  
  1275. <figure class="wp-block-image size-full is-resized"><img decoding="async" loading="lazy" width="1500" height="600" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/ultimate-tools.gif" alt="" class="wp-image-574628" style="aspect-ratio:2.5;width:763px;height:auto"/></figure>
  1276.  
  1277.  
  1278.  
  1279. <h3 class="wp-block-heading">Beginner-friendly and professional development-ready</h3>
  1280.  
  1281.  
  1282.  
  1283. <p>Cursor, with its AI-driven code completions and explanations, can lower the learning curve for beginners, helping them avoid switching between the IDE and external documentation.&nbsp;</p>
  1284.  
  1285.  
  1286.  
  1287. <p>This might work well for small projects, rapid prototyping, or for developers just starting out. However, as projects grow in size and complexity, Cursor’s limited scalability and lack of built-in tools can stall professional workflows, requiring extensive manual setup and reliance on external plugins.</p>
  1288.  
  1289.  
  1290.  
  1291. <p>IntelliJ IDEA is both beginner-friendly and equipped for enterprise-level development. With built-in tools, interactive courses, and AI Assistant, beginners can quickly get started without feeling overwhelmed. At the same time, its scalability, integrated tools, and support for enterprise frameworks make it a powerful option for professional developers working on larger, more complex projects.</p>
  1292.  
  1293.  
  1294.  
  1295. <h2 class="wp-block-heading">How to migrate to IntelliJ IDEA</h2>
  1296.  
  1297.  
  1298.  
  1299. <h3 class="wp-block-heading">Import settings in just a few clicks</h3>
  1300.  
  1301.  
  1302.  
  1303. <p>IntelliJ IDEA allows you to easily import your customized settings, including keymaps, UI themes, installed extensions, and even recent projects from Cursor. During your first launch, IntelliJ IDEA scans your environment for IDE configurations and gives you the option to import settings directly, ensuring you can get started quickly.</p>
  1304.  
  1305.  
  1306.  
  1307. <figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
  1308. <figure class="wp-block-image size-large"><img decoding="async" loading="lazy" data-id="574699" width="1318" height="496" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/cursor-migrate-settings.png" alt="" class="wp-image-574699"/></figure>
  1309. </figure>
  1310.  
  1311.  
  1312.  
  1313. <p>For detailed instructions, check out our migration guide for <a href="https://www.jetbrains.com/help/idea/migrate-from-cursor.html" target="_blank" rel="noopener">Cursor</a>.</p>
  1314.  
  1315.  
  1316.  
  1317. <h3 class="wp-block-heading">Recreating Cursor workflows</h3>
  1318.  
  1319.  
  1320.  
  1321. <p>Migrating doesn’t mean giving up the workflows you’re already used to. IntelliJ IDEA offers equivalent but enhanced features that replicate the familiar functionalities of Cursor while unlocking even greater productivity in the IDE. Below are some tips to make the transition smoother.</p>
  1322.  
  1323.  
  1324.  
  1325. <p><strong>Command palette</strong></p>
  1326.  
  1327.  
  1328.  
  1329. <p>Similar to Cursor’s command palette, IntelliJ IDEA’s <em>Search Everywhere</em> (<em>⇧⇧ | Shift+Shift</em>) enables you to quickly search across classes, files, symbols, actions within your project and beyond – all in one place.</p>
  1330.  
  1331.  
  1332.  
  1333. <figure class="wp-block-image size-full is-resized"><img decoding="async" loading="lazy" width="1502" height="470" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/ij_migration_customize_replicate_vsc_workflow_palette_dark-min.png" alt="" class="wp-image-574661" style="aspect-ratio:3.195744680851064;width:723px;height:auto"/></figure>
  1334.  
  1335.  
  1336.  
  1337. <p><strong>Search and replace</strong></p>
  1338.  
  1339.  
  1340.  
  1341. <p>IntelliJ IDEA provides intuitive <em>Find and Replace</em> dialogs that can work on a single file or across your entire project. You’ll find these under <em>Edit | Find and Edit | Replace</em>.</p>
  1342.  
  1343.  
  1344.  
  1345. <figure class="wp-block-image size-full is-resized"><img decoding="async" loading="lazy" width="1282" height="1096" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/ij_migration_guide_customize_search_and_replace_dark-min.png" alt="" class="wp-image-574672" style="aspect-ratio:1.1697080291970803;width:508px;height:auto"/></figure>
  1346.  
  1347.  
  1348.  
  1349. <p><strong>Debug (and run) code with gutter icons</strong></p>
  1350.  
  1351.  
  1352.  
  1353. <p>Just like in Cursor, you can debug directly from the gutter in IntelliJ IDEA. But that&#8217;s not all – IntelliJ IDEA also lets you run code, tests, and configurations right from the same interface, giving you even more flexibility during your development process.</p>
  1354.  
  1355.  
  1356.  
  1357. <figure class="wp-block-image size-full is-resized"><img decoding="async" loading="lazy" width="584" height="286" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/aqua_run_tests_dark-min.png" alt="" class="wp-image-574684" style="aspect-ratio:2.041958041958042;width:352px;height:auto"/></figure>
  1358.  
  1359.  
  1360.  
  1361. <hr class="wp-block-separator has-alpha-channel-opacity"/>
  1362.  
  1363.  
  1364.  
  1365. <p>Whether you’re just starting out and need a guided setup or you&#8217;re a professional developer working on large-scale applications, IntelliJ IDEA provides the tools, performance, and intelligence to support your development at every stage.</p>
  1366.  
  1367.  
  1368.  
  1369. <p>If you’re looking for an IDE that grows with you, IntelliJ IDEA is certainly worth the switch.</p>
  1370.  
  1371.  
  1372.  
  1373. <p>Happy developing!</p>
  1374. ]]></content:encoded>
  1375. </item>
  1376. <item>
  1377. <title>Text Blocks in Java: Perfect for Multiline Strings</title>
  1378. <link>https://blog.jetbrains.com/idea/2025/06/text-blocks-in-java-perfect-for-multiline-strings/</link>
  1379. <dc:creator><![CDATA[Irina Mariasova]]></dc:creator>
  1380. <pubDate>Tue, 10 Jun 2025 11:28:36 +0000</pubDate>
  1381. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-social-BlogFeatured-1280x720-2x.png</featuredImage> <category><![CDATA[tutorials]]></category>
  1382. <category><![CDATA[java]]></category>
  1383. <category><![CDATA[textblocks]]></category>
  1384. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=573133</guid>
  1385.  
  1386. <description><![CDATA[You’ve likely used String variables to store values that span multiple lines, such as LLM prompts, JSON, HTML, XML, code snippets, and other such values. Some of these, such as a JSON value, include double quotes as part of the data. Imagine the inconvenience of using backslashes (\) to escape those quotes, indenting lines using [&#8230;]]]></description>
  1387. <content:encoded><![CDATA[
  1388. <p>You’ve likely used String variables to store values that span multiple lines, such as LLM prompts, JSON, HTML, XML, code snippets, and other such values.</p>
  1389.  
  1390.  
  1391.  
  1392. <p>Some of these, such as a JSON value, include double quotes as part of the data. Imagine the inconvenience of using backslashes (<em>\</em>) to escape those quotes, indenting lines using newlines, tabs, or spaces, and adding a concatenation operator at the end of each line. Coding such string values is a nightmare. The resulting string is not just hard to write, but also hard to read. Language-specific errors, like a missing comma in a JSON value, can easily creep in.</p>
  1393.  
  1394.  
  1395.  
  1396. <p>Don’t worry, there’s already a solution. Java 15 introduced Text Blocks, multiline strings that make it easier to define data that spans multiple lines. Text Blocks remove the need for concatenation operators or escape sequences when working with HTML, XML, JSON, or SQL queries stored as strings. The values are easier to read, and it’s simpler to spot issues like missing spaces in SQL queries or a missing comma in a JSON value.</p>
  1397.  
  1398.  
  1399.  
  1400. <p>Let’s understand the benefits of using Text Blocks with an example.</p>
  1401.  
  1402.  
  1403.  
  1404. <h2 class="wp-block-heading">An example &#8211; what are the existing pain points</h2>
  1405.  
  1406.  
  1407.  
  1408. <p>Imagine you need to store the following JSON text in your Java code:</p>
  1409.  
  1410.  
  1411.  
  1412. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">{
  1413.     "name": "Sonam Wangchuk"
  1414.     "movement": "#ILiveSimply",
  1415.     "result": "Let planet simply live"
  1416. }</pre>
  1417.  
  1418.  
  1419. <p>This JSON value can be stored as a multi line String value (without using a TextBlock) as follows:</p>
  1420. <p>
  1421. <!-- /wp:paragraph --></p>
  1422. <p><!-- wp:enlighter/codeblock -->
  1423. </p>
  1424. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String myJson = "{\n" +
  1425.                 "    \"name\": \"Sonam Wangchuk\"\n" +
  1426.                 "    \"movement\": \"#ILiveSimply\",\n" +
  1427.                 "    \"result\": \"Let planet simply live\"\n" +
  1428.                 "}";</pre>
  1429. <p>
  1430. <!-- /wp:enlighter/codeblock --></p>
  1431. <p><!-- wp:paragraph -->
  1432. </p>
  1433. <p>Writing the preceding code manually can be a nightmare. Escape characters and concatenation operators make it hard to write and read. To include double quotes within a string, you must escape them using a backslash (since &#8221; is also a string delimiter). To preserve the formatting of the JSON object, you need to add whitespace such as new lines, tabs, or spaces.</p>
  1434. <p>
  1435. <!-- /wp:paragraph --></p>
  1436. <p><!-- wp:paragraph -->
  1437. </p>
  1438. <p>With all that formatting overhead, you probably missed that the JSON above is missing a comma at the end of the first line. This missing comma can cause a parsing error later if you try to convert the string into a JSON object.</p>
  1439. <p>
  1440. <!-- /wp:paragraph --></p>
  1441. <p><!-- wp:paragraph -->
  1442. </p>
  1443. <p>Let’s see how Text Blocks can help.</p>
  1444. <p>
  1445. <!-- /wp:paragraph --></p>
  1446. <p><!-- wp:heading {"level":3} -->
  1447. </p>
  1448. <h3 class="wp-block-heading">Using Text Blocks</h3>
  1449. <p>
  1450. <!-- /wp:heading --></p>
  1451. <p><!-- wp:paragraph -->
  1452. </p>
  1453. <p>TextBlocks are multiline Strings (their type is <code>java.lang.String</code>). By using Text Blocks, you can store the previous String value, as follows:</p>
  1454. <p>
  1455. <!-- /wp:paragraph --></p>
  1456. <p><!-- wp:enlighter/codeblock -->
  1457. </p>
  1458. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String myJson = """
  1459.                 {
  1460.                     "name": "Sonam Wangchuk"
  1461.                     "movement": "#ILiveSimply",
  1462.                     "result": "Let planet simply live"
  1463.                 }""";</pre>
  1464. <p>
  1465. <!-- /wp:enlighter/codeblock --></p>
  1466. <p><!-- wp:paragraph -->
  1467. </p>
  1468. <p>Text Blocks are simple to create, read, and edit. They eliminate the need for concatenation operators and (most) escape sequences when working with String values that span more than one line, as shown below:</p>
  1469. <p>
  1470. <!-- /wp:paragraph --></p>
  1471. <p><!-- wp:image -->
  1472. </p>
  1473. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeONcUSwmLJ_zljoc2YF51JzDUxmDaH3ucj2esIPSQG2DBUHv6vlYSIW_OAxAwTWQLU0lvW97QUwP1KbhrRkCfOjKURnhmGEmjTihxeAv9Jsn0pX2fPYNaO8rkKOu8DSzliLZKe7Q?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1474. <p>
  1475. <!-- /wp:image --></p>
  1476. <p><!-- wp:paragraph -->
  1477. </p>
  1478. <p>The next section covers the syntax details of text blocks. If you&#8217;re already familiar with them, feel free to skip ahead.</p>
  1479. <p>
  1480. <!-- /wp:paragraph --></p>
  1481. <p><!-- wp:heading -->
  1482. </p>
  1483. <h2 class="wp-block-heading">Syntax of TextBlocks</h2>
  1484. <p>
  1485. <!-- /wp:heading --></p>
  1486. <p><!-- wp:paragraph -->
  1487. </p>
  1488. <p>Here are a couple of syntax rules to follow when you are working with Text Blocks.</p>
  1489. <p>
  1490. <!-- /wp:paragraph --></p>
  1491. <p><!-- wp:heading {"level":3} -->
  1492. </p>
  1493. <h3 class="wp-block-heading">Opening and closing delimiter &#8211; <code>"""</code></h3>
  1494. <p>
  1495. <!-- /wp:heading --></p>
  1496. <p><!-- wp:paragraph -->
  1497. </p>
  1498. <p>Unlike the single double quotes (<code>"</code>) used for regular String values, Text Blocks use three double quotes (<code>"""</code>) as their opening and closing delimiters. The opening delimiter can be followed by zero or more whitespaces, but it must be followed by a line terminator. A Text Block value begins after this line terminator.</p>
  1499. <p>
  1500. <!-- /wp:paragraph --></p>
  1501. <p><!-- wp:paragraph -->
  1502. </p>
  1503. <p>If a Text Block doesn’t include a newline character immediately after the opening <code>"""</code>, IntelliJ IDEA can detect this and prompt you to correct it:</p>
  1504. <p>
  1505. <!-- /wp:paragraph --></p>
  1506. <p><!-- wp:image -->
  1507. </p>
  1508. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe_h4gjUfurAr9uAlX_UjPYkkgAv0BMbbODf_dJKFDsa_KJPlaV-TK7V4UFeVt9SKWE_nkxaSE2WX899uQs8AKPimXbngIr6NUNrQV_B-0g37KC_2uho6G4iGGk7xfM9Prk9jpI1A?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1509. <p>
  1510. <!-- /wp:image --></p>
  1511. <p><!-- wp:heading {"level":3} -->
  1512. </p>
  1513. <h3 class="wp-block-heading">Incidental white spaces</h3>
  1514. <p>
  1515. <!-- /wp:heading --></p>
  1516. <p><!-- wp:paragraph -->
  1517. </p>
  1518. <p>What rules does the compiler follow to include or exclude leading and trailing whitespace in a Text Block? Before we answer this question, let’s first understand what whitespaces are. When we talk about a whitespace in Java Text Blocks, it can refer to different types of characters, such as:</p>
  1519. <p>
  1520. <!-- /wp:paragraph --></p>
  1521. <ol>
  1522. <li>A space &#8211; The standard space character we use to separate words</li>
  1523. <li>Tabs &#8211; The popular Tab characters, that is, (<code>'\t'</code>). Wars have been fought over whether to use tabs or space to indent code :)</li>
  1524. <li>Line breaks &#8211; Newline characters (<code>'\n'</code> on Unix/Linux/macOS, or <code>'\r\n'</code> on Windows)</li>
  1525. <li>Carriage returns &#8211; (<code>'\r'</code>)</li>
  1526. <p><p><!-- wp:paragraph -->
  1527. </p>
  1528. <p>First, let’s talk about how the leading white spaces are handled in a Text Block.</p>
  1529. <p>
  1530. <!-- /wp:paragraph --></p>
  1531. <p><!-- wp:heading {"level":4} -->
  1532. </p>
  1533. <h4 class="wp-block-heading">Leading spaces</h4>
  1534. <p>
  1535. <!-- /wp:heading --></p>
  1536. <p><!-- wp:paragraph -->
  1537. </p>
  1538. <p>Why do you need leading spaces? You would usually add tabs or spaces to values, such as a JSON, to align them vertically in your code. In Text Blocks, the leftmost non-whitespace character on any of the lines or the leftmost closing delimiter defines where meaningful white space begins. IntelliJ IDEA helps you view this position – using a vertical line – a feature that I absolutely love about Text Block’s support in IntelliJ IDEA.</p>
  1539. <p>
  1540. <!-- /wp:paragraph --></p>
  1541. <p><!-- wp:paragraph -->
  1542. </p>
  1543. <p>Here’s how the vertical bar in IntelliJ IDEA lets you visualize the starting position of your Text Block values:</p>
  1544. <p>
  1545. <!-- /wp:paragraph --></p>
  1546. <p><!-- wp:image -->
  1547. </p>
  1548. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcVyNYPTiF7Ek0YBzgMkd6tJX1ATb44c37JCdlcmh7tkVBloQzKkO0twnU5pKX97LrFkvuuKHrCkJ9_mJ30evxV3RSaFsG_ewo-lUgrxa0lIYjsEn2MTm3GwGROeQ8bhrD_-EhFEw?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1549. <p>
  1550. <!-- /wp:image --></p>
  1551. <p><!-- wp:paragraph -->
  1552. </p>
  1553. <p>Just in case you can’t view the vertical green line shown in the preceding image, use Shift+Shift, Find ‘Show indent guides’, and enable it in IntelliJ IDEA.</p>
  1554. <p>
  1555. <!-- /wp:paragraph --></p>
  1556. <p><!-- wp:paragraph -->
  1557. </p>
  1558. <p>The following image shows another way to understand which leading spaces are included in your text blocks &#8211; blue rectangles represent the spaces that are not part of your textblock and the light green rectangles represent the leading spaces that are included in your text block:&nbsp;&nbsp;</p>
  1559. <p>
  1560. <!-- /wp:paragraph --></p>
  1561. <p><!-- wp:image -->
  1562. </p>
  1563. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfv0T_BcQy9JC-DtKdPyjV4mysmMphTShQiFzkZF1F2zCydGx9oaBo2_zAxljK10WZFU7jIEF4kTl6curBljr9A46leBfqyKobA3PJJYOso48wlsj787EqBETcLRhSZjCeZe32M0A?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1564. <p>
  1565. <!-- /wp:image --></p>
  1566. <p><!-- wp:paragraph -->
  1567. </p>
  1568. <p>If you move the closing triple quotes to the left, the white spaces included in the textblock changes, as shown in the following image:</p>
  1569. <p>
  1570. <!-- /wp:paragraph --></p>
  1571. <p><!-- wp:image -->
  1572. </p>
  1573. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe6_9QTRXCtg_u7-BgzhqsjQTbLItA5QiXljnT8Cvth73HE7_N8IB0-YikqD6_5e6_DlYrVDmyqwu3zDcBJ4kw0v3q_ts1CSc34q1_92kLwyaeRW9ClSrFwB2UjTcmiSI86JZI8?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1574. <p>
  1575. <!-- /wp:image --></p>
  1576. <p><!-- wp:heading {"level":4} -->
  1577. </p>
  1578. <h4 class="wp-block-heading">Trailing white spaces</h4>
  1579. <p>
  1580. <!-- /wp:heading --></p>
  1581. <p><!-- wp:paragraph -->
  1582. </p>
  1583. <p>By default, the trailing white spaces are removed in Text Block values. IntelliJ IDEA can detect when you add trailing white spaces in your textblocks. It would highlight those spaces (to ensure you didn’t add them by mistake).&nbsp;</p>
  1584. <p>
  1585. <!-- /wp:paragraph --></p>
  1586. <p><!-- wp:paragraph -->
  1587. </p>
  1588. <p>When you click Alt + Enter, it could prompt you to either ‘Escape trailing whitespace characters’, or ‘Remove trailing whitespace characters’. If you choose the former option, IntelliJ IDEA will add \s at the end (\s represents a single space), as shown in the following gif:</p>
  1589. <p>
  1590. <!-- /wp:paragraph --></p>
  1591. <p><!-- wp:image -->
  1592. </p>
  1593. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdTwdws6DaERyJL0-_49b2sOPKuivk1F_uD4MQ9dIBSR8amyYAUAyDmKywmxbWpWRKVkMx_9I5krok09otAYpwsPpMnzdtbG7uI-EiM_LGT41NwJdzS45PXTzH37vXis-E16ncGMA?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1594. <p>
  1595. <!-- /wp:image --></p>
  1596. <p><!-- wp:heading {"level":4} -->
  1597. </p>
  1598. <h4 class="wp-block-heading">Where would you use a trailing white space?</h4>
  1599. <p>
  1600. <!-- /wp:heading --></p>
  1601. <p><!-- wp:paragraph -->
  1602. </p>
  1603. <p>Imagine you are using a method from a library that reads the first 40 characters of a line to extract two values from it, and store it in a <code>Map</code>, as follows:</p>
  1604. <p>
  1605. <!-- /wp:paragraph --></p>
  1606. <p><!-- wp:enlighter/codeblock -->
  1607. </p>
  1608. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public Map&lt;String, String> parseFixedWidthData(String fixedWidthData) {
  1609.     Map&lt;String, String> result = new HashMap&lt;>();
  1610.     String[] lines = fixedWidthData.split("\n");
  1611.     for (String line : lines) {
  1612.         String field1 = line.substring(0, 19).trim();
  1613.         String field2 = line.substring(20, 39).trim();
  1614.         result.put(field1, field2);
  1615.     }
  1616.     return result;
  1617. }</pre>
  1618. <p>
  1619. <!-- /wp:enlighter/codeblock --></p>
  1620. <p><!-- wp:paragraph -->
  1621. </p>
  1622. <p>If you are using a textblock to pass value to the method <code>parseFixedWidthData</code>, you should define it as follows, escaping the trailing whitespaces, so the the preceding method doesn’t throw an <code>IndexOutOfBounds</code> exception:</p>
  1623. <p>
  1624. <!-- /wp:paragraph --></p>
  1625. <p><!-- wp:enlighter/codeblock -->
  1626. </p>
  1627. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String fixedWidthData = """
  1628.                         CUSTOMER_NAME       JOHN DOE           \s
  1629.                         ACCOUNT_NUMBER      12345678-9879      \s
  1630.                         AGE                      45            \s""";</pre>
  1631. <p>
  1632. <!-- /wp:enlighter/codeblock --></p>
  1633. <p><!-- wp:heading {"level":3} -->
  1634. </p>
  1635. <h3 class="wp-block-heading">Continuation char &#8211; \</h3>
  1636. <p>
  1637. <!-- /wp:heading --></p>
  1638. <p><!-- wp:paragraph -->
  1639. </p>
  1640. <p>When you place your text on a new line in a text block, a new line char is added to your String value. Imagine using a textblock to store a store long URL so that it is easy to read, as follows:</p>
  1641. <p>
  1642. <!-- /wp:paragraph --></p>
  1643. <p><!-- wp:enlighter/codeblock -->
  1644. </p>
  1645. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String apiUrl = """
  1646.        https://www.alamy.com/stock-photo-abstract-geometric-pattern-hipster-fashion-design-print-hexagonal-175905258.html?
  1647.        imageid=0DF26DE9-AC7B-4C78-8770-E1AC9EC8783A
  1648.        &amp;p=379271
  1649.        &amp;pn=1
  1650.        &amp;searchId=8cf93ae4926578c6f55e3756c4010a71&amp;searchtype=0""";</pre>
  1651. <p>
  1652. <!-- /wp:enlighter/codeblock --></p>
  1653. <p><!-- wp:paragraph -->
  1654. </p>
  1655. <p>However, if you use the preceding text block to connect to a URL and retrieve a response, the code will throw an exception. Inclusion of \n in the URL makes it an invalid URL. To address it, you can use the continuation character, that is, <code>\</code> at the end of a line in your text block (so that the resulting string doesn’t include a new line character):</p>
  1656. <p>
  1657. <!-- /wp:paragraph --></p>
  1658. <p><!-- wp:enlighter/codeblock -->
  1659. </p>
  1660. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String apiUrl = """
  1661.        https://www.alamy.com/stock-photo-abstract-geometric-pattern-hipster-fashion-design-print-hexagonal-175905258.html?\
  1662.        imageid=0DF26DE9-AC7B-4C78-8770-E1AC9EC8783A\
  1663.        &amp;p=379271\
  1664.        &amp;pn=1\
  1665.        &amp;searchId=8cf93ae4926578c6f55e3756c4010a71&amp;searchtype=0""";</pre>
  1666. <p>
  1667. <!-- /wp:enlighter/codeblock --></p>
  1668. <p><!-- wp:heading -->
  1669. </p>
  1670. <h2 class="wp-block-heading">More about TextBlocks</h2>
  1671. <p>
  1672. <!-- /wp:heading --></p>
  1673. <p><!-- wp:paragraph -->
  1674. </p>
  1675. <p>With the syntax rules under your belt, let’s learn more about Text blocks.</p>
  1676. <p>
  1677. <!-- /wp:paragraph --></p>
  1678. <p><!-- wp:heading {"level":3} -->
  1679. </p>
  1680. <h3 class="wp-block-heading">Not a String variation</h3>
  1681. <p>
  1682. <!-- /wp:heading --></p>
  1683. <p><!-- wp:paragraph -->
  1684. </p>
  1685. <p>Java isn’t adding a variation of type String with Text Blocks. They are compiled to regular String instances (<code>java.lang.String</code>). You can think of Textblocks as syntactic sugar that allows you to write Strings without using the concatenating operators and escape sequences. If you decompile a class that defines a text block, you’ll see that they are compiled to regular strings with single pair of double quotes as the delimiter, as shown in the following gif (the top bar mentions that you are viewing a Decompiled .class file):</p>
  1686. <p>
  1687. <!-- /wp:paragraph --></p>
  1688. <p><!-- wp:image -->
  1689. </p>
  1690. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXckYGQI_JdzU4VNNVDHZX4ff-_kLTla3wru6qXP7mnP0MbroBtLqKW-FBW-8mnBkzL337H8BROKrGWHkQTKHbEr8qS7KCMZlADkjhugktBvNh-8qmp3nUIQlr-g_19LF0zQMpedQw?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1691. <p>
  1692. <!-- /wp:image --></p>
  1693. <p><!-- wp:heading {"level":3} -->
  1694. </p>
  1695. <h3 class="wp-block-heading">Call any String method on a text block</h3>
  1696. <p>
  1697. <!-- /wp:heading --></p>
  1698. <p><!-- wp:paragraph -->
  1699. </p>
  1700. <p>Since there is just one java.lang.String type (not a variation for Text blocks), it means that you can call all String methods on text blocks:</p>
  1701. <p>
  1702. <!-- /wp:paragraph --></p>
  1703. <p><!-- wp:image -->
  1704. </p>
  1705. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcKjL6b0NZWKI4b9ItQU9yTvr5uKjXl2XlDRK-xoLrFYCW4Mk6_6LDPFyrhJ8io6aJues3MGdGhEL5PQ3wTpzJoXglDHzccHLQO4xNwf-FZOV-r-KN5tgMWhXJYL7zb0XFcw-dB9A?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1706. <p>
  1707. <!-- /wp:image --></p>
  1708. <p><!-- wp:heading {"level":3} -->
  1709. </p>
  1710. <h3 class="wp-block-heading">Convert a text block to a regular string</h3>
  1711. <p>
  1712. <!-- /wp:heading --></p>
  1713. <p><!-- wp:paragraph -->
  1714. </p>
  1715. <p>Imagine you are migrating your codebase to a development environment that doesn&#8217;t support Textblocks (Java 14 or earlier versions). In such case, you can invoke Context Actions to convert a Text Block to a regular String literal:</p>
  1716. <p>
  1717. <!-- /wp:paragraph --></p>
  1718. <p><!-- wp:image -->
  1719. </p>
  1720. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcMppKvmv5kYe5QXZ4spK4f1RPKIYP3wkWitjitrb4snX2ZYns514mAKtLwcIyfKG3HF8TgDEezFTtWcKIbyZ_ooAI7L5zfSQAHFaM5YaRlGybBqF72lI4WfeKhUr6yW9oCmX_COw?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1721. <p>
  1722. <!-- /wp:image --></p>
  1723. <p><!-- wp:heading {"level":3} -->
  1724. </p>
  1725. <h3 class="wp-block-heading">Language Injections in Textblocks</h3>
  1726. <p>
  1727. <!-- /wp:heading --></p>
  1728. <p><!-- wp:paragraph -->
  1729. </p>
  1730. <p>Injecting a language into Text Blocks in IntelliJ IDEA enables syntax highlighting and real-time error detection, helping to catch issues such as unclosed JSON values or HTML tags, missing or mismatched quotes in attributes, inconsistent indentation, and unescaped special characters. You also get IntelliJ IDEA’s support like code completion, and value validation.&nbsp;</p>
  1731. <p>
  1732. <!-- /wp:paragraph --></p>
  1733. <p><!-- wp:paragraph -->
  1734. </p>
  1735. <p>The following gif shows how you can inject JSON as a language in a text block (language injection in IntelliJ IDEA applies to regular strings too):</p>
  1736. <p>
  1737. <!-- /wp:paragraph --></p>
  1738. <p><!-- wp:image -->
  1739. </p>
  1740. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfFUSz4-i7YQZd9fVNW8n7-iFihnAqeP_UvxpiPFjS8QBpYMJ5_010gJglwuYVZQ6iDF1OGk9STxrzzqQGPnD4LtdZTWENZVMHBDei0Qcisvx6rxKSocTamGq6zEXImjLQhbR2W5w?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  1741. <p>
  1742. <!-- /wp:image --></p>
  1743. <p><!-- wp:paragraph -->
  1744. </p>
  1745. <p>As you can see, the language injection option enables you to choose from multiple options (including JSON).</p>
  1746. <p>
  1747. <!-- /wp:paragraph --></p>
  1748. <p><!-- wp:heading -->
  1749. </p>
  1750. <h2 class="wp-block-heading">Practical examples &#8211; where to use Text Blocks</h2>
  1751. <p>
  1752. <!-- /wp:heading --></p>
  1753. <p><!-- wp:paragraph -->
  1754. </p>
  1755. <p>Apart from using Textblocks to store JSON data (as shown in the preceding sections), you can think of using Text Blocks to store values that usually span multiple lines such as XML, HTML data, or code snippets written in other programming languages. This section highlights the practical examples where you can use text blocks.</p>
  1756. <p>
  1757. <!-- /wp:paragraph --></p>
  1758. <p><!-- wp:heading {"level":3} -->
  1759. </p>
  1760. <h3 class="wp-block-heading">1. ASCII Art</h3>
  1761. <p>
  1762. <!-- /wp:heading --></p>
  1763. <p><!-- wp:paragraph -->
  1764. </p>
  1765. <p>You can use textblock to store and output ASCII art, such as the following:</p>
  1766. <p>
  1767. <!-- /wp:paragraph --></p>
  1768. <p><!-- wp:enlighter/codeblock -->
  1769. </p>
  1770. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String textblock = """
  1771.        ╔═══════════════════════════════════════════════════════════════════════════════════════╗
  1772.        ║                                                                                       ║
  1773.        ║    ████████╗███████╗██╗  ██╗████████╗    ██████╗ ██╗      ██████╗  ██████╗██╗  ██╗    ║
  1774.        ║    ╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝    ██╔══██╗██║     ██╔═══██╗██╔════╝██║ ██╔╝    ║
  1775.        ║       ██║   █████╗   ╚███╔╝    ██║       ██████╔╝██║     ██║   ██║██║     █████╔╝     ║
  1776.        ║       ██║   ██╔══╝   ██╔██╗    ██║       ██╔══██╗██║     ██║   ██║██║     ██╔═██╗     ║
  1777.        ║       ██║   ███████╗██╔╝ ██╗   ██║       ██████╔╝███████╗╚██████╔╝╚██████╗██║  ██╗    ║
  1778.        ║       ╚═╝   ╚══════╝╚═╝  ╚═╝   ╚═╝       ╚═════╝ ╚══════╝ ╚═════╝  ╚═════╝╚═╝  ╚═╝    ║
  1779.        ║                                                                                       ║
  1780.        ╠═══════════════════════════════════════════════════════════════════════════════════════╣""";
  1781. </pre>
  1782. <p>
  1783. <!-- /wp:enlighter/codeblock --></p>
  1784. <p><!-- wp:paragraph -->
  1785. </p>
  1786. <p>
  1787. <!-- /wp:paragraph --></p>
  1788. <p><!-- wp:heading {"level":3} -->
  1789. </p>
  1790. <h3 class="wp-block-heading">2. Logging data</h3>
  1791. <p>
  1792. <!-- /wp:heading --></p>
  1793. <p><!-- wp:paragraph -->
  1794. </p>
  1795. <p>Imagine while working with an online shopping application, you need to log a message with order details, if the quantity for a product in an order is 0 or negative. It is common to create a String that includes literals, such as, ‘Invalid order’, and order details that can be accessed using variables like orderId, etc. Here’s a sample code to accomplish this (focus on the concatenated String):</p>
  1796. <p>
  1797. <!-- /wp:paragraph --></p>
  1798. <p><!-- wp:enlighter/codeblock -->
  1799. </p>
  1800. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public void processOrder(int orderId, String product, int qty, LocalDate orderDate) {
  1801.    if (qty &lt;= 0) {
  1802.        String errorMessage = "Invalid order quantity:" + qty + 
  1803.                              "for product" + product + ",order ID" + orderId;
  1804.        logger.error(errorMessage);
  1805.        return;
  1806.    }
  1807.    //.. Remaining code
  1808. }</pre>
  1809. <p>
  1810. <!-- /wp:enlighter/codeblock --></p>
  1811. <p><!-- wp:paragraph -->
  1812. </p>
  1813. <p>The code seems harmless. However, I’ve often missed adding spaces before and after the literal text values in similar code, generating a log message similar to the following that is hard to read:</p>
  1814. <p>
  1815. <!-- /wp:paragraph --></p>
  1816. <p><!-- wp:enlighter/codeblock -->
  1817. </p>
  1818. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Invalid order quantity: -5for productWidget,order ID12345</pre>
  1819. <p>
  1820. <!-- /wp:enlighter/codeblock --></p>
  1821. <p><!-- wp:paragraph -->
  1822. </p>
  1823. <p>A safer bet would be to use textblocks for this logging message that can help you spot the missing spaces. Even if you miss adding spaces, the new line characters can space out the log messages:</p>
  1824. <p>
  1825. <!-- /wp:paragraph --></p>
  1826. <p><!-- wp:enlighter/codeblock -->
  1827. </p>
  1828. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">public void processOrder(int orderId, String product, int qty, LocalDate orderDate) {
  1829.         if (qty &lt;= 0) {
  1830.             String errorMessage = ("""
  1831.                                    Invalid order quantity:%d
  1832.                                    for product %s, 
  1833.                                    order ID %d""").formatted(qty, product, orderId);
  1834.             logger.info(errorMessage);
  1835.             System.out.println(errorMessage);
  1836.             return;
  1837.         }
  1838.         //.. Remaining code
  1839.     }</pre>
  1840. <p>
  1841. <!-- /wp:enlighter/codeblock --></p>
  1842. <p><!-- wp:heading {"level":3} -->
  1843. </p>
  1844. <h3 class="wp-block-heading">3. XML or HTML data</h3>
  1845. <p>
  1846. <!-- /wp:heading --></p>
  1847. <p><!-- wp:paragraph -->
  1848. </p>
  1849. <p>Here’s an example of a Text Block storing a HTML value:</p>
  1850. <p>
  1851. <!-- /wp:paragraph --></p>
  1852. <p><!-- wp:enlighter/codeblock -->
  1853. </p>
  1854. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String html = """
  1855.         &lt;HTML>
  1856.            &lt;BODY>
  1857.                &lt;P>Stop generating 6 million tons of plastic waste&lt;/P>
  1858.                &lt;UL>
  1859.                    &lt;LI>Keep a spoon, fork, knife in your bag.&lt;/LI> 
  1860.                    &lt;LI>Avoid using single use plastic cutlery.&lt;/LI>
  1861.                &lt;/UL>
  1862.            &lt;/BODY>
  1863.         &lt;/HTML>
  1864.         """;</pre>
  1865. <p>
  1866. <!-- /wp:enlighter/codeblock --></p>
  1867. <p><!-- wp:heading {"level":3} -->
  1868. </p>
  1869. <h3 class="wp-block-heading">4. Complex JSON data</h3>
  1870. <p>
  1871. <!-- /wp:heading --></p>
  1872. <p><!-- wp:paragraph -->
  1873. </p>
  1874. <p>In the beginning of this blog post, I covered how text blocks can help eliminate the clutter. The clutter increases manifolds, when you start working with more complex JSON objects, as follows:</p>
  1875. <p>
  1876. <!-- /wp:paragraph --></p>
  1877. <p><!-- wp:enlighter/codeblock -->
  1878. </p>
  1879. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String json = "{\n" +
  1880.               "  \"cod\": \"200\",\n" +
  1881.               "  \"city\": {\n" +
  1882.               "    \"id\": 524901,,,,\n" +
  1883.               "    \"name\": \"GreatCity\",\n" +
  1884.               "    \"country\": \"AwesomeCountry\",\n" +
  1885.               "    \"coord\": {\n" +
  1886.               "      \"lat\": 55.7522,\n" +
  1887.               "      \"lon\": 37.6156\n" +
  1888.               "    }\n" +
  1889.               "  }\n" +
  1890.               "}";</pre>
  1891. <p>
  1892. <!-- /wp:enlighter/codeblock --></p>
  1893. <p><!-- wp:paragraph -->
  1894. </p>
  1895. <p>With textblocks, the cognitive load reduces, as you can see in the following code snippet:</p>
  1896. <p>
  1897. <!-- /wp:paragraph --></p>
  1898. <p><!-- wp:enlighter/codeblock -->
  1899. </p>
  1900. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String json = """
  1901.               {
  1902.                 "cod": "200",
  1903.                 "city": {
  1904.                   "id": 524901,,,,
  1905.                   "name": "GreatCity",
  1906.                   "country": "AwesomeCountry",
  1907.                   "coord": {
  1908.                     "lat": 55.7522,
  1909.                     "lon": 37.6156
  1910.                   }
  1911.                 }
  1912.               }""";</pre>
  1913. <p>
  1914. <!-- /wp:enlighter/codeblock --></p>
  1915. <p><!-- wp:paragraph -->
  1916. </p>
  1917. <p>Perhaps you can inject language in the preceding text block and determine the syntax errors with the JSON value.</p>
  1918. <p>
  1919. <!-- /wp:paragraph --></p>
  1920. <p><!-- wp:heading {"level":3} -->
  1921. </p>
  1922. <h3 class="wp-block-heading">5. Multiline String values</h3>
  1923. <p>
  1924. <!-- /wp:heading --></p>
  1925. <p><!-- wp:paragraph -->
  1926. </p>
  1927. <p>Here’s just a long line of String, stored using Text Blocks:&nbsp;</p>
  1928. <p>
  1929. <!-- /wp:paragraph --></p>
  1930. <p><!-- wp:enlighter/codeblock -->
  1931. </p>
  1932. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String aLongString = """
  1933.                      I'm a long String value, which can't fit on a 
  1934.                      Single line. 
  1935.                      "Hey!", would you prefer a cup of coffee?
  1936.                      "Yes, please".
  1937.                      """;</pre>
  1938. <p>
  1939. <!-- /wp:enlighter/codeblock --></p>
  1940. <p><!-- wp:paragraph -->
  1941. </p>
  1942. <p>Text Blocks take off the visual clutter from multiline strings which existed in the form of concatenation operators and escape sequences.&nbsp;</p>
  1943. <p>
  1944. <!-- /wp:paragraph --></p>
  1945. <p><!-- wp:heading {"level":3} -->
  1946. </p>
  1947. <h3 class="wp-block-heading">6. SQL Queries</h3>
  1948. <p>
  1949. <!-- /wp:heading --></p>
  1950. <p><!-- wp:paragraph -->
  1951. </p>
  1952. <p>Imagine using the following code to store a SQL query:</p>
  1953. <p>
  1954. <!-- /wp:paragraph --></p>
  1955. <p><!-- wp:enlighter/codeblock -->
  1956. </p>
  1957. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String query = 
  1958.   "SELECT name, age" +
  1959.   "FROM EMP" + 
  1960.   "WHERE name = \'John\'" +
  1961.   "AND age > 20";</pre>
  1962. <p>
  1963. <!-- /wp:enlighter/codeblock --></p>
  1964. <p><!-- wp:paragraph -->
  1965. </p>
  1966. <p>The preceding code represents an invalid query. Due to missing spaces at the end of each line, this query will be interpreted as the following:</p>
  1967. <p>
  1968. <!-- /wp:paragraph --></p>
  1969. <p><!-- wp:enlighter/codeblock -->
  1970. </p>
  1971. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">SELECT name, ageFROM EMPWHERE name = 'John'AND age > 20
  1972. You can address these issues by using text blocks:
  1973. String query = """
  1974.   SELECT name, age
  1975.   FROM EMP
  1976.   WHERE name = 'John'
  1977.     AND age > 20
  1978.   """;</pre>
  1979. <p>
  1980. <!-- /wp:enlighter/codeblock --></p>
  1981. <p><!-- wp:heading {"level":3} -->
  1982. </p>
  1983. <h3 class="wp-block-heading">7. Email templates &#8211; multiline string values with literal and variable values</h3>
  1984. <p>
  1985. <!-- /wp:heading --></p>
  1986. <p><!-- wp:paragraph -->
  1987. </p>
  1988. <p>When concatenating string literals with variable values, it is easy to miss adding a single space in string literal, right before or after a variable value. It could result in poorly formatted output, or output that is not-so-readable. It could also result in displaying output you didn’t expect due to those missing spaces. Consider the following code that uses a combination of string literals and variable values to send a text to a customer:</p>
  1989. <p>
  1990. <!-- /wp:paragraph --></p>
  1991. <p><!-- wp:enlighter/codeblock -->
  1992. </p>
  1993. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String username = "Alice";
  1994.    String topic = "Java Records";
  1995.    String previousContext = "We were discussing immutable data classes.";
  1996.        
  1997.    String email = "Hi" + username + ",\n\n" +
  1998.            "Let's continue our discussion about " + topic + ".\n" +
  1999.            "For context, " + previousContext + "\n\n" +
  2000.            "Can you tell me more about what specific aspects of" + topic + "you're interested in?";</pre>
  2001. <p>
  2002. <!-- /wp:enlighter/codeblock --></p>
  2003. <p><!-- wp:paragraph -->
  2004. </p>
  2005. <p>You could use TextBlock and formatted(), so that the variable substitution is cleaner:</p>
  2006. <p>
  2007. <!-- /wp:paragraph --></p>
  2008. <p><!-- wp:enlighter/codeblock -->
  2009. </p>
  2010. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">String email = """
  2011.                Hi %s,
  2012.                
  2013.                Let's continue our discussion about %s.
  2014.                For context, %s
  2015.                
  2016.                Can you tell me more about what specific aspects of %s you're interested in?
  2017.                """.formatted(username, topic, previousContext, topic);
  2018. </pre>
  2019. <p>
  2020. <!-- /wp:enlighter/codeblock --></p>
  2021. <p><!-- wp:paragraph -->
  2022. </p>
  2023. <p>&nbsp;&nbsp;&nbsp;</p>
  2024. <p>
  2025. <!-- /wp:paragraph --></p>
  2026. <p><!-- wp:heading {"level":3} -->
  2027. </p>
  2028. <h3 class="wp-block-heading">8. Creating simple bills&nbsp;</h3>
  2029. <p>
  2030. <!-- /wp:heading --></p>
  2031. <p><!-- wp:paragraph -->
  2032. </p>
  2033. <p>You can create simple bills (such as the following) to print using textblocks:</p>
  2034. <p>
  2035. <!-- /wp:paragraph --></p>
  2036. <p><!-- wp:enlighter/codeblock -->
  2037. </p>
  2038. <pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">--------------------------------------------------------------------------------------
  2039.                            Your Neighbourhood Art Supplies Store
  2040. --------------------------------------------------------------------------------------
  2041. Date:               2023-10-20                               Invoice Number:     12345                
  2042. Customer Details
  2043. Name:               John Smith            
  2044. Address:            123 Main Street      
  2045. City:               Smallville            
  2046. Phone:              555-123-4567          
  2047. --------------------------------------------------------------------------------------
  2048. S.No.           Item Name                  Quantity        Unit Price($)      Total($)
  2049. --------------------------------------------------------------------------------------
  2050. 1        Acrylic Paint Set                       1             20.00             20.00
  2051. 2        Watercolor Brushes                      5             15.00             75.00
  2052. 3        Sketchbook                             12             10.00            120.00
  2053. 4        Oil Paints Set                          1             25.00             25.00
  2054. 5        Canvas Panels (5-pack)                  6             12.00             72.00
  2055. --------------------------------------------------------------------------------------
  2056. Subtotal:       $82.0
  2057. Sales Tax (6%): $4.92
  2058. Total Amount:   $86.92;
  2059. --------------------------------------------------------------------------------------
  2060.                            Thank you for shopping with us!
  2061. --------------------------------------------------------------------------------------
  2062. </pre>
  2063. <p>
  2064. <!-- /wp:enlighter/codeblock --></p>
  2065. <p><!-- wp:heading -->
  2066. </p>
  2067. <h2 class="wp-block-heading">Code Migrations &#8211; using text blocks instead of a regular string</h2>
  2068. <p>
  2069. <!-- /wp:heading --></p>
  2070. <p><!-- wp:paragraph -->
  2071. </p>
  2072. <p>The release of Java 25, the next LTS version, is around the corner. If you plan to migrate your existing codebases using JDK version 14 or earlier to a newer version, you can start using Text Blocks in your code.</p>
  2073. <p>
  2074. <!-- /wp:paragraph --></p>
  2075. <p><!-- wp:paragraph -->
  2076. </p>
  2077. <p>To migrate all eligible multiline String values currently stored across multiple lines using concatenation operators to Text Blocks, you can proceed in two ways. The first approach is to run the inspection “Text blocks can be used” on your entire project or selected directories. In the Problems view window that opens, you can apply these changes individually or in a batch.</p>
  2078. <p>
  2079. <!-- /wp:paragraph --></p>
  2080. <p><!-- wp:paragraph -->
  2081. </p>
  2082. <p>To demonstrate this feature, I forked an open-source project from GitHub, JSON-java, and ran the inspection “Text blocks can be used,” as shown in the following GIF:</p>
  2083. <p>
  2084. <!-- /wp:paragraph --></p>
  2085. <p><!-- wp:image -->
  2086. </p>
  2087. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeBuooc4MvMaIRLP1J65AVBvE7mxIxMs9_8qS6co0yX9j-ZbshDJDCdPmOCMxB0ZOfYc-tC-Vo9JpArCKNG2iaHtiCS-uHTV5c2IGWsv1tUSRzlyxw_DaTrEe6W93Bq8bTLE66X?key=yW1ZQqJF1sHWdQbTY4ukfpAU" alt=""/></figure>
  2088. <p>
  2089. <!-- /wp:image --></p>
  2090. <p><!-- wp:paragraph -->
  2091. </p>
  2092. <p>The second approach is to create a new profile in Settings, say, ‘Migrate to 24’, and add all the migration inspections to this profile. Then, you can execute the ‘Inspect Code…’ command and run this inspection profile on your codebase. Use the Problems view window to accept multiple changes at once or review them individually.</p>
  2093. <p>
  2094. <!-- /wp:paragraph --></p>
  2095. <p><!-- wp:heading -->
  2096. </p>
  2097. <h2 class="wp-block-heading">Summary</h2>
  2098. <p>
  2099. <!-- /wp:heading --></p>
  2100. <p><!-- wp:paragraph -->
  2101. </p>
  2102. <p>Text blocks in Java are syntactic sugar to make it easy for you to create string values that span multiple lines, without needing to use concatenation operators or escape sequences. This makes it easier to read and write such values, reducing cognitive load for us developers. Since the values are clutter-free, you can also spot syntax errors in these multiline values, such as a missing quote or comma. By injecting a language or a reference into these text blocks, IntelliJ IDEA can help you further by highlighting these errors and even suggesting how to fix them.</p>
  2103. <p>
  2104. <!-- /wp:paragraph --></p>
  2105. <p><!-- wp:paragraph -->
  2106. </p>
  2107. <p>Text blocks start and end with three double quotes. By default, trailing whitespaces are ignored in text blocks. To include—or in other words, escape—the trailing whitespaces, use <code>\s</code>. To join two lines, add a backslash (<code>\</code>) at the end of the first line.</p>
  2108. <p>
  2109. <!-- /wp:paragraph --></p>
  2110. <p><!-- wp:paragraph -->
  2111. </p>
  2112. <p>Text blocks are quite useful when you&#8217;re working with data that usually spans multiple lines, such as JSON, SQL queries, HTML, XML, and others. You could use text blocks to output beautiful line art, format log messages, or even generate simple bills for your neighbourhood stores.</p>
  2113. <p>
  2114. <!-- /wp:paragraph --></p>
  2115. <p><!-- wp:paragraph -->
  2116. </p>
  2117. <p>The release of Java 25 is around the corner. If you&#8217;re still working with an older version of the JDK, such as 8 or 11, I recommend moving to a newer version so you can benefit from newer features like text blocks.</p>
  2118. <p>
  2119. <!-- /wp:paragraph --></p>
  2120. <p><!-- wp:paragraph -->
  2121. </p>
  2122. <p>Happy coding!</p>
  2123. <p>
  2124. <!-- /wp:paragraph --></p>]]></content:encoded>
  2125. </item>
  2126. <item>
  2127. <title>Java Annotated Monthly – June 2025</title>
  2128. <link>https://blog.jetbrains.com/idea/2025/06/java-annotated-monthly-june-2025/</link>
  2129. <dc:creator><![CDATA[Irina Mariasova]]></dc:creator>
  2130. <pubDate>Fri, 06 Jun 2025 14:07:43 +0000</pubDate>
  2131. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/ij-featured_blog_1280x720_en.png</featuredImage> <category><![CDATA[news]]></category>
  2132. <category><![CDATA[ai]]></category>
  2133. <category><![CDATA[java]]></category>
  2134. <category><![CDATA[java-annotated-monthly]]></category>
  2135. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=573599</guid>
  2136.  
  2137. <description><![CDATA[Hi there, Java fans! It’s a new month, which means we’ve got a new batch of hot news, deep dives, and tasty tidbits from the Java world for you to enjoy. In this edition, Piotr Przybył joins us in the Featured Content section to share his cultivated list of content finds. We’re also testing a [&#8230;]]]></description>
  2138. <content:encoded><![CDATA[
  2139. <p>Hi there, Java fans! It’s a new month, which means we’ve got a new batch of hot news, deep dives, and tasty tidbits from the Java world for you to enjoy. In this edition, Piotr Przybył joins us in the Featured Content section to share his cultivated list of content finds. We’re also testing a new, more concise format that is faster to read but still packed with value. Let us know if you like it or miss the old style.&nbsp;</p>
  2140.  
  2141.  
  2142.  
  2143. <p>Ready? Let’s go!</p>
  2144.  
  2145.  
  2146.  
  2147. <h2 class="wp-block-heading">Featured Content</h2>
  2148.  
  2149.  
  2150.    <div class="about-author ">
  2151.        <div class="about-author__box">
  2152.            <div class="row">
  2153.                                                            <div class="about-author__box-img">
  2154.                            <img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/06/image1.jpg" alt="" loading="lazy">
  2155.                        </div>
  2156.                                        <div class="about-author__box-text">
  2157.                                                    <h4>Piotr Przybył</h4>
  2158.                                                <p><a href="https://softwaregarden.dev/" target="_blank" rel="noopener">Piotr Przybył</a> – Notorious engineer at work and after hours, tracing the meanders of the art of software engineering. Remote Software Gardener, mostly working in web-oriented Java gardens. Java Champion. Testcontainers Champion. Programming usually in Java (since 1.3), Scala, and Go, but in other languages too. A fan of agility, seen mostly as choosing the right tools and approaches after asking the right questions. Developer, trainer, and conference speaker, currently working for Elastic as a Senior Developer Advocate.</p>
  2159.                    </div>
  2160.                            </div>
  2161.        </div>
  2162.    </div>
  2163.  
  2164.  
  2165.  
  2166. <p><br>Greetings, fellow Java developers! It&#8217;s a pleasure to be here. It’s exciting to be in the Java community, for a language that celebrated its 30th anniversary, which has been proclaimed to be dead so many times, and it’s still doing surprisingly well. We can see that with all the exciting stuff happening around Java 25, and changes in the ecosystem at large.<br>I’m humbled and honoured to be here. It’s great to see the community and the ecosystem evolve, especially given that I’ve been a part of it since (checks notes…) 2003 ;-)<br><br>I was first exposed to Java at my alma mater, Wrocław University of Science and Technology. Recently, there’s been one more reason to be a proud alumnus: “Odra 5”!<br>&#8220;Odra 5&#8221; is the name of Poland&#8217;s first quantum computer, recently launched at the Wrocław University of Science and Technology. It’s a five-qubit machine, developed by Finnish company IQM Quantum Computers, that represents a significant milestone in the advancement of quantum computing in Central and Eastern Europe. I find the name cute and not without meaning for local IT history fans. You can read more about it here at the <a href="https://pwr.edu.pl/en/university/news/odra-5---a-quantum-computer-for-polish-science-10768.html" target="_blank" rel="noopener">University&#8217;s official page</a>. Also, “Odra” is the Polish name for the Oder river, and… <a href="https://en.wikipedia.org/wiki/Odra_(computer)" target="_blank" rel="noopener">computers manufactured in Wrocław in the 1960s</a>.</p>
  2167.  
  2168.  
  2169.  
  2170. <p>Let’s get back from general Computer Science to Java. Unless you have been living in total wilderness, I think you might have heard a thing or two about the AI (r)evolution happening recently. ;-) Contrary to some rumours, Java is a very decent language that benefits from improvements in this area, and with the release of Spring AI 1.0, things will get even easier! The <a href="https://www.elastic.co/search-labs/blog/spring-ai-elasticsearch-application" target="_blank" rel="noopener">article by Josh Long, Philipp Krenn, and Laura Trotta</a> (I know, and have lots of respect for all of them) will let you understand how to start with your own RAG quickly, benefiting from features of Spring AI, Elasticsearch, and more. Oh, and if you’d like to learn more about stuff like vector search or searching in general, AI, and so on, <a href="https://www.elastic.co/search-labs" target="_blank" rel="noopener">Elasticsearch Labs</a> might be a good place to start.</p>
  2171.  
  2172.  
  2173.  
  2174. <p>Speaking about Java itself, there’s of course the 30th anniversary of Java! It’s a big thing, although it might be disturbing to some that the language that keeps dying is still pretty much alive and actively developed. Right now, there are <a href="https://openjdk.org/projects/jdk/25/" target="_blank" rel="noopener">17 active Java Enhancement Proposals</a> targeting Java 25, which in my opinion proves that despite its size and legacy, the Java ecosystem is still evolving fast. I couldn’t resist, and wrote <a href="https://softwaregarden.dev/en/posts/varia/sc-es-devex-and-devadv/" target="_blank" rel="noopener">about Java&#8217;s Structured Concurrency, Elasticsearch Java client, DevEx, and a Developer Advocate&#8217;s job</a> on my personal page, touching on all of this.</p>
  2175.  
  2176.  
  2177.  
  2178. <p>I think that some reasons why our ecosystem is still robust are that we can learn from our past mistakes. While some of them are irreversible, many of them can shape how we think and evolve our systems and our daily jobs. A great example is the <a href="https://blog.allegro.tech/2025/05/popular-gradle-mistakes-and-how-to-avoid-them-part2.html" target="_blank" rel="noopener">Allegro folks sharing how to avoid mistakes in Gradle</a>, because with flexibility comes responsibility. And also, our tech stack and our jobs are not only the language, the SDK, the frameworks, and build/CI/CD tools, but predominantly our mindset. That’s something we shall all keep improving!</p>
  2179.  
  2180.  
  2181.  
  2182. <h2 class="wp-block-heading">Java News</h2>
  2183.  
  2184.  
  2185.  
  2186. <p>Check out the most recent news from the Java world:&nbsp;</p>
  2187.  
  2188.  
  2189.  
  2190. <ul>
  2191. <li>Java News Roundup <a href="https://www.infoq.com/news/2025/05/java-news-roundup-may05-2025/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">1</a>, <a href="https://www.infoq.com/news/2025/05/jdk-news-roundup-may12-2025/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">2</a>, <a href="https://www.infoq.com/news/2025/05/java-news-roundup-may12-2025/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">3</a>, <a href="https://www.infoq.com/news/2025/05/java-news-roundup-may19-2025/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">4</a></li>
  2192.  
  2193.  
  2194.  
  2195. <li><a href="https://www.infoq.com/news/2025/05/java-at-30/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Java at 30: A Retrospective on a Language That Has Made a Big Impact</a>&nbsp;</li>
  2196.  
  2197.  
  2198.  
  2199. <li><a href="https://foojay.io/today/foojay-podcast-71/" target="_blank" rel="noopener">Foojay Podcast #71: Celebrating 30 Years of Java with James Gosling</a></li>
  2200.  
  2201.  
  2202.  
  2203. <li><a href="https://www.jetbrains.com/lp/java-30/" target="_blank" rel="noopener">Java 30 by JetBrains</a></li>
  2204.  
  2205.  
  2206.  
  2207. <li><a href="https://donraab.medium.com/happy-30th-birthday-java-0b8095a1cd91" target="_blank" rel="noopener">Happy 30th Birthday, Java!</a></li>
  2208.  
  2209.  
  2210.  
  2211. <li><a href="https://www.youtube.com/live/LHHPbI7sYv8?t=8762s" target="_blank" rel="noopener">Java&#8217;s 30th Birthday</a></li>
  2212.  
  2213.  
  2214.  
  2215. <li><a href="https://thenewstack.io/java-at-30-the-genius-behind-the-code-that-changed-tech/" target="_blank" rel="noopener">Java at 30: The Genius Behind the Code That Changed Tech</a></li>
  2216.  
  2217.  
  2218.  
  2219. <li><a href="https://inside.java/2025/05/01/strings-just-got-faster/" target="_blank" rel="noopener">Strings Just Got Faster</a></li>
  2220.  
  2221.  
  2222.  
  2223. <li><a href="https://inside.java/2025/05/02/jep511-target-jdk25/" target="_blank" rel="noopener">JEP targeted to JDK 25: 511: Module Import Declarations</a></li>
  2224.  
  2225.  
  2226.  
  2227. <li><a href="https://inside.java/2025/05/06/jep512-target-jdk25/" target="_blank" rel="noopener">JEP targeted to JDK 25: 512: Compact Source Files and Instance Main Methods</a></li>
  2228.  
  2229.  
  2230.  
  2231. <li><a href="https://inside.java/2025/05/12/jep505-target-jdk25/" target="_blank" rel="noopener">JEP targeted to JDK 25: 505: Structured Concurrency (5th Preview)</a></li>
  2232.  
  2233.  
  2234.  
  2235. <li><a href="https://inside.java/2025/05/19/jep513-target-jdk25/" target="_blank" rel="noopener">JEP targeted to JDK 25: 513: Flexible Constructor Bodies</a></li>
  2236.  
  2237.  
  2238.  
  2239. <li><a href="https://www.infoq.com/news/2025/06/java25-stable-values-api-startup/" target="_blank" rel="noreferrer noopener">Java 25 Introduces Stable Values API for Deferred Immutability and Improved Application Startup</a>&nbsp;</li>
  2240.  
  2241.  
  2242.  
  2243. <li><a href="https://www.infoq.com/news/2025/05/jdk25-instance-main-methods/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Instance Main Methods Move from Preview to Final in JDK 25</a></li>
  2244.  
  2245.  
  2246.  
  2247. <li><a href="https://inside.java/2025/05/26/jep510-target-jdk25/" target="_blank" rel="noopener">JEP 510: Key Derivation Function API</a></li>
  2248.  
  2249.  
  2250.  
  2251. <li><a href="https://nipafx.dev/inside-java-newscast-91" target="_blank" rel="noopener">Structured Concurrency Revamp in Java 25 &#8211; Inside Java Newscast #91</a></li>
  2252. </ul>
  2253.  
  2254.  
  2255.  
  2256. <h2 class="wp-block-heading">Java Tutorials and Tips</h2>
  2257.  
  2258.  
  2259.  
  2260. <p>Learn new things and enjoy unique insights from industry experts:&nbsp;</p>
  2261.  
  2262.  
  2263.  
  2264. <ul>
  2265. <li><a href="https://inside.java/2025/05/05/podcast-035/" target="_blank" rel="noopener">Episode 35 “Stream Gatherers” with Viktor Klang</a></li>
  2266.  
  2267.  
  2268.  
  2269. <li><a href="https://www.selikoff.net/2025/05/02/oracles-new-certification-exam-engine/" target="_blank" rel="noopener">Oracle’s new certification exam engine</a></li>
  2270.  
  2271.  
  2272.  
  2273. <li><a href="https://www.infoq.com/news/2025/05/mcp-within-java-ecosystem/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Adoption of the Model Context Protocol Within the Java Ecosystem</a></li>
  2274.  
  2275.  
  2276.  
  2277. <li><a href="https://www.infoq.com/presentations/streaming-patterns/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Presentation: Stream All the Things — Patterns of Effective Data Stream Processing</a></li>
  2278.  
  2279.  
  2280.  
  2281. <li><a href="https://inside.java/2025/05/10/javaone-javafx/" target="_blank" rel="noopener">JavaFX 24 and Beyond</a></li>
  2282.  
  2283.  
  2284.  
  2285. <li><a href="https://inside.java/2025/05/14/javaone-garbage-collection/" target="_blank" rel="noopener">Garbage Collection in Java: The Performance Benefits of Upgrading</a></li>
  2286.  
  2287.  
  2288.  
  2289. <li><a href="https://inside.java/2025/05/15/javaone-jvm-troubleshooting/" target="_blank" rel="noopener">Mastering JVM Memory Troubleshooting &#8211; From OutOfMemoryErrors to Leaks</a></li>
  2290.  
  2291.  
  2292.  
  2293. <li><a href="https://inside.java/2025/05/16/podcast-036/" target="_blank" rel="noopener">Episode 36 “Ahead of Time Computation” with Dan Heidinga</a></li>
  2294.  
  2295.  
  2296.  
  2297. <li><a href="https://inside.java/2025/05/17/javaone-faster-jdk24/" target="_blank" rel="noopener">Java 24, Faster Than Ever</a></li>
  2298.  
  2299.  
  2300.  
  2301. <li><a href="https://nipafx.dev/talk-structured-concurrency" target="_blank" rel="noopener">Structured Concurrency in Action</a></li>
  2302.  
  2303.  
  2304.  
  2305. <li><a href="https://inside.java/2025/05/24/javaone-pattern-matching/" target="_blank" rel="noopener">Pattern Matching in Java: Better Code, Better APIs</a></li>
  2306.  
  2307.  
  2308.  
  2309. <li><a href="https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145905.html" target="_blank" rel="noreferrer noopener">Towards a JSON API for the JDK</a></li>
  2310. </ul>
  2311.  
  2312.  
  2313.  
  2314. <h2 class="wp-block-heading">Kotlin Corner</h2>
  2315.  
  2316.  
  2317.  
  2318. <p>Everything you might have missed about Kotlin in May:</p>
  2319.  
  2320.  
  2321.  
  2322. <ul>
  2323. <li><a href="https://blog.jetbrains.com/kotlin/2025/05/kotlinconf-2025-language-features-ai-powered-development-and-kotlin-multiplatform/">KotlinConf 2025 Unpacked: Upcoming Language Features, AI-Powered Development, and Kotlin Multiplatform Upgrades</a></li>
  2324.  
  2325.  
  2326.  
  2327. <li><a href="https://blog.jetbrains.com/ai/2025/05/meet-koog-empowering-kotlin-developers-to-build-ai-agents/">Meet Koog: Empowering Kotlin Developers to Build AI Agents&nbsp;</a></li>
  2328.  
  2329.  
  2330.  
  2331. <li><a href="https://blog.jetbrains.com/kotlin/2025/05/strategic-partnership-with-spring/">Strengthening Kotlin for Backend Development: A Strategic Partnership With Spring</a> <a href="https://blog.jetbrains.com/kotlin/2025/05/present-and-future-kotlin-for-web/">Present and Future of Kotlin for Web</a>&nbsp;</li>
  2332.  
  2333.  
  2334.  
  2335. <li><a href="https://blog.jetbrains.com/amper/2025/05/amper-update-may-2025/">Amper Update, May&#8217;25</a>&nbsp;</li>
  2336. </ul>
  2337.  
  2338.  
  2339.  
  2340. <ul>
  2341. <li><a href="https://blog.jetbrains.com/idea/2025/04/how-to-use-kotlin-notebooks-for-productive-development/">How to Use Kotlin Notebooks for Productive Development</a>&nbsp;</li>
  2342.  
  2343.  
  2344.  
  2345. <li><a href="https://blog.jetbrains.com/kotlin/2025/04/domain-driven-design-guide/">Structuring Ktor Projects Using Domain-Driven Design (DDD) Concepts&nbsp;</a></li>
  2346.  
  2347.  
  2348.  
  2349. <li><a href="https://github.com/Kotlin/kotlin-lsp" target="_blank" rel="noopener">Kotlin LSP</a> – The launch of the pre-Alpha Kotlin LSP and VS Code plugin.&nbsp;</li>
  2350. </ul>
  2351.  
  2352.  
  2353.  
  2354. <h2 class="wp-block-heading">AI</h2>
  2355.  
  2356.  
  2357.  
  2358. <p>Learn more about the most recent AI news, innovations, problems, and predictions:</p>
  2359.  
  2360.  
  2361.  
  2362. <ul>
  2363. <li><a href="https://nx.dev/blog/practical-guide-effective-ai-coding" target="_blank" rel="noopener">A Practical Guide on Effective AI Use &#8211; AI as Your Peer Programmer</a></li>
  2364.  
  2365.  
  2366.  
  2367. <li><a href="https://isabeliita90.hashnode.dev/working-with-junie-in-legacy-code" target="_blank" rel="noopener">Working with Junie in legacy code</a></li>
  2368.  
  2369.  
  2370.  
  2371. <li><a href="https://blog.jetbrains.com/research/2025/06/predict-the-future-of-ai-in-software-development/">Help Predict the Future of AI in Software Development!</a></li>
  2372.  
  2373.  
  2374.  
  2375. <li><a href="https://glaforge.dev/posts/2025/05/02/vibe-coding-an-mcp-server-with-micronaut-and-gemini/" target="_blank" rel="noopener">Vibe coding an MCP server with Micronaut, LangChain4j, and Gemini</a></li>
  2376.  
  2377.  
  2378.  
  2379. <li><a href="https://inside.java/2025/05/03/javaone-java-ai/" target="_blank" rel="noopener">Java for AI</a></li>
  2380.  
  2381.  
  2382.  
  2383. <li><a href="https://javapro.io/2025/04/23/build-ai-apps-and-agents-in-java-hands-on-with-langchain4j/" target="_blank" rel="noopener">Build AI Apps and Agents in Java: Hands-On with LangChain4j</a></li>
  2384.  
  2385.  
  2386.  
  2387. <li><a href="https://www.infoq.com/news/2025/05/ai-toolkit-unify-workflows/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">From Architecture to Deployment: How AI-Powered Toolkits Are Unifying Developer Workflows</a></li>
  2388.  
  2389.  
  2390.  
  2391. <li><a href="https://www.infoq.com/podcasts/improve-quality-gen-ai/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Podcast: How To Improve the Quality of the Gen AI-Generated Code And Your Team’s Dynamics</a></li>
  2392.  
  2393.  
  2394.  
  2395. <li><a href="https://foojay.io/today/genai-blood-sweat-and-tears-loading-data-to-pinecone/" target="_blank" rel="noopener">GenAI blood, sweat, and tears: Loading data to Pinecone</a></li>
  2396.  
  2397.  
  2398.  
  2399. <li><a href="https://blog.jetbrains.com/ai/2025/05/meet-koog-empowering-kotlin-developers-to-build-ai-agents/">Meet Koog: Empowering Kotlin Developers to Build AI Agents</a></li>
  2400.  
  2401.  
  2402.  
  2403. <li><a href="https://blog.jetbrains.com/ai/2025/05/jetbrains-ai-assistant-now-in-visual-studio-code/">JetBrains AI Assistant – Now in Visual Studio Code</a></li>
  2404.  
  2405.  
  2406.  
  2407. <li><a href="https://glaforge.dev/posts/2025/05/20/writing-java-ai-agents-with-adk-for-java-getting-started/" target="_blank" rel="noopener">Write AI agents in Java — Agent Development Kit getting started guide</a></li>
  2408.  
  2409.  
  2410.  
  2411. <li><a href="https://foojay.io/today/how-to-send-prompts-in-bulk-with-spring-ai-and-java-virtual-threads/" target="_blank" rel="noopener">How to send prompts in bulk with Spring AI and Java Virtual Threads</a></li>
  2412.  
  2413.  
  2414.  
  2415. <li><a href="https://glaforge.dev/posts/2025/05/23/beyond-the-chatbot-or-ai-sparkle-a-seamless-ai-integration/" target="_blank" rel="noopener">Beyond the chatbot or AI sparkle: a seamless AI integration</a></li>
  2416.  
  2417.  
  2418.  
  2419. <li><a href="https://foojay.io/today/ai-driven-testing-best-practices/" target="_blank" rel="noopener">AI Test Generation: A Dev’s Guide Without Shooting Yourself in the Foot</a></li>
  2420.  
  2421.  
  2422.  
  2423. <li><a href="https://glaforge.dev/talks/2025/05/26/things-you-never-dared-to-ask-about-llms-take-2/" target="_blank" rel="noopener">Things you never dared to ask about LLMs — Take 2</a></li>
  2424.  
  2425.  
  2426.  
  2427. <li><a href="https://www.youtube.com/watch?v=ZPlD0rpiFwQ" target="_blank" rel="noopener">Ethics in AI&#8217;s Wild West: Biases &amp; Responsibilities</a></li>
  2428.  
  2429.  
  2430.  
  2431. <li><a href="https://blog.jetbrains.com/ai/2025/06/context-collection-competition/">Context Collection Competition by JetBrains and Mistral AI</a></li>
  2432.  
  2433.  
  2434.  
  2435. <li><a href="https://foojay.io/today/brokk-for-java-developers/" target="_blank" rel="noreferrer noopener">Brokk: AI for Large (Java) Codebases</a>&nbsp;</li>
  2436. </ul>
  2437.  
  2438.  
  2439.  
  2440. <h2 class="wp-block-heading">Languages, Frameworks, Libraries, and Technologies</h2>
  2441.  
  2442.  
  2443.  
  2444. <p>Get to know programming technologies and frameworks better:</p>
  2445.  
  2446.  
  2447.  
  2448. <ul>
  2449. <li>This Week in Spring <a href="https://spring.io/blog/2025/05/06/this-week-in-spring-may-6th-2025" target="_blank" rel="noopener">1</a>, <a href="https://spring.io/blog/2025/05/13/this-week-in-spring-may-13th-2025" target="_blank" rel="noopener">2</a>, <a href="https://spring.io/blog/2025/05/20/this-week-in-spring-may-20th-2025" target="_blank" rel="noopener">3</a>, <a href="https://spring.io/blog/2025/05/27/this-week-in-spring-may-27th-2025" target="_blank" rel="noopener">4</a></li>
  2450.  
  2451.  
  2452.  
  2453. <li><a href="https://foojay.io/today/how-to-send-prompts-in-bulk-with-spring-ai-and-java-virtual-threads/" target="_blank" rel="noreferrer noopener">How to send prompts in bulk with Spring AI and Java Virtual Threads</a></li>
  2454.  
  2455.  
  2456.  
  2457. <li><a href="https://spring.io/blog/2025/05/04/spring-ai-dynamic-tool-updates-with-mcp" target="_blank" rel="noopener">Dynamic Tool Updates in Spring AI&#8217;s Model Context Protocol</a></li>
  2458.  
  2459.  
  2460.  
  2461. <li><a href="https://blog.gradle.org/gradle-best-practices" target="_blank" rel="noopener">Gradle Best Practices &#8211; A Path to Build Happiness</a></li>
  2462.  
  2463.  
  2464.  
  2465. <li><a href="https://foojay.io/today/semantic-search-with-spring-boot-redis/" target="_blank" rel="noopener">Semantic Search with Spring Boot &amp; Redis</a></li>
  2466.  
  2467.  
  2468.  
  2469. <li><a href="https://foojay.io/today/local-ai-with-spring-building-privacy-first-agents-using-ollama/" target="_blank" rel="noopener">Local AI with Spring: Building Privacy-First Agents Using Ollama</a></li>
  2470.  
  2471.  
  2472.  
  2473. <li><a href="https://spring.io/blog/2025/05/08/a-bootiful-podcast-v-korbes" target="_blank" rel="noopener">A Bootiful Podcast: V Körbes on security from the platform on up</a></li>
  2474.  
  2475.  
  2476.  
  2477. <li><a href="https://foojay.io/today/what-is-rag-and-how-to-secure-it/" target="_blank" rel="noopener">What is RAG, and How to Secure It</a></li>
  2478. </ul>
  2479.  
  2480.  
  2481.  
  2482. <h2 class="wp-block-heading">Conferences and Events</h2>
  2483.  
  2484.  
  2485.  
  2486. <p>Here are some of the must-attend online and offline events in June:</p>
  2487.  
  2488.  
  2489.  
  2490. <ul>
  2491. <li><a href="https://lp.jetbrains.com/intellij-idea-conf-2025/?utm_source=newsletter&amp;utm_medium=jam&amp;utm_campaign=intellijideaconf" target="_blank" rel="noopener">IntelliJ IDEA Conf</a> – Online, June 3–4</li>
  2492.  
  2493.  
  2494.  
  2495. <li><a href="https://jspring.nl/" target="_blank" rel="noopener">J-Spring</a> – Utrecht, Netherlands, June 5; <a href="https://x.com/antonarhipov" target="_blank">Anton Arhipov</a> is a speaker. </li>
  2496.  
  2497.  
  2498.  
  2499. <li><a href="https://javaday.parisjug.org/" target="_blank" rel="noopener">Le Paris JUG Java Day</a> – Paris, France, June 5</li>
  2500.  
  2501.  
  2502.  
  2503. <li><a href="https://jconf.mx/" target="_blank" rel="noopener">JConf Méx</a> – Nuevo México, Mexico, June 7</li>
  2504.  
  2505.  
  2506.  
  2507. <li><a href="https://devoxx.pl/" target="_blank" rel="noopener">Devoxx Poland</a> – Krakow, Poland, June 11–13; <a href="https://x.com/antonarhipov" target="_blank">Anton Arhipov</a> and <a href="https://x.com/MaritvanDijk77" target="_blank">Marit van Dijk</a> are the speakers. </li>
  2508.  
  2509.  
  2510.  
  2511. <li><a href="https://www.devconf.info/cz/" target="_blank" rel="noopener">DevConf</a> – Brno, Czechia, June 12–14</li>
  2512.  
  2513.  
  2514.  
  2515. <li><a href="https://jsail.ijug.eu/" target="_blank" rel="noopener">JSail Unconference</a> – Hemelum, Netherlands, June 23–27</li>
  2516.  
  2517.  
  2518.  
  2519. <li><a href="https://luxembourg.voxxeddays.com/en/" target="_blank" rel="noopener">Voxxed Days Luxembourg</a> – Mondorf-les-Bains, Luxembourg, June 19–20</li>
  2520. </ul>
  2521.  
  2522.  
  2523.  
  2524. <h2 class="wp-block-heading">Culture and Community</h2>
  2525.  
  2526.  
  2527.  
  2528. <p>Take some time to think about the non-tech topics that are of significance to tech people at the moment:</p>
  2529.  
  2530.  
  2531.  
  2532. <ul>
  2533. <li><a href="https://brightnessbalance.com/imposter-syndrome-in-tech-part-1-never-being-enough/" target="_blank" rel="noopener">Imposter Syndrome in Tech</a></li>
  2534.  
  2535.  
  2536.  
  2537. <li><a href="https://www.infoq.com/podcasts/achieving-sustainable-mental-peace/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Achieving Sustainable Mental Peace in Software Engineering with Help from Generative AI</a></li>
  2538.  
  2539.  
  2540.  
  2541. <li><a href="https://www.javaspecialists.eu/archive/Issue325-Be-a-Distinguished-Java-Engineer-in-the-Age-of-Vibe-Coding.html" target="_blank" rel="noreferrer noopener">Be a Distinguished Java Engineer in the Age of Vibe Coding</a></li>
  2542.  
  2543.  
  2544.  
  2545. <li><a href="https://www.infoq.com/presentations/culture-resilience/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">Built to Outlast: Cultivating a Culture of Resilience</a></li>
  2546.  
  2547.  
  2548.  
  2549. <li><a href="https://foojay.io/today/book-review-raising-young-coders/" target="_blank" rel="noopener">Book Review: Raising Young Coders</a></li>
  2550.  
  2551.  
  2552.  
  2553. <li><a href="https://www.infoq.com/articles/emotional-mastery-tech-leaders/?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=global" target="_blank" rel="noopener">From Code to Charisma: Emotional Mastery for Tech Leaders</a></li>
  2554.  
  2555.  
  2556.  
  2557. <li><a href="https://hilton.org.uk/blog/97-jokes" target="_blank" rel="noopener">97 Jokes Every Programmer Should Know</a></li>
  2558.  
  2559.  
  2560.  
  2561. <li><a href="https://donraab.medium.com/conversations-ive-had-with-code-583f0fd67363" target="_blank" rel="noopener">Conversations I’ve had with Code</a></li>
  2562.  
  2563.  
  2564.  
  2565. <li><a href="https://blog.jetbrains.com/ai/2025/05/what-can-ai-do-to-improve-diversity-in-the-tech-community/">What Can AI Do to Improve Diversity in the Tech Community?</a></li>
  2566. </ul>
  2567.  
  2568.  
  2569.  
  2570. <h2 class="wp-block-heading">And Finally…</h2>
  2571.  
  2572.  
  2573.  
  2574. <p>Don’t miss the latest updates from the IntelliJ IDEA team:&nbsp;</p>
  2575.  
  2576.  
  2577.  
  2578. <ul>
  2579. <li><a href="https://blog.jetbrains.com/idea/2025/05/sources-bytecode-debugging/">Sources, Bytecode, Debugging</a></li>
  2580.  
  2581.  
  2582.  
  2583. <li><a href="https://blog.jetbrains.com/idea/2025/05/do-you-really-know-java/">Do You Really Know Java?</a></li>
  2584.  
  2585.  
  2586.  
  2587. <li><a href="https://blog.jetbrains.com/idea/2025/05/coding-guidelines-for-your-ai-agents/">Coding Guidelines for Your AI Agents</a></li>
  2588.  
  2589.  
  2590.  
  2591. <li><a href="https://blog.jetbrains.com/idea/2025/05/finding-your-tribe-jugs-unveiled/">Finding Your Tribe – JUGs Unveiled&nbsp;</a></li>
  2592.  
  2593.  
  2594.  
  2595. <li><a href="https://blog.jetbrains.com/idea/2025/05/the-intellij-idea-2025-2-eap/">The IntelliJ IDEA 2025.2 Early Access Program Is Open!</a></li>
  2596.  
  2597.  
  2598.  
  2599. <li><a href="https://blog.jetbrains.com/idea/2025/05/try-declarative-gradle-eap3-in-intellij-idea/">Try Declarative Gradle EAP3 in IntelliJ IDEA</a></li>
  2600.  
  2601.  
  2602.  
  2603. <li><a href="https://blog.jetbrains.com/idea/2025/05/building-cloud-ready-apps-locally-spring-boot-aws-and-localstack-in-action/">Building Cloud-Ready Apps Locally: Spring Boot, AWS, and LocalStack in Action</a></li>
  2604. </ul>
  2605.  
  2606.  
  2607.  
  2608. <p>That’s it for today! We’re always collecting ideas for the next Java Annotated Monthly – send us your suggestions via <a href="https://mail.google.com/mail/u/0/?fs=1&amp;tf=cm&amp;source=mailto&amp;to=JAM@jetbrains.com" target="_blank" rel="noopener">email</a> or <a href="https://x.com/intellijidea?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor" target="_blank">X</a> by June 20. Don’t forget to check out our archive of <a href="https://www.jetbrains.com/lp/jam/" target="_blank" rel="noopener">past JAM issues</a> for any articles you might have missed!</p>
  2609. ]]></content:encoded>
  2610. </item>
  2611. <item>
  2612. <title>IntelliJ IDEA 2025.1.2 Is Out!</title>
  2613. <link>https://blog.jetbrains.com/idea/2025/06/intellij-idea-2025-1-2/</link>
  2614. <dc:creator><![CDATA[Maria Kosukhina]]></dc:creator>
  2615. <pubDate>Wed, 04 Jun 2025 14:08:58 +0000</pubDate>
  2616. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/06/IJ-IDEA-2025.1.2.png</featuredImage> <category><![CDATA[releases]]></category>
  2617. <category><![CDATA[bug-fix-update]]></category>
  2618. <category><![CDATA[intellij-idea-2025-1]]></category>
  2619. <category><![CDATA[intellij-idea-2025-1-2-2]]></category>
  2620. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=572979</guid>
  2621.  
  2622. <description><![CDATA[IntelliJ IDEA 2025.1.2 has arrived with several valuable fixes. You can update to this version from inside the IDE, using the&#160;Toolbox App, or using snaps if you are a Ubuntu user. You can also download it from our&#160;website. Here are the most notable updates included in this version: To find out more details about the [&#8230;]]]></description>
  2623. <content:encoded><![CDATA[
  2624. <p>IntelliJ IDEA 2025.1.2 has arrived with several valuable fixes.</p>
  2625.  
  2626.  
  2627.  
  2628. <p>You can update to this version from inside the IDE, using the&nbsp;<a href="https://www.jetbrains.com/toolbox-app/" target="_blank" rel="noreferrer noopener">Toolbox App</a>, or using snaps if you are a Ubuntu user. You can also download it from our&nbsp;<a href="https://www.jetbrains.com/idea/download/" target="_blank" rel="noreferrer noopener">website</a>.</p>
  2629.  
  2630.  
  2631.  
  2632. <p>Here are the most notable updates included in this version:</p>
  2633.  
  2634.  
  2635.  
  2636. <ul>
  2637. <li>The IDE no longer fails to start if a plugin defines an action with unresolved message bundle keys, and it now provides a report identifying the problematic plugin. [<a href="https://youtrack.jetbrains.com/issue/IJPL-185981" target="_blank" rel="noopener">IJPL-185981</a>]</li>
  2638.  
  2639.  
  2640.  
  2641. <li>The IDE no longer produces the false positive <em>“Package is declared in module which is not in the module graph” </em>warning. [<a href="https://youtrack.jetbrains.com/issue/IDEA-371051" target="_blank" rel="noopener">IDEA-371051</a>]</li>
  2642.  
  2643.  
  2644.  
  2645. <li>The IDE once again correctly takes <code>compilerArgs</code> from <em>pom.xml </em>into account when building Maven projects. [<a href="https://youtrack.jetbrains.com/issue/IDEA-371747" target="_blank" rel="noopener">IDEA-371747</a>]</li>
  2646.  
  2647.  
  2648.  
  2649. <li>The GitLab code review mode now functions as expected, correctly displaying changes with proper highlighting. [<a href="https://youtrack.jetbrains.com/issue/IJPL-186195/251-GitLab-Review-Mode-does-not-work-anymore" target="_blank" rel="noopener">IJPL-186195</a>]</li>
  2650.  
  2651.  
  2652.  
  2653. <li>Working directories are once again preserved upon restart when working with the new terminal. [<a href="https://youtrack.jetbrains.com/issue/IJPL-163552/New-Terminal-doesnt-preserve-working-directory-upon-restart" target="_blank" rel="noopener">IJPL-163552</a>]</li>
  2654.  
  2655.  
  2656.  
  2657. <li>Inspections in Terraform can now be suppressed again. [<a href="https://youtrack.jetbrains.com/issue/IJPL-149116/Suppress-inspection-dont-work-in-TerraForm-file" target="_blank" rel="noopener">IJPL-149116</a>]</li>
  2658.  
  2659.  
  2660.  
  2661. <li>Font size rescaling for the <em>Quick Documentation</em> popup works as expected. [<a href="https://youtrack.jetbrains.com/issue/IJPL-184559/Cannot-adjust-font-size-of-quick-documentation-pop-up-windows" target="_blank" rel="noopener">IJPL-184559</a>]</li>
  2662.  
  2663.  
  2664.  
  2665. <li>The <em>Git </em>option now appears correctly in the context menu when right-clicking a file or folder in a project located on a path that includes a symbolic link. [<a href="https://youtrack.jetbrains.com/issue/IJPL-181017" target="_blank" rel="noopener">IJPL-181017</a>]</li>
  2666. </ul>
  2667.  
  2668.  
  2669.  
  2670. <p></p>
  2671.  
  2672.  
  2673.  
  2674. <p>To find out more details about the issues resolved, please refer to the <a href="https://youtrack.jetbrains.com/articles/IDEA-A-2100662452/IntelliJ-IDEA-2025.1.2-251.26094.121-build-Release-Notes" target="_blank" rel="noopener">release notes</a>.</p>
  2675.  
  2676.  
  2677.  
  2678. <p>If you encounter any bugs, please report them to our&nbsp;<a href="https://youtrack.jetbrains.com/issues/IDEA" target="_blank" rel="noreferrer noopener">issue tracker</a>.</p>
  2679.  
  2680.  
  2681.  
  2682. <p>Happy developing!</p>
  2683. ]]></content:encoded>
  2684. </item>
  2685. <item>
  2686. <title>How Java Open-Source Projects Use IntelliJ IDEA: Real-World Examples – Part 1</title>
  2687. <link>https://blog.jetbrains.com/blog/2025/05/27/how-java-open-source-projects-use-intellij-idea-real-world-examples-part-1/</link>
  2688. <dc:creator><![CDATA[Lena Morozova]]></dc:creator>
  2689. <pubDate>Tue, 27 May 2025 10:50:00 +0000</pubDate>
  2690. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/05/IJ-social-BlogFeatured-1280x720-2x-1.png</featuredImage> <product ><![CDATA[idea]]></product>
  2691. <category><![CDATA[community]]></category>
  2692. <category><![CDATA[idea]]></category>
  2693. <category><![CDATA[community-support]]></category>
  2694. <category><![CDATA[intellij-idea]]></category>
  2695. <category><![CDATA[open-source-program]]></category>
  2696. <category><![CDATA[oss-projects]]></category>
  2697. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=blog&#038;p=570145</guid>
  2698.  
  2699. <description><![CDATA[At JetBrains, we build tools to help developers stay focused and productive, and we’re especially proud when those tools help power the open-source projects that developers around the world rely on every day. Shaping the direction of Java development, such projects contribute substantially to the vibrant Java ecosystem. This two-part series highlights some of the [&#8230;]]]></description>
  2700. <content:encoded><![CDATA[
  2701. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="2560" height="1440" src="https://blog.jetbrains.com/wp-content/uploads/2025/05/IJ-social-BlogFeatured-1280x720-2x-1.png" alt="" class="wp-image-570146"/></figure>
  2702.  
  2703.  
  2704.  
  2705. <p>At JetBrains, we build tools to help developers stay focused and productive, and we’re especially proud when those tools help power the open-source projects that developers around the world rely on every day. Shaping the direction of Java development, such projects contribute substantially to the vibrant Java ecosystem.</p>
  2706.  
  2707.  
  2708.  
  2709. <p>This two-part series highlights some of the most impressive open-source Java projects we support. From testing frameworks and HTML parsers to innovative web libraries and languages, each of these projects reflects the creativity and ingenuity of the Java community. In each case, JetBrains IDEs like IntelliJ IDEA help developers ship faster, work more confidently, and write better code.</p>
  2710.  
  2711.  
  2712.  
  2713. <h2 class="wp-block-heading">☕ Spring Framework</h2>
  2714.  
  2715.  
  2716.  
  2717. <p><em>The world’s most popular Java framework.</em></p>
  2718.  
  2719.  
  2720.  
  2721. <p><a href="https://github.com/spring-projects" target="_blank" rel="noopener">Spring</a> needs little introduction. It’s the backbone of modern Java server-side development, with a strong focus on simplicity, productivity, and the developer experience. JetBrains shares those values, and the close collaboration between the Spring and JetBrains teams promotes synergies for server-side developers worldwide.</p>
  2722.  
  2723.  
  2724.  
  2725. <blockquote class="wp-block-quote">
  2726. <p>Feedback from the Spring team helps ensure IntelliJ IDEA offers a seamless, intuitive experience for Spring developers – even as new features are introduced. Kotlin also continues to shape Spring’s direction: null-safety support introduced in Spring Framework 5 is evolving in version 7 with JSpecify annotations, benefiting both Java and Kotlin users.</p>
  2727. <cite><em>— Sébastien Deleuze, Spring Framework core committer</em></cite></blockquote>
  2728.  
  2729.  
  2730.  
  2731. <p>The Spring community is now focusing on Spring AI – an application framework that brings Spring’s principles of modularity and portability to the AI domain using familiar POJO (Plain Old Java Object) patterns, with support for both Java and Kotlin. The team also continues to invest in runtime efficiency through GraalVM native image support, Project Leyden JVM optimizations, and clever defaults in Spring Boot. Mature parts of the framework are evolving too, with features like client-side API versioning on the way.</p>
  2732.  
  2733.  
  2734.  
  2735. <h2 class="wp-block-heading">🕹️ Play Framework</h2>
  2736.  
  2737.  
  2738.  
  2739. <p><em>A high-performance, developer-friendly web framework for Scala and Java.</em></p>
  2740.  
  2741.  
  2742.  
  2743. <p>The <a href="https://github.com/playframework/playframework/" target="_blank" rel="noopener">Play Framework</a> is trusted for a wide range of applications, including high-traffic news platforms and national tax systems. It focuses on scalability and simplicity and prioritizes the developer experience, offering built-in tooling, a reactive model, and a stateless architecture.</p>
  2744.  
  2745.  
  2746.  
  2747. <blockquote class="wp-block-quote">
  2748. <p>We primarily use IntelliJ IDEA for Play development, and it’s been fantastic. The Scala plugin offers first-class support for SBT and Scala, along with dedicated features for Play projects – like syntax highlighting and navigation for route files and Twirl templates. Scala 3 support is now very mature, and it’s clear that the JetBrains team truly cares about the Scala and Play Framework communities.</p>
  2749. <cite><em>— Matthias Kurz, Play Framework maintainer</em></cite></blockquote>
  2750.  
  2751.  
  2752.  
  2753. <p>The next major Play release, expected in mid-2025, focuses on steady, thoughtful improvements. Highlights include Gradle support, enhanced Kotlin compatibility, improved WebSockets, and better support for modern web standards and database migrations. The release will also complete the transition to the Jakarta namespace, ensure compatibility with Java 25 LTS, and include upgrades to Pekko and other core dependencies.</p>
  2754.  
  2755.  
  2756.  
  2757. <h2 class="wp-block-heading">🧩 Koin</h2>
  2758.  
  2759.  
  2760.  
  2761. <p><em>A simple and powerful dependency injection framework for Kotlin.</em></p>
  2762.  
  2763.  
  2764.  
  2765. <p><a href="https://github.com/InsertKoinIO/koin" target="_blank" rel="noopener">Koin</a> was created to make dependency injection in Kotlin simple, lightweight, and intuitive – especially for Android. Existing dependency injection tools were too complex and slow to compile, or they didn’t fully embrace Kotlin’s strengths. Inspired by Spring Boot and Kotlin’s expressive features, Koin introduced a clean DSL, smart defaults, and seamless integrations, providing intuitive dependency injection support.</p>
  2766.  
  2767.  
  2768.  
  2769. <blockquote class="wp-block-quote">
  2770. <p>IntelliJ IDEA is my daily go-to tool – first for Java, and even more so for Kotlin thanks to its excellent end-to-end support. That experience inspired us to create the Koin plugin: a tool that brings visual feedback, real-time safety checks, and seamless navigation for Koin definitions right into the IDE.</p>
  2771. <cite><em>— Arnaud Giuliani, creator of Koin</em></cite></blockquote>
  2772.  
  2773.  
  2774.  
  2775. <p>The Koin team is actively working on version 4.1, which will bring enhanced support for Compose Multiplatform and KMP, integrated compatibility with Ktor 3.1, and a new set of Scope features. Looking ahead, version 4.2 is already in development, with a focus on deeper coroutine integration, a new Job Scheduler API, Kotlin RPC support, and further improvements to the Koin DSL.</p>
  2776.  
  2777.  
  2778.  
  2779. <h2 class="wp-block-heading">🔧 Micronaut</h2>
  2780.  
  2781.  
  2782.  
  2783. <p><em>A modern, lightweight framework built for fast startup and low memory use.</em></p>
  2784.  
  2785.  
  2786.  
  2787. <p><a href="https://github.com/micronaut-projects/micronaut-core" target="_blank" rel="noopener">Micronaut</a> was created in 2018 by the core team behind the Groovy-based Grails framework, known for its strong focus on developer productivity. The team saw an opportunity to rethink how Java frameworks handle work traditionally done at runtime. By shifting more processing to the compile phase, Micronaut dramatically reduces memory usage and startup time while maintaining a smooth, productive developer experience.</p>
  2788.  
  2789.  
  2790.  
  2791. <blockquote class="wp-block-quote">
  2792. <p>Micronaut supports Java, Kotlin, and Groovy – and IntelliJ IDEA offers first-class support for all three. Features like build delegation to Gradle or Maven, a built-in<a href="https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html" target="_blank" rel="noopener"> HTTP client</a>,<a href="https://www.jetbrains.com/help/idea/code-coverage.html" target="_blank" rel="noopener"> code coverage</a> tools, and powerful debugging – including for<a href="https://www.jetbrains.com/help/idea/debug-graalvm-native.html" target="_blank" rel="noopener"> GraalVM native images</a> – make IntelliJ IDEA a great environment for developing and maintaining modern Micronaut applications.</p>
  2793. <cite><em>— Sergio del Amo, Micronaut Development Leadership Panel member</em></cite></blockquote>
  2794.  
  2795.  
  2796.  
  2797. <p>Micronaut follows<a href="https://micronaut.io/micronaut-roadmap/" target="_blank" rel="noopener"> strict semantic versioning</a>, reflecting its commitment to stability and modern development. The framework’s core mission remains unchanged: to deliver an excellent developer experience while minimizing memory usage and optimizing startup time, both of which have a direct impact on productivity.</p>
  2798.  
  2799.  
  2800.  
  2801. <h2 class="wp-block-heading">🔍 OpenGrok</h2>
  2802.  
  2803.  
  2804.  
  2805. <p><em>A fast, full-featured source code search and cross-referencing engine for large codebases.</em></p>
  2806.  
  2807.  
  2808.  
  2809. <p><a href="https://github.com/oracle/opengrok" target="_blank" rel="noopener">OpenGrok</a> helps developers understand and navigate large, complex codebases across multiple languages and version control systems. The tool has evolved into a powerful, extensible search platform used by engineering teams worldwide.</p>
  2810.  
  2811.  
  2812.  
  2813. <blockquote class="wp-block-quote">
  2814. <p>We recently explained to a colleague why we use IntelliJ IDEA. It really helps us work more efficiently – for example, we can debug JSPs directly in a Tomcat instance running from the IDE, view runtime graphs, and use powerful refactoring tools.</p>
  2815. <cite><em>— Ľuboš Koščo and Vladimír Kotal, OpenGrok maintainers</em></cite></blockquote>
  2816.  
  2817.  
  2818.  
  2819. <p>The OpenGrok development team is currently focusing on boosting performance and stability, particularly for large datasets. This involves reducing the amount of indexing data to run OpenGrok efficiently in lightweight Docker containers and phasing out the JavaBeans serialization format. Looking further ahead, the team aims to improve support for binary file formats and explore the possibility of adding new analyzers to extend OpenGrok’s capabilities.</p>
  2820.  
  2821.  
  2822.  
  2823. <hr class="wp-block-separator has-alpha-channel-opacity"/>
  2824.  
  2825.  
  2826.  
  2827. <p>Stay tuned for Part 2, where we dive into more projects. In the meantime, join us on June 3–4 for <a href="https://lp.jetbrains.com/intellij-idea-conf-2025/?utm_source=blog&amp;utm_medium=jetbrains&amp;utm_campaign=intellijideaconf&amp;utm_content=oss" target="_blank" rel="noopener">IntelliJ IDEA Conf 2025</a>, our free online event celebrating modern Java development. Whether you’re working on open source projects, building enterprise apps, or still learning the ropes, it’s a great opportunity to learn about best practices and find inspiration in how industry experts are building with IntelliJ IDEA.</p>
  2828.  
  2829.  
  2830.  
  2831. <figure class="wp-block-image size-full"><a href="https://lp.jetbrains.com/intellij-idea-conf-2025/?utm_source=blog&amp;utm_medium=jetbrains&amp;utm_campaign=intellijideaconf&amp;utm_content=oss" target="_blank" rel="noopener"><img decoding="async" loading="lazy" width="1300" height="400" src="https://blog.jetbrains.com/wp-content/uploads/2025/05/Email-banner-650x200-2x-Register.png" alt="" class="wp-image-570196"/></a></figure>
  2832. ]]></content:encoded>
  2833.                    <language>
  2834.                        <code><![CDATA[zh-hans]]></code>
  2835.                        <url>https://blog.jetbrains.com/zh-hans/blog/2025/05/27/how-java-open-source-projects-use-intellij-idea-real-world-examples-part-1/</url>
  2836.                    </language>
  2837.                                    <language>
  2838.                        <code><![CDATA[ko]]></code>
  2839.                        <url>https://blog.jetbrains.com/ko/blog/2025/05/27/how-java-open-source-projects-use-intellij-idea-real-world-examples-part-1/</url>
  2840.                    </language>
  2841.                 </item>
  2842. <item>
  2843. <title>Sources, Bytecode, Debugging</title>
  2844. <link>https://blog.jetbrains.com/idea/2025/05/sources-bytecode-debugging/</link>
  2845. <dc:creator><![CDATA[Igor Kulakov]]></dc:creator>
  2846. <pubDate>Mon, 26 May 2025 12:18:20 +0000</pubDate>
  2847. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/05/IJ-social-BlogFeatured-1280x720-2x-3.png</featuredImage> <category><![CDATA[idea]]></category>
  2848. <category><![CDATA[internals]]></category>
  2849. <category><![CDATA[java]]></category>
  2850. <category><![CDATA[tips-tricks]]></category>
  2851. <category><![CDATA[debug]]></category>
  2852. <category><![CDATA[debugger]]></category>
  2853. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=569893</guid>
  2854.  
  2855. <description><![CDATA[When debugging Java programs, developers are often under the impression that they&#8217;re interacting directly with the source code. This isn’t surprising – Java’s tooling does such an excellent job of hiding the complexity that it almost feels as if the source code exists at runtime. If you’re just starting with Java, you likely remember those [&#8230;]]]></description>
  2856. <content:encoded><![CDATA[<p>When debugging Java programs, developers are often under the impression that they&#8217;re interacting directly with the source code. This isn’t surprising – Java’s tooling does such an excellent job of hiding the complexity that it almost feels as if the source code exists at runtime.</p>
  2857. <p>If you’re just starting with Java, you likely remember those diagrams showing how the compiler transforms source code into bytecode, which is then executed by the JVM. You might also wonder: if that’s the case, why do we examine and step through the source code rather than the bytecode? How does the JVM know anything about our sources?</p>
  2858. <p>This article is a little different from my <a href="https://blog.jetbrains.com/author/igor-kulakov-jetbrains-com/">previous posts</a> on debugging. Instead of focusing on how to debug a specific problem, such as an unresponsive app or a memory leak, it explores how Java and debuggers work behind the scenes. Stick around – as always, a couple of handy tricks are included.</p>
  2859. <h2>Bytecode</h2>
  2860. <p>Let’s start with a quick recap. The diagrams found in Java books and guides are indeed correct – the JVM executes bytecode.</p>
  2861. <p>Consider the following class as an example:</p>
  2862. <pre class="EnlighterJSRAW" data-enlighter-language="">package dev.flounder;
  2863.  
  2864. public class Calculator {
  2865.    int sum(int a, int b) {
  2866.        return a + b;
  2867.    }
  2868. }</pre>
  2869. <p>When compiled, the <code>sum()</code> method will turn into the following bytecode:</p>
  2870. <pre><code lang="plain">int sum(int, int);
  2871.    descriptor: (II)I
  2872.    flags: (0x0000)
  2873.    Code:
  2874.      stack=2, locals=3, args_size=3
  2875.         0: iload_1
  2876.         1: iload_2
  2877.         2: iadd
  2878.         3: ireturn
  2879. </code></pre>
  2880. <p><b>Tip</b>: You can inspect the bytecode of your classes using the <code>javap -v</code> command included with the JDK. If you are using IntelliJ IDEA, you can also do this from the IDE: after building your project, select a class, and then click <i>View</i> | <i>Show Bytecode</i>.</p>
  2881. <p><b>Note</b>: Since class files are binary, citing their raw contents would not be informative. For readability, the examples in this article follow the format of <code>javap -v</code> output.</p>
  2882. <p>Bytecode consists of a series of compact platform-independent instructions. In the example above:</p>
  2883. <ol>
  2884. <li><code>iload_1</code> and <code>iload_2</code> load the variables onto the operand stack.</li>
  2885. <li><code>iadd</code> adds the contents of the operand stack, leaving a single result value on it.</li>
  2886. <li><code>ireturn</code> returns the value from the operand stack.</li>
  2887. </ol>
  2888. <p>In addition to instructions, bytecode files also include information on the constants, the number of parameters, local variables, and the depth of the operand stack. This is all the JVM needs to execute a program written in a JVM language, such as Java, Kotlin, or Scala.</p>
  2889. <h2>Debug information</h2>
  2890. <p>Since bytecode looks completely different from your source code, referring to it while debugging would be inefficient. For this reason, the interfaces of Java debuggers – such as the JDB (the console debugger bundled with the JDK) or the one in IntelliJ IDEA – display the source code rather than bytecode. This allows you to debug the code that you wrote without having to think about the underlying bytecode being executed.</p>
  2891. <p>For example, your interaction with the JDB might look like this:</p>
  2892. <pre><code lang="plain">Initializing jdb ...
  2893.  
  2894. &gt; stop at dev.flounder.Calculator:5
  2895.  
  2896. Deferring breakpoint dev.flounder.Calculator:5.
  2897. It will be set after the class is loaded.
  2898.  
  2899. &gt; run
  2900.  
  2901. run dev/flounder/Main
  2902. Set uncaught java.lang.Throwable
  2903. Set deferred uncaught java.lang.Throwable
  2904. VM Started: Set deferred breakpoint dev.flounder.Calculator:5
  2905. Breakpoint hit: "thread=main", dev.flounder.Calculator.sum(), line=5 bci=0
  2906.  
  2907. &gt; locals
  2908.  
  2909. Method arguments:
  2910. a = 1
  2911. b = 2
  2912. </code></pre>
  2913. <p>IntelliJ IDEA will display the debug-related information in the editor and in the <i>Debug</i> tool window:</p>
  2914. <p><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/05/idea.png" alt="IntelliJ IDEA shows the executed line and variable values during a debugging session" width="903px" /></p>
  2915. <p>As you can see, both debuggers use the correct variable names and reference valid lines from our code snippet above.</p>
  2916. <p>Since the runtime doesn’t have access to the source files, it must collect this data elsewhere. This is where debug information comes into play. Debug information (also referred to as debug symbols) is compact data that links the bytecode to the application’s sources. It is included in the <code>.class</code> files during compilation.</p>
  2917. <p>There are three types of debug information:</p>
  2918. <ul>
  2919. <li><a href="#line-numbers">Line numbers</a></li>
  2920. <li><a href="#variable-names">Variable names</a></li>
  2921. <li><a href="#source-file-names">Source file names</li>
  2922. </ul>
  2923. <p>In the following chapters, I’ll briefly explain each type of debug information and how the debugger uses it.</p>
  2924. <h3>Line numbers</h3>
  2925. <p>Line number information is stored in the <code>LineNumberTable</code> attribute within the bytecode file, and it looks like this:</p>
  2926. <pre class="EnlighterJSRAW" data-enlighter-language="">
  2927. LineNumberTable:
  2928. line 5: 0
  2929. line 6: 2</pre>
  2930. <p>The table above tells the debugger the following:</p>
  2931. <ul>
  2932. <li>Line <code>5</code> contains the instruction at offset <code>0</code></li>
  2933. <li>Line <code>6</code> contains the instruction at offset <code>2</code></li>
  2934. </ul>
  2935. <p>This type of debug information helps external tools, such as debuggers or profilers, trace the exact line where the program executes in the source code.</p>
  2936. <p>Importantly, line number information is also used for source references in exception stack traces. In the following example, I compiled code from <a href="https://flounder.dev/posts/efficient-debugging-exceptions" target="_blank" rel="noopener">my other tutorial</a> without line number information:</p>
  2937. <pre><code lang="plain">Exception in thread "main" java.lang.NumberFormatException: For input string: ""
  2938. at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
  2939. at java.base/java.lang.Integer.parseInt(Integer.java:672)
  2940. at java.base/java.lang.Integer.parseInt(Integer.java:778)
  2941. at dev.flounder.Airports.parse(Airports.java)
  2942. at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
  2943. at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
  2944. at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
  2945. at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
  2946. at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
  2947. at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
  2948. at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
  2949. at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
  2950. at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
  2951. at dev.flounder.Airports.main(Airports.java)
  2952. </code></pre>
  2953. <p>The executable compiled without line number information produced a stack trace that lacks line numbers for the calls corresponding to my project code. The calls from the standard library and dependencies still include line numbers because they have been compiled separately and weren’t affected.</p>
  2954. <p>Besides stack traces, you may encounter a similar situation where line numbers are involved, for example, in IntelliJ IDEA’s <i>Frames</i> tab:</p>
  2955. <p><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/05/frames-without-line-numbers.png" alt="IntelliJ IDEA's Frames tab showing -1 instead of line numbers" width="490px" /></p>
  2956. <p>So, if you see <code>-1</code> instead of actual line numbers and want to avoid this, make sure your program is compiled with line number information.</p>
  2957. <p><b>Tip</b>: You can view bytecode offset right in IntelliJ IDEA’s <i>Frames</i> tab. For this, add the following <a href="https://youtrack.jetbrains.com/articles/SUPPORT-A-1030/How-to-edit-IntelliJ-IDE-registry" target="_blank" rel="noopener">registry key</a>: <code>debugger.stack.frame.show.code.index=true</code>.</p>
  2958. <p><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/05/idea-bytecode-offset.png" alt="IntelliJ IDEA shows bytecode offset next to line numbers in the Frames tab" width="616px" /></p>
  2959. <h3>Variable names</h3>
  2960. <p>Like line number information, variable names are stored in class files. The variable table for our example looks as follows:</p>
  2961. <pre class="EnlighterJSRAW" data-enlighter-language="">
  2962. LocalVariableTable:
  2963. Start  Length  Slot  Name   Signature
  2964.    0       4     0  this   Ldev/flounder/Calculator;
  2965.    0       4     1     a   I
  2966.    0       4     2     b   I</pre>
  2967. <p>It contains the following information:</p>
  2968. <ol>
  2969. <li><b>Start</b>: The bytecode offset where the scope of this variable begins.</li>
  2970. <li><b>Length</b>: The number of instructions during which this variable remains in scope.</li>
  2971. <li><b>Slot</b>: The index at which this variable is stored for reference.</li>
  2972. <li><b>Name</b>: The variable’s name as it appears in the source code.</li>
  2973. <li><b>Signature</b>: The variable’s data type, expressed in Java’s type signature notation.</li>
  2974. </ol>
  2975. <p>If variables are missing from the debug information, some debugger functionality might not work as expected, and you will see <code>slot_1</code>, <code>slot_2</code>, etc. instead of the actual variable names.</p>
  2976. <p><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/05/idea-without-variables.png" alt="IntelliJ IDEA displays slot_1, slot_2, etc. instead of variable names in the Debug tool window" width="665px" /></p>
  2977. <h3>Source file names</h3>
  2978. <p>This type of debug information indicates which source file was used to compile the class. Like line number information, its presence in the class files affects not only external tooling, but also the stack traces that your program generates:</p>
  2979. <pre><code lang="plain">Exception in thread "main" java.lang.NumberFormatException: For input string: ""
  2980. at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
  2981. at java.base/java.lang.Integer.parseInt(Integer.java:672)
  2982. at java.base/java.lang.Integer.parseInt(Integer.java:778)
  2983. at dev.flounder.Airports.parse(Unknown Source)
  2984. at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
  2985. at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
  2986. at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
  2987. at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
  2988. at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
  2989. at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
  2990. at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
  2991. at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
  2992. at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
  2993. at dev.flounder.Airports.main(Unknown Source)
  2994. </code></pre>
  2995. <p>Without source file names, the corresponding stack trace calls will be marked as <code>Unknown Source</code>.</p>
  2996. <h2>Compiler flags</h2>
  2997. <p>As a developer, you have control over whether to include debug information in your executables and, if so, which types to include. You can manage this by using the <code>-g</code> compiler argument, like this:</p>
  2998. <p><code>javac -g:lines,vars,source</code></p>
  2999. <p>Here is the syntax:</p>
  3000. <table>
  3001. <tbody>
  3002. <tr>
  3003. <td>Command</td>
  3004. <td>Result</td>
  3005. </tr>
  3006. <tr>
  3007. <td><code>javac</code></td>
  3008. <td>Compiles the application with line numbers and source file names (default for most compilers)</td>
  3009. </tr>
  3010. <tr>
  3011. <td><code>javac -g</code></td>
  3012. <td>Compiles the application with all available debug information:<br />
  3013. line numbers, variables, and source file names</td>
  3014. </tr>
  3015. <tr>
  3016. <td><code>javac -g:lines,source</code></td>
  3017. <td>Compiles the application with the specified types of debug information –<br />
  3018. line numbers and source file names in this example</td>
  3019. </tr>
  3020. <tr>
  3021. <td><code>javac -g:none</code></td>
  3022. <td>Compiles the application without the debug information</td>
  3023. </tr>
  3024. </tbody>
  3025. </table>
  3026. <p><b>Note</b>: Defaults might vary between compilers. Some of them completely exclude debug information unless instructed otherwise.</p>
  3027. <p>If you are using a build system, such as Maven or Gradle, you can pass the same options through compiler arguments.</p>
  3028. <p>Maven example:</p>
  3029. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3030. &lt;plugin&gt;
  3031.    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  3032.    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
  3033.    &lt;version&gt;3.11.0&lt;/version&gt;
  3034.    &lt;configuration&gt;
  3035.        &lt;compilerArgs&gt;
  3036.            &lt;arg&gt;-g:vars,lines&lt;/arg&gt;
  3037.        &lt;/compilerArgs&gt;
  3038.    &lt;/configuration&gt;
  3039. &lt;/plugin&gt;</pre>
  3040. <p>Gradle example:</p>
  3041. <pre class="EnlighterJSRAW" data-enlighter-language="">
  3042. tasks.compileJava {
  3043.    options.compilerArgs.add(&quot;-g:vars,lines&quot;)
  3044. }</pre>
  3045. <h2>Why remove debug information?</h2>
  3046. <p>As we’ve just seen, debug symbols enable the debugging process, which is convenient during development. For this reason, debug symbols are usually included in development builds. In production builds, they are often excluded; However, this ultimately depends on the type of project you are working on.</p>
  3047. <p>Here are a couple of things you may want to consider:</p>
  3048. <h3>Security</h3>
  3049. <p>Since a debugger can be used to tamper with your program, including debug information makes your application slightly more vulnerable to hacking and reverse engineering, which may be undesirable for some applications.</p>
  3050. <p>Although the absence of debug symbols might make it somewhat more difficult to interfere with your program using a debugger, it does not fully protect it. Debugging remains possible even with partial or missing debug information, so this alone will not prevent a determined individual from accessing your program’s internals. Therefore, if you are concerned about the risk of reverse engineering, you should employ additional measures, such as code obfuscation.</p>
  3051. <h3>Executable size</h3>
  3052. <p>The more information an executable contains, the larger it becomes. Exactly how much larger depends on various factors. The size of a particular class file might easily be dominated by the number of instructions and the size of the constant pool, making it impractical to provide a universal estimate. Still, to demonstrate that the difference can be substantial, I experimented with <a href="https://flounder.dev/posts/efficient-debugging-exceptions" target="_blank" rel="noopener">Airports.java</a>, which we used earlier to compare stack traces. The results are <b>4,460</b> bytes without debug information compared to <b>5,664</b> bytes with it.</p>
  3053. <p>In most cases, including debug symbols won’t hurt. However, if executable size is a concern, as is often the case with embedded systems, you might want to exclude debug symbols from your binaries.</p>
  3054. <h2>Adding sources for debugging</h2>
  3055. <p>Typically, the required sources reside within your project, so the IDE will have no trouble finding them. However, there are less common situations – for example, when the source code needed for debugging is outside your project, such as when stepping into a library used by your code.</p>
  3056. <p>In this case, you need to add source files manually: either by placing them under a <a href="https://www.jetbrains.com/help/idea/content-roots.html" target="_blank" rel="noopener">sources root</a> or by specifying them as a dependency. During debugging, IntelliJ IDEA will automatically detect and match these files with the classes executed by the JVM.</p>
  3057. <h3>When the project is missing</h3>
  3058. <p>In most cases, you would build, launch, and debug an application in the same IDE, using the original project. But what if you have only a few source files, and the project itself is missing?</p>
  3059. <p>Here’s a bare-bones debugging setup that will do the trick:</p>
  3060. <ol>
  3061. <li>Create an empty Java project.</li>
  3062. <li>Add the source files under a sources root or specify them as a dependency.</li>
  3063. <li>Launch the target application with the debug agent. In Java, this is typically done by adding a VM option, such as: <code>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005</code>.</li>
  3064. <li>Create a <a href="https://www.jetbrains.com/help/idea/attach-to-process.html#create-rc" target="_blank" rel="noopener">Remote JVM Debug</a> run configuration with the correct connection details. Use this run configuration to attach the debugger to the target application.</li>
  3065. </ol>
  3066. <p>With this setup, you can debug a program without accessing the original project. IntelliJ IDEA will match the available sources with the runtime classes and let you use them in a debugging session. This way, even a single project or library class gives you an entry point for debugging.</p>
  3067. <p>For a hands-on example, check out <a href="https://flounder.dev/posts/debugger-god-mode" target="_blank" rel="noopener">Debugger.godMode() – Hacking JVM Applications With the Debugger</a>, where we use this technique to change a program’s behavior without accessing its source code.</p>
  3068. <h2>Source mismatch</h2>
  3069. <p>One confusing situation you might encounter during debugging is when your application appears suspended at a blank line or when the line numbers in the <i>Frames</i> tab don’t match those in the editor:</p>
  3070. <p><img decoding="async" src="https://blog.jetbrains.com/wp-content/uploads/2025/05/bytecode-mismatch.png" alt="IntelliJ IDEA highlights a blank line as if it were executed" width="606px" /></p>
  3071. <p>This occurs when debugging decompiled code (which we’ll discuss in another article) or when the source code doesn’t fully match the bytecode that the JVM is executing.</p>
  3072. <p>Since the only link between bytecode and a particular source file is the name of the file and its classes, the debugger has to rely on this information, assisted by some heuristics. This works well for most situations. However, the version of the file on disk may differ from the one used to compile the application. In the case of a partial match, the debugger will identify the discrepancies and attempt to reconcile them rather than failing fast. Depending on the extent of the differences, this might be useful, for example, if the only source that you have isn’t the closest match.</p>
  3073. <p>Fortunately, if you have the exact version of the sources elsewhere, you can fix this issue by adding them to the project and re-running the debug session.</p>
  3074. <h2>Conclusion</h2>
  3075. <p>In this article, we’ve explored the connection between source files, bytecode, and the debugger. While not strictly required for day-to-day coding, having a clearer picture of what happens under the hood can give you a stronger grasp of the ecosystem and may occasionally help you out of non-standard situations and configuration problems. I hope you found the theory and tips useful!</p>
  3076. <p>There are still many more topics to come in this series, so stay tuned for the next one. If there’s anything specific you’d like to see covered, or if you have ideas and feedback, we’d love to hear from you!</p>
  3077. ]]></content:encoded>
  3078. </item>
  3079. <item>
  3080. <title>Do You Really Know Java?</title>
  3081. <link>https://blog.jetbrains.com/idea/2025/05/do-you-really-know-java/</link>
  3082. <dc:creator><![CDATA[Irina Mariasova]]></dc:creator>
  3083. <pubDate>Fri, 23 May 2025 06:03:24 +0000</pubDate>
  3084. <featuredImage>https://blog.jetbrains.com/wp-content/uploads/2025/05/IJ-social-BlogFeatured-1280x720-2x.png</featuredImage> <category><![CDATA[coding]]></category>
  3085. <category><![CDATA[general]]></category>
  3086. <category><![CDATA[idea]]></category>
  3087. <guid isPermaLink="false">https://blog.jetbrains.com/?post_type=idea&#038;p=569042</guid>
  3088.  
  3089. <description><![CDATA[From a humble passion project to a major language powering billions of devices worldwide, Java&#8217;s journey is anything but ordinary. Java has always been shaped by big ideas and the people behind them. It’s a language that grew not just through specs and syntax, but through community, creativity, and the occasional dancing triangle mascot. This [&#8230;]]]></description>
  3090. <content:encoded><![CDATA[
  3091. <p>From a humble passion project to a major language powering billions of devices worldwide, Java&#8217;s journey is anything but ordinary.</p>
  3092.  
  3093.  
  3094.  
  3095. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcPtcLrKficfbw5LRJJsbFrW0k7GamQDDcZmgKskqarL40kAq6L97bpvPfwxLevHW4fShtBatlHMwAQLj5wPnkm7CVS5CRZKSavQxGlElfas3uYb6nUZcKfM1f6cWHR-U8IVfqK7A?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3096.  
  3097.  
  3098.  
  3099. <p>Java has always been shaped by big ideas and the people behind them. It’s a language that grew not just through specs and syntax, but through community, creativity, and the occasional dancing triangle mascot.</p>
  3100.  
  3101.  
  3102.  
  3103. <p>This blog post isn’t just a history lesson. It’s a celebration of the unexpected twists, clever breakthroughs, and the human side of Java that still drives the project forward today.</p>
  3104.  
  3105.  
  3106.  
  3107. <p>So, how well do you <em>really</em> know Java?<br>Let’s rewind, explore, and rediscover what makes it one of the most enduring and surprising stories in tech.</p>
  3108.  
  3109.  
  3110.  
  3111. <h2 class="wp-block-heading">Making history the Java way</h2>
  3112.  
  3113.  
  3114.  
  3115. <p>There are programming languages that shook the world and faded into memory. And then there&#8217;s Java – the one that stayed.</p>
  3116.  
  3117.  
  3118.  
  3119. <p>At 30, Java is more than code. It’s muscle memory. It’s the quiet force that runs the world’s systems, letting the newer languages chase trends and syntax sugar highs. Java never tried to be cool. It just worked. And somehow, that made it timeless.</p>
  3120.  
  3121.  
  3122.  
  3123. <p>Before Java was Java, back in 1991, it was a secret project hidden deep within Sun Microsystems. Its codename? The Green Project. The internet was barely a thing. The team, led by James Gosling, Mike Sheridan, and Patrick Naughton, needed to build software for the next generation of consumer electronics – think smart toasters, interactive TVs, and other futuristic gadgets.</p>
  3124.  
  3125.  
  3126.  
  3127. <p>For this task, they felt they needed a completely new language – a platform-independent language that could run on any device, no matter the hardware. That meant it needed to be lightweight, secure, and portable, a true unicorn in the early &#8217;90s.&nbsp;</p>
  3128.  
  3129.  
  3130.  
  3131. <p>The language they built was called Oak, named after the tree outside Gosling’s office window. But when they tried to release Oak into the wild, they found out the name was already trademarked. So, in classic tech fashion, the team locked themselves in a room and started throwing names at a whiteboard.&nbsp;</p>
  3132.  
  3133.  
  3134.  
  3135. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXefAiytuYCpeDWliQwOCEZPBoL_k0lDhgPQrmjVwNkhxMzNQvSJjgOd2i04zpmTL0rfaYnfJoOYDaALOZ4sYi2NMNG-IT-yJir5769bofTHahgus6zAnvpD4H97LTx4tjfHGqxDCw?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3136.  
  3137.  
  3138.  
  3139. <p>Legend has it the shortlist included names like “DNA”, “Silk”, “Lyric”, and “Java”.</p>
  3140.  
  3141.  
  3142.  
  3143. <p>Why “Java”? Maybe because it sounded punchy. Maybe because it evoked energy and warmth. Or maybe because the team drank a lot of coffee from Java island beans while coding. We’ll never know for sure. But one thing’s clear: “Java” stuck.</p>
  3144.  
  3145.  
  3146.  
  3147. <p>By the time Java 1.0 was released in 1995, the world had changed. The web was exploding. Netscape Navigator ruled the browser wars. And Java suddenly had the perfect playground.</p>
  3148.  
  3149.  
  3150.  
  3151. <p>It was not an overnight success. But it was different. It spoke to the developers who didn’t want to rewrite the same logic a dozen times for different platforms. Java wasn’t flashy – it was ambitious. And that ambition quietly reshaped the industry.</p>
  3152.  
  3153.  
  3154.  
  3155. <p>Java began as a niche tool for embedded devices. But like all good origin stories, it didn’t stay small. It evolved. And it never really looked back.</p>
  3156.  
  3157.  
  3158.  
  3159. <h2 class="wp-block-heading">Java features that blew minds in the 90s</h2>
  3160.  
  3161.  
  3162.  
  3163. <p>When Java showed up, it wasn’t just a new language – it rewired how developers thought about writing, running, and shipping code. These were the features, concepts and technologies that made it possible.&nbsp;</p>
  3164.  
  3165.  
  3166.  
  3167. <h3 class="wp-block-heading">WORA with JVM</h3>
  3168.  
  3169.  
  3170.  
  3171. <p>Let’s start with a classic: WORA (“write once, run anywhere”). Sounds like a catchy slogan, but it was more like Java’s battle cry back in the day – and for good reason.</p>
  3172.  
  3173.  
  3174.  
  3175. <p>Before Java, software developers were stuck in platform purgatory. You’d write code for one system, and if you wanted it to work somewhere else, you had to rewrite, retest, re-lose your mind. It was messy, painful, and slow.</p>
  3176.  
  3177.  
  3178.  
  3179. <p>Java showed up and was like, “Nah, we’re not doing that anymore”.</p>
  3180.  
  3181.  
  3182.  
  3183. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfmuuxDz2tnxKhAh5AtCG1EQrs-mt3f9UaNfA1Wj6v5BCa8ZiGitEHqHG2leMKJHriB_4GYP_GFUBMISnbkzPMZmUGSjcBaso6tC19t_mpxg8-V8BEc89EzfAwUNeae03q2RFf8?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3184.  
  3185.  
  3186.  
  3187. <p>Java introduced the JVM (Java Virtual Machine). Thanks to this cool little invention, your code no longer cared what kind of machine it was running on. Java promised: Write your code once, and it’ll run (pretty much) wherever there’s a JVM. That was a huge leap forward.&nbsp;</p>
  3188.  
  3189.  
  3190.  
  3191. <p>Here’s why WORA with JVM mattered so much:</p>
  3192.  
  3193.  
  3194.  
  3195. <ul>
  3196. <li>Portability became real.</li>
  3197.  
  3198.  
  3199.  
  3200. <li>It saved time and money – you no longer needed custom builds for every OS under the sun.</li>
  3201.  
  3202.  
  3203.  
  3204. <li>It made Java perfect for enterprise apps, where infrastructure was a Frankenstein&#8217;s monster of different systems.</li>
  3205.  
  3206.  
  3207.  
  3208. <li>It helped fuel the rise of the internet and web apps – you didn’t have to know (or care) what OS your users were running.</li>
  3209. </ul>
  3210.  
  3211.  
  3212.  
  3213. <p>WORA gave Java a seat at the cool kids&#8217; table.</p>
  3214.  
  3215.  
  3216.  
  3217. <h3 class="wp-block-heading">Automatic garbage collection</h3>
  3218.  
  3219.  
  3220.  
  3221. <p>Automatic garbage collection was Java’s way of saying, “Go build cool stuff, I’ve got the cleanup.” Before Java, memory management was like playing Jenga blindfolded. One misplaced pointer, and the whole tower came crashing down. C++ devs know the trauma. So how does Java’s automatic garbage collection work?</p>
  3222.  
  3223.  
  3224.  
  3225. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcnGjPDzSCX5sX5fIcRdCrUt-a--QpC7BMA__cam8M7UIxPZ6H0j0XXCKZZTO_dn3PklDhKWuXB-Vwvwb2twZvn1iLR1ZtyyRhsqRc9hDBTOh8vaRIN_9PKUgMNT94pYtRT8_G_?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3226.  
  3227.  
  3228.  
  3229. <p>The Garbage Collector (GC) finds objects your program doesn’t use anymore and clears them from memory, usually without stopping your app.</p>
  3230.  
  3231.  
  3232.  
  3233. <p>This offered more than convenience – it offered peace of mind. With Java, safe memory became the default as opposed to a daily battle.</p>
  3234.  
  3235.  
  3236.  
  3237. <h3 class="wp-block-heading">Java’s built-in multithreading</h3>
  3238.  
  3239.  
  3240.  
  3241. <p>That was a plot twist nobody saw coming. Back then, most languages viewed concurrency as something obscure and even somewhat dangerous if you didn’t know exactly what you were doing.</p>
  3242.  
  3243.  
  3244.  
  3245. <p>But in Java, it wasn’t just a feature, it was part of the core language. You got Thread, Runnable, synchronized, wait/notify – all wrapped up in a clean, standardized API.&nbsp;</p>
  3246.  
  3247.  
  3248.  
  3249. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfKRmkS5RkiHt-ybJ5E4RcgXexocfzjFNrhdmBqXndoPDNlpAuvfwDixEFPkvZBSOYX64bajihgJmzHcDu40K9WlCO-UfSgIIYfwr6UzYRDkQJ1S-B0h324qqfT0RBTjfzNhSjRjA?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3250.  
  3251.  
  3252.  
  3253. <p>Over time, Java continued to level up with Executors, ThreadPools, Futures, and now the shiny virtual threads (thanks, Project Loom).&nbsp;</p>
  3254.  
  3255.  
  3256.  
  3257. <p>It made concurrent programming accessible, not terrifying. And that mattered. Big time. Because the world was starting to move faster: more users, more data, more everything. Java’s out-of-the-box multithreading meant devs could actually keep up without losing their minds.</p>
  3258.  
  3259.  
  3260.  
  3261. <h3 class="wp-block-heading">Security model</h3>
  3262.  
  3263.  
  3264.  
  3265. <p>Java didn’t just aim to run everywhere, it aimed to run safely everywhere. And in the Wild West of the early web, that was a radical idea.</p>
  3266.  
  3267.  
  3268.  
  3269. <p>From the very beginning, Java treated code like a potential threat. Its security model was built on the concept of a sandbox – a tightly controlled environment where untrusted code (like applets downloaded from a website) could run without compromising the user’s machine. Without explicit permission, Java code stayed locked inside its sandbox. Any move beyond that safe zone? Blocked instantly. Unless explicitly allowed, Java code played by the rules or got shut down.</p>
  3270.  
  3271.  
  3272.  
  3273. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXebyeUDTBHaxYC2DyaN51pAccLra_4CIpYDldeSDsZw0NlHeMlZedb5vLxMxZJm02grv2P7gD1IHMjVLCTSmLvVF9yuf_1D3GULNOsj9OiFw3qwgNxN714CDTJzWU5akGOT7HARcg?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3274.  
  3275.  
  3276.  
  3277. <p>The SecurityManager, paired with the bytecode verifier and classloader, formed a defensive wall: every piece of code was checked, isolated, and monitored. Even though the Java Security Manager is now deprecated, mainly due to its complexity and the challenges it presented for effective security management, it was a bold move in its time. In a decade where most software ran with full permissions by default, Java’s &#8220;suspicious until proven trustworthy&#8221; approach was a real game-changer.</p>
  3278.  
  3279.  
  3280.  
  3281. <p>This mindset of security being baked into the architecture, not bolted on as an afterthought, set the tone for generations of developers. It taught us to think twice about trust, to design with risk in mind, and to build with guardrails from day one. And while applets are long gone, that philosophy lives on – in the JVM, in the ecosystem, and in the DNA of modern secure software.</p>
  3282.  
  3283.  
  3284.  
  3285. <h2 class="wp-block-heading">IntelliJ IDEA + Java = win-win collaboration</h2>
  3286.  
  3287.  
  3288.  
  3289. <p>Java had it all. Groundbreaking ideas like WORA with JVM, built-in multithreading, rock-solid stability, etc. It was a language designed to last. But it was missing a proper home. A place that didn’t just run Java, but truly <em>understood</em> it. A place that would make writing Java feel smooth, effortless, and even fun.</p>
  3290.  
  3291.  
  3292.  
  3293. <p>Because let’s be real – the cognitive load and sheer verbosity that came with all that power? It piled up. Fast.&nbsp;</p>
  3294.  
  3295.  
  3296.  
  3297. <p>Writing Java in a notepad turned into a nightmare. So <a href="https://blog.jetbrains.com/blog/2003/06/03/pr_030603/#:~:text=,set%20optimizers%20for%20mobile%20devices">a few forward-thinking developers – Eugene Belyaev, Sergey Dmitriev, Valentin Kipiatkov</a> – set out to build a tool that could truly support developers on their journey through Java applications’ complexity.</p>
  3298.  
  3299.  
  3300.  
  3301. <p>And then came IntelliJ IDEA.</p>
  3302.  
  3303.  
  3304.  
  3305. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdXat_skprbI_xZz0-djgOxxt-XdaHJrDEmlHC50R8k-BYqT6BEL17yHdmFu4DJGiO4T-VJt3x8Iw8QrlsGyPcjy130C3NXgkoCQUwzg2FZTKty6nHYBhIrlGDMLQlWWI3ce_Zv?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3306.  
  3307.  
  3308.  
  3309. <p>Born in 2001, when it was still known as Renamer, this IDE wasn’t just built for Java, it was written in Java. It understood the language inside and out. And it delivered a range of helpful functionality.&nbsp;</p>
  3310.  
  3311.  
  3312.  
  3313. <p>For many developers, <a href="https://www.jetbrains.com/idea/" target="_blank" rel="noopener">IntelliJ IDEA</a> synced the entire development process with how real software engineers actually work.&nbsp;</p>
  3314.  
  3315.  
  3316.  
  3317. <p>It came fully loaded with tools that made professional Java development more productive and straightforward. Code completion was intuitive, context-aware, and often knew what you meant before you finished typing. Refactoring, once a nerve-wracking exercise, became something you could actually trust.&nbsp;</p>
  3318.  
  3319.  
  3320.  
  3321. <p>Code analysis ran in real time, catching issues on-the-go. Bugs didn’t pile up quietly, but were flagged and ready to be fixed before they caused trouble. The debugger stepped in and let you pause, peek inside, and see exactly what the code was doing. The profiler followed behind, showing where your app was slowing down and why. Navigation was no longer guesswork. With features like <em>Go to Definition</em> and <em>Find Usages</em>, even the biggest codebases started to feel manageable.</p>
  3322.  
  3323.  
  3324.  
  3325. <p>Because version control, JUnit, Maven, Gradle, database tools, a decompiler, and more were all built in, you didn’t have to waste time wiring your workspace together. Everything was ready to go, right out of the box.</p>
  3326.  
  3327.  
  3328.  
  3329. <p>As Java evolved, IntelliJ IDEA added support for Spring, Spring Boot, Jakarta EE, Micronaut, Quarkus, Helidon, JPA, Hibernate, and more as the ecosystem expanded. When AI joined the scene, it was delivered thoughtfully, as a real assistant that knew your code context and offered relevant suggestions.</p>
  3330.  
  3331.  
  3332.  
  3333. <p>In 2011, Java 7 added the invokedynamic instruction, which let the JVM handle method calls more flexibly at runtime. This made it easier to run dynamic languages like Ruby and Groovy, and even helped Java itself support things like lambdas. It also opened the door for new JVM-based languages like Kotlin and Scala. Today, thanks to this change, the JVM supports a whole mix of languages, and IntelliJ IDEA supports (almost) all of them in one convenient environment.</p>
  3334.  
  3335.  
  3336.  
  3337. <p>With IntelIiJ IDEA, Java became more modern, accessible, and fun to work with. IntelliJ IDEA let developers focus on the language’s strengths instead of spending most of their time on setup. It let Java’s strengths shine through.</p>
  3338.  
  3339.  
  3340.  
  3341. <h2 class="wp-block-heading">Java in the Age of AI</h2>
  3342.  
  3343.  
  3344.  
  3345. <p>Java isn’t chasing trends – it’s quietly getting stronger where it matters. With Java 24, and soon Java 25, the language is adding serious muscle for modern realities.&nbsp;</p>
  3346.  
  3347.  
  3348.  
  3349. <p>Georges Saab, Senior VP of the Java Platform, <a href="https://www.dqindia.com/news/oracle-releases-java-24-with-enhanced-ai-and-security-features-8875463" target="_blank" rel="noopener">says</a> “Java 24 brings more than 20 new features, including AI support and post-quantum cryptography, making it easier for developers to create AI-powered, secure, and scalable applications.”</p>
  3350.  
  3351.  
  3352.  
  3353. <p>For example, the <a href="https://blogs.oracle.com/java/post/the-arrival-of-java-24?utm_source=chatgpt.com" target="_blank" rel="noopener">Vector API</a> (now in an advanced incubator stage) lets developers write vector code that runs faster by using CPU instructions made for it. This means better performance than regular code, especially for AI and math-heavy tasks. <a href="https://openjdk.org/projects/panama/?utm_source=chatgpt.com" target="_blank" rel="noopener">Project Panama</a> lets Java apps call native code and work with large data outside the JVM. This makes it easier to use fast ML libraries and hardware like GPUs without slowing things down.</p>
  3354.  
  3355.  
  3356.  
  3357. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd8Gohx--hpUjm8bPRcgXbLlFuZIkFzE4sCLAuzteQ0zeMwpryUVJkaEY5oDIvH4DOlxyhQdPlE65s_SXxJqn2_-0SX6V5o4Oq29JIpROI3WFFILvFbYhO3pzeEUwXdfgL8zKAe6w?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3358.  
  3359.  
  3360.  
  3361. <p>According to <a href="https://inside.java/2025/04/20/javaone-future-java/?utm_source=chatgpt.com" target="_blank" rel="noopener">Brian Goetz</a>, Java Language Architect, with initiatives like <a href="https://openjdk.org/projects/amber/" target="_blank" rel="noopener">Project Amber</a> and <a href="https://openjdk.org/projects/valhalla/?utm_source=chatgpt.com" target="_blank" rel="noopener">Project Valhalla</a>, Java is evolving to meet the demands of modern AI applications. These projects aim to enhance Java&#8217;s expressiveness and performance, ensuring that developers can build efficient, scalable AI solutions within the Java ecosystem.&nbsp;</p>
  3362.  
  3363.  
  3364.  
  3365. <p>Java is also AI-supported by powerful frameworks like <a href="https://docs.langchain4j.dev/" target="_blank" rel="noopener">LangChain4j</a>, which brings the popular LangChain tooling to Java, helping developers build LLM-powered applications with ease. Another key player is <a href="https://spring.io/projects/spring-ai" target="_blank" rel="noopener">Spring AI</a>, an extension of the Spring ecosystem for AI workloads. It simplifies connecting to AI models, managing data pipelines, and integrating machine learning into enterprise-grade applications.</p>
  3366.  
  3367.  
  3368.  
  3369. <p>AI is showing up in more industries, and Java is ready for it since there&#8217;s a ton of open-source Java code available, and AI tools know it well. That makes Java surprisingly AI-friendly when it comes to writing or improving code.&nbsp;</p>
  3370.  
  3371.  
  3372.  
  3373. <p>As AI continues to enter various industries, Java&#8217;s adaptability and robust tooling position it as an amazing platform for AI development. Oracle&#8217;s commitment to developing Java ensures that it remains a top choice for developers tackling modern challenges.</p>
  3374.  
  3375.  
  3376.  
  3377. <h2 class="wp-block-heading">Duke – the little triangle that could</h2>
  3378.  
  3379.  
  3380.  
  3381. <p>Before Java had frameworks, IDEs, or fanboys arguing over semicolons, it had Duke – a one-eyed hand-drawn blob.&nbsp;</p>
  3382.  
  3383.  
  3384.  
  3385. <p>Duke was born in the early ’90s, designed by Joe Palrang as part of the original Green Project. (Fun fact: Palrang later animated <em>Shrek</em> and <em>Madagascar</em>, but Duke was his first star).</p>
  3386.  
  3387.  
  3388.  
  3389. <p>Originally meant to represent a helpful &#8220;software agent&#8221;, Duke was approachable, flexible, and a little weird in the best way. The kind of character you’d imagine helping you debug your code, then doing a happy wiggle when your tests passed.</p>
  3390.  
  3391.  
  3392.  
  3393. <p>As Java grew, so did Duke. From hand-drawn sketches to 3D poses, Olympic cameos, coffee cups, juggling acts, and even community-driven fan art. No matter the form, he kept that signature look that was instantly recognizable and unmistakably Java.</p>
  3394.  
  3395.  
  3396.  
  3397. <p>And what’s more, people genuinely love Duke. He shows up on stickers, plushies, and tattoos. At conferences, he’s on mugs, hoodies, etc.&nbsp;</p>
  3398.  
  3399.  
  3400.  
  3401. <p>Duke reminds us that Java, for all its enterprise chops, started with creativity, optimism, and a sketch of a triangle with a lot of heart. </p>
  3402.  
  3403.  
  3404.  
  3405. <figure class="wp-block-image size-full"><img decoding="async" loading="lazy" width="4280" height="1906" src="https://blog.jetbrains.com/wp-content/uploads/2025/05/Artboard-31.png" alt="" class="wp-image-569339"/></figure>
  3406.  
  3407.  
  3408.  
  3409. <p>If you like Duke as much as we do, take a shot at winning a limited-edition T-shirt with a personalized Duke to remember this anniversary!&nbsp;</p>
  3410.  
  3411.  
  3412.    <div class="buttons">
  3413.        <div class="buttons__row">
  3414.                                                <a href="https://www.jetbrains.com/lp/java-30/" class="btn " target="" rel="noopener">Get your Duke&nbsp;</a>
  3415.                                    </div>
  3416.    </div>
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424. <p>What is more, you can download a special anniversary plugin and your Duke will appear on your splash screen with every restart as a gentle reminder that even when life throws exceptions, Duke’s got your back.</p>
  3425.  
  3426.  
  3427.    <div class="buttons">
  3428.        <div class="buttons__row">
  3429.                                                <a href="https://plugins.jetbrains.com/plugin/27445-java-30-anniversary" class="btn " target="" rel="noopener">Host Duke in the IDE</a>
  3430.                                    </div>
  3431.    </div>
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439. <h3 class="wp-block-heading">Java’s human side</h3>
  3440.  
  3441.  
  3442.  
  3443. <p>Java isn’t just a language – it’s a community. A massive, global, ever-curious group of people who write, teach, debate, share, and occasionally argue.</p>
  3444.  
  3445.  
  3446.  
  3447. <p>From early meetups to today’s massive conferences like Devoxx, JavaOne, and JavaZone, the Java community has been a driving force behind the language’s evolution.&nbsp;</p>
  3448.  
  3449.  
  3450.  
  3451. <p>New features don’t just appear out of thin air. They&#8217;re discussed, prototyped, questioned, stress-tested, and shaped by the folks who actually use Java every day. Workshops, mailing lists, JEPs, community proposals – everything is built by devs, for devs.</p>
  3452.  
  3453.  
  3454.  
  3455. <p>What makes this world so special is its openness. You’ll see students presenting alongside seasoned developers. You&#8217;ll meet folks who wrote Java 1.0 code in the &#8217;90s and others who just ran their first HelloWorld.java last week. It’s not just about solving problems, it’s about building together, sharing ideas, and having a few coffees along the way.</p>
  3456.  
  3457.  
  3458.  
  3459. <h2 class="wp-block-heading">🥂 Here&#8217;s to Java – the constant in a world of change</h2>
  3460.  
  3461.  
  3462.  
  3463. <p>Languages come and go like fashion trends. But Java? The language that grew up, stayed sharp, and never lost its soul.</p>
  3464.  
  3465.  
  3466.  
  3467. <p>So here’s to the past 30 years – of applets and servlets, null pointers and enterprise beans, refactorings and releases, and IDEs and JUGs.</p>
  3468.  
  3469.  
  3470.  
  3471. <figure class="wp-block-image"><img decoding="async" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe4O0vEub4cZHvsF_XWorcO6QMLNpgUfi01WmF0aujQfRIATenyFfmV-6fpRwTp-h8_sDFTlQKfqLmASx6LIh4iFWMzuItQDo9Y_nw7PJpWLEQqi1mpCRGfcYXorKI1P2dsGM075w?key=ajpUFEEHf42bcWGOjAUAmZO2" alt=""/></figure>
  3472.  
  3473.  
  3474.  
  3475. <p>And here’s to what’s next. Because if there’s one thing we’ve learned after 30 years, it’s this: Java isn’t going anywhere. Quite the contrary, in fact: it’s actively expanding, evolving faster, and getting sharper with every release.</p>
  3476.  
  3477.  
  3478.  
  3479. <p>Got a favorite Java memory? A Duke plushie? Your first HelloWorld.java story? This celebration is yours, too, so please share your memories in the comments.</p>
  3480. ]]></content:encoded>
  3481. </item>
  3482. </channel>
  3483. </rss>
  3484.  
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda