<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: INDRANIL DUTTA</title>
    <description>The latest articles on DEV Community by INDRANIL DUTTA (@toindranildutta).</description>
    <link>https://dev.to/toindranildutta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1254761%2F6b764105-5a51-413f-988a-fa4bca5a4b09.jpeg</url>
      <title>DEV Community: INDRANIL DUTTA</title>
      <link>https://dev.to/toindranildutta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/toindranildutta"/>
    <language>en</language>
    <item>
      <title>How to Configure Swagger 3 in a Spring Boot Application with Springfox</title>
      <dc:creator>INDRANIL DUTTA</dc:creator>
      <pubDate>Sat, 18 May 2024 04:25:09 +0000</pubDate>
      <link>https://dev.to/toindranildutta/how-to-configure-swagger-3-in-a-spring-boot-application-with-springfox-36na</link>
      <guid>https://dev.to/toindranildutta/how-to-configure-swagger-3-in-a-spring-boot-application-with-springfox-36na</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Swagger, now part of the OpenAPI initiative, is a powerful tool for documenting and testing RESTful APIs. Using Springfox, you can easily integrate Swagger 3 (OpenAPI 3) with your Spring Boot application. In this article, I’ll guide you through the steps to set up and configure Swagger 3 using Springfox.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic knowledge of Spring Boot&lt;/li&gt;
&lt;li&gt;Java 8 or higher&lt;/li&gt;
&lt;li&gt;Maven for dependency management&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Add Springfox Dependency
&lt;/h2&gt;

&lt;p&gt;First, add the necessary Springfox dependency to your &lt;code&gt;pom.xml&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;io.springfox&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;springfox-boot-starter&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;3.0.0&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Configure Swagger
&lt;/h2&gt;

&lt;p&gt;Create a configuration class to set up Swagger with Springfox. This is where you can customize various aspects of your API documentation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.context.annotation.Bean&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.context.annotation.Configuration&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;springfox.documentation.builders.PathSelectors&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;springfox.documentation.builders.RequestHandlerSelectors&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;springfox.documentation.spi.DocumentationType&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;springfox.documentation.spring.web.plugins.Docket&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;springfox.documentation.swagger2.annotations.EnableSwagger2&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;@Configuration&lt;/span&gt;
&lt;span class="nd"&gt;@EnableSwagger2&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SwaggerConfig&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@Bean&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;Docket&lt;/span&gt; &lt;span class="nf"&gt;api&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;Docket&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;DocumentationType&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;SWAGGER_2&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;select&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;apis&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;RequestHandlerSelectors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;basePackage&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"com.example.yourpackage"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;PathSelectors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;any&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@EnableSwagger2&lt;/code&gt;: Enables Swagger 2 documentation.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Docket&lt;/code&gt;: Configures the Swagger 2 documentation with the base package for your controllers and paths to include.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 3: Annotate Your Controllers
&lt;/h2&gt;

&lt;p&gt;Use annotations to document your endpoints. Springfox will automatically detect these annotations and include them in the generated documentation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.swagger.annotations.Api&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.swagger.annotations.ApiOperation&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.web.bind.annotation.GetMapping&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.web.bind.annotation.RequestMapping&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.web.bind.annotation.RestController&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;@RestController&lt;/span&gt;
&lt;span class="nd"&gt;@RequestMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/api/v1/auth"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nd"&gt;@Api&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tags&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Authentication API"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"API for user authentication"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AuthController&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@GetMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/hello"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="nd"&gt;@ApiOperation&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello World"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Returns a greeting message"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;hello&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"Hello, World!"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@Api&lt;/code&gt;: Defines a tag and description for the controller.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@ApiOperation&lt;/code&gt;: Provides metadata about the operation, including a value and notes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: Configure Security for Swagger Endpoints
&lt;/h2&gt;

&lt;p&gt;If you need to allow specific URLs to be accessed without authentication, configure your Spring Security settings accordingly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.context.annotation.Configuration&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.security.config.annotation.web.builders.HttpSecurity&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.security.config.annotation.web.configuration.EnableWebSecurity&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;@Configuration&lt;/span&gt;
&lt;span class="nd"&gt;@EnableWebSecurity&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SecurityConfig&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;WebSecurityConfigurerAdapter&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@Override&lt;/span&gt;
    &lt;span class="kd"&gt;protected&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;HttpSecurity&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;http&lt;/span&gt;
            &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;authorizeRequests&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
            &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;antMatchers&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/api/v1/auth/**"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                         &lt;span class="s"&gt;"/v3/api-docs"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                         &lt;span class="s"&gt;"/v2/api-docs"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                         &lt;span class="s"&gt;"/swagger-resources/**"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                         &lt;span class="s"&gt;"/swagger-ui/**"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
                         &lt;span class="s"&gt;"/webjars/**"&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;permitAll&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
            &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;anyRequest&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;authenticated&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 5: Access Swagger UI
&lt;/h2&gt;

&lt;p&gt;After setting up and running your Spring Boot application, you can access the Swagger UI to view and test your API documentation.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start your Spring Boot application.&lt;/li&gt;
&lt;li&gt;Open your browser and navigate to &lt;code&gt;http://localhost:8080/swagger-ui/&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should see the Swagger UI with your documented API endpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Integrating Swagger 3 with your Spring Boot application using Springfox is straightforward and immensely beneficial for documenting and testing your APIs. By following these steps, you can set up comprehensive and interactive API documentation that will make development and collaboration much easier.&lt;/p&gt;




&lt;p&gt;You can connect with me on LinkedIn : &lt;a href="https://www.linkedin.com/in/toindranildutta"&gt;Indranil Dutta&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this guide helps you set up Swagger 3 in your Spring Boot application using Springfox. If you have anything to share more, please comment below.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Prevent Sudden Crashes of Eclipse IDE on Ubuntu</title>
      <dc:creator>INDRANIL DUTTA</dc:creator>
      <pubDate>Thu, 16 May 2024 04:39:31 +0000</pubDate>
      <link>https://dev.to/toindranildutta/how-to-prevent-sudden-crashes-of-eclipse-ide-on-ubuntu-5bnl</link>
      <guid>https://dev.to/toindranildutta/how-to-prevent-sudden-crashes-of-eclipse-ide-on-ubuntu-5bnl</guid>
      <description>&lt;p&gt;Eclipse IDE is a powerful tool for developers, but like any complex software, it can sometimes experience sudden crashes, particularly on Ubuntu. These crashes can be frustrating and disruptive. This article will provide several solutions to help you stabilize Eclipse and improve your development experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Switch Display Driver from Wayland to Xorg
&lt;/h2&gt;

&lt;p&gt;One common cause of Eclipse crashes on Ubuntu is the use of the Wayland display server. Switching to Xorg can often resolve these issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps to Switch from Wayland to Xorg:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Log Out of Your Current Session:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the system menu at the top right corner of your screen and select "Log Out."&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Select Xorg at Login:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At the login screen, click on your username.&lt;/li&gt;
&lt;li&gt;Before entering your password, click on the gear icon (⚙️) at the bottom right of the screen.&lt;/li&gt;
&lt;li&gt;Select "Ubuntu on Xorg."&lt;/li&gt;
&lt;li&gt;Enter your password and log in.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This change should make your system more stable and reduce the likelihood of Eclipse crashes.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Increase Memory Allocation in &lt;code&gt;eclipse.ini&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Eclipse relies on the JVM (Java Virtual Machine), and insufficient memory allocation can lead to crashes. Modifying the &lt;code&gt;eclipse.ini&lt;/code&gt; file can help.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps to Modify &lt;code&gt;eclipse.ini&lt;/code&gt;:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Locate the &lt;code&gt;eclipse.ini&lt;/code&gt; File:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Typically found in the Eclipse installation directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Edit Memory Settings:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the &lt;code&gt;eclipse.ini&lt;/code&gt; file with a text editor.&lt;/li&gt;
&lt;li&gt;Increase the memory settings as shown below:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt; &lt;span class="err"&gt;-Xms512m&lt;/span&gt;
 &lt;span class="err"&gt;-Xmx2048m&lt;/span&gt;
 &lt;span class="err"&gt;-XX:&lt;/span&gt;&lt;span class="py"&gt;PermSize&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;256m&lt;/span&gt;
 &lt;span class="err"&gt;-XX:&lt;/span&gt;&lt;span class="py"&gt;MaxPermSize&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;512m&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Save and close the file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Increasing the &lt;code&gt;-Xms&lt;/code&gt; and &lt;code&gt;-Xmx&lt;/code&gt; values allocates more memory to Eclipse, which can help prevent crashes.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Update Graphics Drivers
&lt;/h2&gt;

&lt;p&gt;Outdated or incompatible graphics drivers can also cause Eclipse to crash. Ensuring that your graphics drivers are up to date can improve stability.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps to Update Graphics Drivers:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Open Software &amp;amp; Updates:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the system menu and search for "Software &amp;amp; Updates."&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Check for Updates:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the "Additional Drivers" tab.&lt;/li&gt;
&lt;li&gt;Select the latest available drivers for your graphics card.&lt;/li&gt;
&lt;li&gt;Apply the changes and restart your computer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Updating your graphics drivers can resolve compatibility issues that might be causing Eclipse to crash.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Disable Unnecessary Plugins
&lt;/h2&gt;

&lt;p&gt;Eclipse plugins can sometimes interfere with the IDE's stability. Disabling or uninstalling unnecessary plugins can help.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps to Manage Plugins:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Open Eclipse:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;code&gt;Help&lt;/code&gt; &amp;gt; &lt;code&gt;Eclipse Marketplace&lt;/code&gt; or &lt;code&gt;Help&lt;/code&gt; &amp;gt; &lt;code&gt;Install New Software&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Manage Installed Software:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the Eclipse Marketplace, go to the "Installed" tab.&lt;/li&gt;
&lt;li&gt;Uninstall or disable any plugins you don't need.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By reducing the number of active plugins, you can improve Eclipse's performance and stability.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Use a Different Java Runtime Environment (JRE)
&lt;/h2&gt;

&lt;p&gt;Eclipse may crash if there are issues with the current JRE. Switching to a different JRE can help.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps to Change JRE:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install a New JRE:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal and install a new JRE, such as OpenJDK 11:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;openjdk-11-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure Eclipse to Use the New JRE:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open Eclipse and go to &lt;code&gt;Window&lt;/code&gt; &amp;gt; &lt;code&gt;Preferences&lt;/code&gt; &amp;gt; &lt;code&gt;Java&lt;/code&gt; &amp;gt; &lt;code&gt;Installed JREs&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add the new JRE and set it as the default.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Using a different JRE can often resolve compatibility issues that lead to crashes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Sudden crashes of Eclipse IDE on Ubuntu can be caused by various factors, including display drivers, memory allocation, graphics drivers, plugins, and JRE compatibility. By following the steps outlined above, you can significantly reduce the likelihood of crashes and enjoy a more stable development environment.&lt;/p&gt;

&lt;p&gt;If you have any other tips or solutions that have worked for you, feel free to share them in the comments below!&lt;/p&gt;

&lt;p&gt;You can connect on LinkedIn with me : &lt;a href="https://www.linkedin.com/in/toindranildutta/"&gt;Indranil Dutta&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
