Friday, September 25, 2026

Android Studio: extract public key for your application SHA 256

To extract public for you application follow one of these way:

1. From Android Studio

open  Terminal and run 

$ ./gradlew signingReport
...
SHA1: BA:44:...
SHA-256: 61:8C:...
...

2. Using keytool

from directory where jks file locate execute

$ keytool -list -v -keystore ./<jks_name>.jks -alias <your_key>
Enter keystore password:  
Alias name: <your_key>
Creation date: Apr 2, 2024
Entry type: PrivateKeyEntry
...
Valid from: Tue Apr 02 11:18:07 WIB 2024 until: Sat Mar 27 11:18:07 WIB 2049
Certificate fingerprints:
     SHA1: 4B:F2:...
     SHA256: 5F:A0:...
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 1

You can upload / paste your SHA 256 to your play store console  

 

 

 

Android Studio: error Incompatible Gradle JVM version The project's Gradle version 8.13 is incompatible with the Gradle JVM version 25 currently selected to run Gradle build. Gradle 8.13 supports Java versions between 1.8 and 23. Please update the selected JVM to a compatible version.

"Incompatible Gradle JVM version The project's Gradle version 8.13 is incompatible with the Gradle JVM version 25 currently selected to run Gradle build. Gradle 8.13 supports Java versions between 1.8 and 23. Please update the selected JVM to a compatible version. 
Apply compatible Gradle JDK configuration and sync Change Gradle JDK configuration"

to repair android studio error abov, goto File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle JDK, then select your current JDK folder i.e. /usr/lib/jvm/java-21-openjdk-amd64. Then sync project.  

Thursday, September 24, 2026

Asus eee pc 1215b dual boot (debian and windows), downgrade windows 10 to windows 7 pro x64

the disk of system used mbr/dos partition. there are 2 option to install windows 7 pro:

  1. using usb and rufus in mbr mode
  2. using cd/dvd rom
for systen with mbr/dos partition, using cd/dvd is easier. 

the installation is straight forward. yoy format c:/ contains windows 10 , and select this disk as target your windows 7 pro x64. it takes 30 minutes to insta windows 7 pro x64 from dvd.

you need to install driver for vga, wifi and usb. my system uses broadcom bcm4313 combo bluetooth. drives is not exist in official website for asus eee pc 1215b, but exis asus support. alternative, downloas bcm4313 from windowa catalog. you can uses your existing debian to download driver after you repair grub boot.

to repair your existinf grub follow these steps:
  1. boot from any debian media 
  2. enter rescue mode, debian will load any components require.
  3. choose your root system 
  4. choose execute a shell 
  5. run 
# grub-install /dev/sda/
# update-grub

after you restart to your syatem and find no windows option at grub screen, enter into your debian. then at root shell execute 

# update-grub

microsoft has closed any support to windows 7, click on windows update will useless.

Note: your internet explorer will rejected by seach engine because it is too old. the option is using supermium browser.

open your internel explorer and type https://www.supermium.net/. download and install it. dont use internet to open or search supermium, the most search engine server will reject your internet explorer.

if you are not sure about supermium security, use your debian 13 with icewn to browse sensitive application like email or banking.  

Friday, September 18, 2026

Debian 13: jakarta tomcat create servlet manually

under directory WEB-INF create 2 folder

  1. src
  2. classes 

under src, we place servlet and java code.

for package com.dedetok, create folder ~/WEB-INF/src/com/dedetok/ and write 2 files

MyWorld.java

package com.dedetok;

public class MyWorld {

    public String getMessage() {
        return "hello world";
    }
}

HelloServlet.java 

package com.dedetok;

import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

public class HelloServlet extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest request,
                          HttpServletResponse response)
            throws IOException {

        MyWorld world = new MyWorld();

        response.setContentType("text/plain");
        response.getWriter().println(world.getMessage());
    }
} 

We map our servlet, edit ~/WEB-INF/web.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
                             https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd"
         version="6.1">

    <display-name>My Application</display-name>

    <servlet>
        <servlet-name>Hello Anything</servlet-name>
        <servlet-class>com.dedetok.HelloServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Hello Anything</servlet-name>
        <url-pattern>/hello</url-pattern>
    </servlet-mapping>
</web-app>

Note: <servlet-name> between <servlet> and <servlet-mapping> must match.

compile your java, go it ~/WEB-INF/ folder and run

$ javac   -cp <your_path_to_jakarta_tomcat>/apache-tomcat-11.0.26/lib/servlet-api.jar   -d ./classes   ./src/com/dedetok/*.java 

restart your jakarta tomcat and try servlet http://localhost:8080/myapp/hello. hello comes from <servlet-mapping>

It is not practicable to map every servlet, there is other way

now at directory ~/WEB-INF/src/com/dedetok/  create HelloServlet2.java

package com.dedetok;

import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import jakarta.servlet.annotation.WebServlet;

@WebServlet("/hello2")
public class HelloServlet2 extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest request,
                          HttpServletResponse response)
            throws IOException {

        MyWorld world = new MyWorld();

        response.setContentType("text/plain");
        response.getWriter().println(world.getMessage()+" 2");
    }
}  

we use  @WebServlet("/hello2") to map url. do not forget to import  jakarta.servlet.annotation.WebServlet.

compile it, and restart your jakarta tomcat. you can access it via http://localhost:8080/myapp/hello2.

To use MyWorld class into jsp, at directory ~/myapp/ (upper directory from WEB-INF) , create file callservlet.jsp

<%@ page import="com.dedetok.MyWorld" %>

<%
    MyWorld world = new MyWorld();
%>

<html>
<body>
    <h1><%= world.getMessage() %></h1>
</body>
</html> 

or use wildcard for import="com.dedetok.*"  

Now you can directly build your application. MVC model can be used if you like. happy coding.  

 

Thursday, September 17, 2026

Debian 13: jakarta tomcat add application myapp manually without war (part 2)

It this part, we will: 

  1. Add myapp
  2. Add mariadb library

Add myapp

  1. under folder <home>/webapps/ create folder myapp
  2. under folder <home>/webapps/myapp/  create folder WEB-INF
  3. optional, at folder <home>/webapp/myapp> write index.html e.g  
<!DOCTYPE html>
<html lang="en">
<body>
    <h1>Hello, World!</h1>
</body>
</html>

Restart your jakarta tomcat, and myapp appear in list of application. Test your index.html, url http://localhost:8080/myapp/.

Add mariadb 

  1. Under folder  <home>/webapps/myapp/WEB_INF, create folder lib.
  2. download jconnect from https://mariadb.org/connector-java/all-releases/, and put it in <home>/webapps/myapp/WEB_INF/lib, i.e. <home>/webapps/myapp/WEB-INF/lib/mariadb-java-client-3.5.3.jar

Under folder  <home>/webapps/myapp/ write test.jsp

<%
try {
    Class.forName("org.mariadb.jdbc.Driver");
    out.println("MariaDB JDBC driver FOUND");
} catch (ClassNotFoundException e) {
    out.println("MariaDB JDBC driver NOT FOUND");
}
%>

restart your jakarta tomcat and test it http://localhost:8080/myapp/test.jsp.

if you have mariadb running, you can extend test.jsp to this

<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>

<%
try {
    Class.forName("org.mariadb.jdbc.Driver");
    out.println("MariaDB JDBC driver FOUND<br>");

    Connection conn = DriverManager.getConnection(
        "jdbc:mariadb://localhost:3306/mydb", // change to your db name
        "admin", // change to your user
        "admin" // change to your password
    );

    out.println("Connected to MariaDB!<br>");

    conn.close();

} catch (ClassNotFoundException e) {
    out.println("MariaDB JDBC driver NOT FOUND<br>");
    out.println(e);

} catch (Exception e) {
    out.println("Database connection FAILED<br>");
    out.println(e);
}
%>