{"id":26186718,"url":"https://github.com/ading2210/setup-j2me-sdk","last_synced_at":"2026-02-16T13:33:46.993Z","repository":{"id":277018848,"uuid":"930595561","full_name":"ading2210/setup-j2me-sdk","owner":"ading2210","description":"A tutorial on how to set up the J2ME SDK with Intellij on modern Windows or Linux systems.","archived":false,"fork":false,"pushed_at":"2025-02-12T21:32:08.000Z","size":24,"stargazers_count":10,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T07:17:44.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ading2210.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-10T22:18:34.000Z","updated_at":"2025-10-07T15:17:39.000Z","dependencies_parsed_at":"2025-10-10T07:17:10.494Z","dependency_job_id":"2d91e8fd-ed21-4e5b-9af8-043cf2da9bb5","html_url":"https://github.com/ading2210/setup-j2me-sdk","commit_stats":null,"previous_names":["ading2210/setup-j2me-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ading2210/setup-j2me-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fsetup-j2me-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fsetup-j2me-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fsetup-j2me-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fsetup-j2me-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ading2210","download_url":"https://codeload.github.com/ading2210/setup-j2me-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fsetup-j2me-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29509159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-11T23:34:04.336Z","updated_at":"2026-02-16T13:33:46.977Z","avatar_url":"https://github.com/ading2210.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# J2ME SDK Tutorial for Intellij\n\nThis is a tutorial for setting up the J2ME SDK on modern Windows or Linux distros, using a recent version of IntelliJ. You may find this guide useful if you are particpating in the [Hack Club Retrospect J2ME event](https://retrospect.hackclub.com/j2me). \n\n![image](https://github.com/user-attachments/assets/d8616f27-f887-444f-8319-5c4899f1761e)\n\nThis is the guide for Linux. For the Windows setup guide, see [`windows_setup.md`](https://github.com/ading2210/setup-j2me-sdk/blob/main/windows_setup.md).\n\n## 1. Set up Directories\nCreate a directory to put the SDK and related files. I'll use `~/j2me`.\n```\n~$ mkdir ~/j2me\n~$ cd j2me\n```\n\n## 2. Download the Sun Java Wireless Toolkit\nDownload and extract the [Sun Java Wireless Toolkit](https://www.oracle.com/java/technologies/java-archive-downloads-javame-downloads.html) by running these commands. Don't worry, you don't need an Oracle account here.\n```\n~/j2me$ wget -c --no-cookies --no-check-certificate --header \"Cookie: oraclelicense=accept-securebackup-cookie\" \"https://download.oracle.com/otn-pub/java/sun_java_wireless_toolkit/2.5.2_01/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh\"\n--2025-02-10 14:08:23--  https://download.oracle.com/otn-pub/java/sun_java_wireless_toolkit/2.5.2_01/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh\nResolving download.oracle.com (download.oracle.com)... 23.196.36.113\nConnecting to download.oracle.com (download.oracle.com)|23.196.36.113|:443... connected.\nHTTP request sent, awaiting response... 302 Moved Temporarily\nLocation: https://edelivery.oracle.com/otn-pub/java/sun_java_wireless_toolkit/2.5.2_01/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh [following]\n--2025-02-10 14:08:24--  https://edelivery.oracle.com/otn-pub/java/sun_java_wireless_toolkit/2.5.2_01/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh\nResolving edelivery.oracle.com (edelivery.oracle.com)... 2600:1406:5400:486::366, 2600:1406:5400:4af::366, 184.28.231.219\nConnecting to edelivery.oracle.com (edelivery.oracle.com)|2600:1406:5400:486::366|:443... connected.\nHTTP request sent, awaiting response... 302 Moved Temporarily\nLocation: https://download.oracle.com/otn-pub/java/sun_java_wireless_toolkit/2.5.2_01/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh?AuthParam=1739225424_622a9caf2f8c1940e97052f7207447da [following]\n--2025-02-10 14:08:24--  https://download.oracle.com/otn-pub/java/sun_java_wireless_toolkit/2.5.2_01/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh?AuthParam=1739225424_622a9caf2f8c1940e97052f7207447da\nConnecting to download.oracle.com (download.oracle.com)|23.196.36.113|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 39797585 (38M) [application/x-sh]\nSaving to: ‘sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh’\n\nsun_java_wireless_toolkit-2.5.2 100%[====================================================\u003e]  37.95M  23.6MB/s    in 1.6s    \n\n2025-02-10 14:08:26 (23.6 MB/s) - ‘sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh’ saved [39797585/39797585]\n\n~/j2me$ mkdir sdk\n~/j2me$ unzip -q sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh -d sdk/\nwarning [sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh]:  26624 extra bytes at beginning or within zipfile\n  (attempting to process anyway)\n~/j2me$ rm sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh \n```\n\n## 3. Download a 32 Bit JDK\nDownload and extract the 32 bit Java 8 JDK by running these commands. We're going to use Huawei's mirror to skip logging into an Oracle account. \n```\n~/j2me$ wget \"https://repo.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-i586.tar.gz\"\n--2025-02-10 14:10:27--  https://repo.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-i586.tar.gz\nResolving repo.huaweicloud.com (repo.huaweicloud.com)... 199.91.74.185, 149.104.73.27, 199.91.74.184, ...\nConnecting to repo.huaweicloud.com (repo.huaweicloud.com)|199.91.74.185|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 197025433 (188M) [application/octet-stream]\nSaving to: ‘jdk-8u202-linux-i586.tar.gz’\n\njdk-8u202-linux-i586.tar.gz     100%[====================================================\u003e] 187.90M  12.6MB/s    in 13s     \n\n2025-02-10 14:10:42 (14.0 MB/s) - ‘jdk-8u202-linux-i586.tar.gz’ saved [197025433/197025433]\n\n~/j2me$ tar -xf jdk-8u202-linux-i586.tar.gz \n~/j2me$ ls\njdk1.8.0_202  jdk-8u202-linux-i586.tar.gz  sdk\n~/j2me$ rm jdk-8u202-linux-i586.tar.gz \n```\n\n## 4. Install and run IntelliJ IDEA Community Edition 2019.3.\n\n### Using snap\n\n[Make sure that snap's installed](https://snapcraft.io/docs/installing-snapd). On Debian, do `sudo apt install snapd` first. \n\n```\n~/j2me$ sudo snap install intellij-idea-community --channel=2019.3/stable --classic\nintellij-idea-community (2019.3/stable) 2019.3.5 from jetbrains✓ installed\n~/j2me$ snap run intellij-idea-community\n```\n\n### Using an unofficial public archive\n\n```\n~/j2me$ wget https://github.com/mmk2410/intellij-idea-community/raw/bb2c011025c423d4c971fb19ef8fde6c4027d4bd/intellij-idea-community_2019.3.4-1_all.deb\n~/j2me$ sudo apt update \u0026\u0026 sudo apt install ./intellij-idea-community_2019.3.4-1_all.deb\n~/j2me$ intellij-idea-community\n```\n\n## 5. Install Intellij Plugins\n\nOn the welcome screen, configure your plugins.\n\n![image](https://github.com/user-attachments/assets/075c0b10-1024-4218-9e8d-c5e3a2d5649d)\n\nYou can install the J2ME plugin here.\n\n![image](https://github.com/user-attachments/assets/a5aa6277-027a-452f-a77d-62c8d754cf0d)\n\n## 6. Setup Intellij Project\n\nCreate a J2ME project and specify the path to the SDK you already downloaded.\n\n![image](https://github.com/user-attachments/assets/6ce64ab8-97c6-498b-8bf9-9a074e2612e8)\n\nUnder the `File \u003e Project Structure \u003e SDKs` menu, add the JDK you downloaded earlier.\n\n![image](https://github.com/user-attachments/assets/69b3b31a-e7dd-45da-863c-8e274e027d9b)\n\nIn the settings for the Sun Wireless Toolkit, make sure it's set to use `1.8` as the JavaSDK.\n\n![image](https://github.com/user-attachments/assets/ccc08afe-c75c-4b51-a21b-d5ef0905a136)\n\nUnder `File \u003e Settings \u003e Build, Execution, Deployment \u003e Compiler \u003e Java Compiler` make sure the project bytecode version is `1.4`. \n\n![image](https://github.com/user-attachments/assets/93be440e-c389-4eb6-a3c3-d2326beb23bf)\n\nAdd in your `MainMIDlet` class.\n\n![image](https://github.com/user-attachments/assets/d4fd8939-89e1-4a68-a065-0625636cee98)\n\nIn `File \u003e Project Structure \u003e Artifacts`, create a new JAR artifact with the proper module.\n\n![image](https://github.com/user-attachments/assets/6cc8b808-f3be-4f03-8be9-8746567a22a0)\n\nMake sure the output directory for your JAR is the same as the project's root directory.\n\n![image](https://github.com/user-attachments/assets/4a100704-8db3-40ea-9380-1e2de9c988b5)\n\nIn the top right corner click on \"Add Configuration\"\n\n![image](https://github.com/user-attachments/assets/3dac5168-a802-4f2e-a1e8-894e6c0ebc29)\n\nIn that menu, create a new J2ME run configuration.\n\n![image](https://github.com/user-attachments/assets/762d131d-fb98-4603-b7cd-08e852f51b23)\n\nChange the run mode to class, then set the proper MIDlet class.\n\n![image](https://github.com/user-attachments/assets/16a640f5-1428-4bbf-ac26-4cf6817d7068)\n\nIn the before launch options, make it build the project and then the JAR artifact.\n\n![image](https://github.com/user-attachments/assets/1e6359fd-3778-4ce8-aabc-9ce4b500ea23)\n\n## 7. Fix SDK Emulator Script\n\nThe original emulator script tries to run the wrong Java version. \n\nThe original script is located at `sdk/bin/emulator` and looks like this:\n```\n~/j2me$ cat sdk/bin/emulator \n#!/bin/sh\n\njavapathtowtk=\n\nPRG=$0\n\n# Resolve soft links\nwhile [ -h \"$PRG\" ]; do\n    ls=`/bin/ls -ld \"$PRG\"`\n    link=`/usr/bin/expr \"$ls\" : '.*-\u003e \\(.*\\)$'`\n    if /usr/bin/expr \"$link\" : '^/' \u003e /dev/null 2\u003e\u00261; then\n        PRG=\"$link\"\n    else\n        PRG=\"`/usr/bin/dirname $PRG`/$link\"\n    fi\ndone\n\nKVEM_BIN=`dirname \"$PRG\"`\nKVEM_HOME=`cd \"${KVEM_BIN}/..\" ; pwd`\nKVEM_LIB=\"${KVEM_HOME}/wtklib\"\nexport MMAPI_GM_SOUNDBANK=\"${KVEM_HOME}/lib/soundbank.dls\"\n\n\"${javapathtowtk}java\" -Dkvem.home=\"${KVEM_HOME}\" \\\n    -Djava.library.path=\"${KVEM_HOME}/bin\" \\\n    -cp \"${KVEM_LIB}/kenv.zip:${KVEM_LIB}/ktools.zip:${KVEM_LIB}/customjmf.jar\" \\\n    com.sun.kvem.environment.EmulatorWrapper \"$@\" 0\n```\n\nEdit the `javapathtowtk=` line to instead be:\n```\njavapathtowtk=\"$(realpath \"$(dirname \"$0\")\"/../../jdk1.8*)/bin/\"\n```\nAnd save the file.\n\n## 8. Install Missing 32 Bit Libraries\n\nIf you try running the emulator at this stage, it will fail because it's missing 32 bit shared libraries. Identify the ones you need using `ldd`.\n```\n~/j2me$ ldd sdk/bin/libzayit.so\n\tlinux-gate.so.1 (0xf7efd000)\n\tlibXt.so.6 =\u003e not found\n\tlibX11.so.6 =\u003e /lib/i386-linux-gnu/libX11.so.6 (0xf76fd000)\n\tlibm.so.6 =\u003e /lib/i386-linux-gnu/libm.so.6 (0xf75f8000)\n\tlibnsl.so.1 =\u003e /lib/i386-linux-gnu/libnsl.so.1 (0xf75dd000)\n\tlibICE.so.6 =\u003e /lib/i386-linux-gnu/libICE.so.6 (0xf75c0000)\n\tlibSM.so.6 =\u003e /lib/i386-linux-gnu/libSM.so.6 (0xf75b5000)\n\tlibpthread.so.0 =\u003e /lib/i386-linux-gnu/libpthread.so.0 (0xf75b0000)\n\tlibstdc++.so.6 =\u003e /lib/i386-linux-gnu/libstdc++.so.6 (0xf7390000)\n\tlibgcc_s.so.1 =\u003e /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7369000)\n\tlibc.so.6 =\u003e /lib/i386-linux-gnu/libc.so.6 (0xf713f000)\n\tlibxcb.so.1 =\u003e /lib/i386-linux-gnu/libxcb.so.1 (0xf7111000)\n\t/lib/ld-linux.so.2 (0xf7eff000)\n\tlibbsd.so.0 =\u003e /lib/i386-linux-gnu/libbsd.so.0 (0xf70fa000)\n\tlibuuid.so.1 =\u003e /lib/i386-linux-gnu/libuuid.so.1 (0xf70f0000)\n\tlibXau.so.6 =\u003e /lib/i386-linux-gnu/libXau.so.6 (0xf70eb000)\n\tlibXdmcp.so.6 =\u003e /lib/i386-linux-gnu/libXdmcp.so.6 (0xf70e4000)\n\tlibmd.so.0 =\u003e /lib/i386-linux-gnu/libmd.so.0 (0xf70d5000)\n```\n\nIf you're on Ubuntu or Debian, make sure your system is configured to install i386 packages by adding the corresponding package sources:\n```\n~/j2me$ sudo dpkg --add-architecture i386\n~/j2me$ sudo apt update\nHit:1 http://archive.ubuntu.com/ubuntu oracular InRelease\nHit:2 http://archive.ubuntu.com/ubuntu oracular-security InRelease\nGet:3 http://archive.ubuntu.com/ubuntu oracular/main i386 Packages [1064 kB]\nGet:4 http://archive.ubuntu.com/ubuntu oracular/universe i386 Packages [8526 kB]\nGet:5 http://archive.ubuntu.com/ubuntu oracular-security/main i386 Packages [103 kB]\nGet:6 http://archive.ubuntu.com/ubuntu oracular-security/universe i386 Packages [49.7 kB]\nFetched 9743 kB in 1s (6932 kB/s)\n11 packages can be upgraded. Run 'apt list --upgradable' to see them.\n```\n\nIf you're on Debian or Ubuntu, you can find which packages include the missing libraries using `apt-file`.\n```\n~/j2me$ apt-file search libXt.so.6\nlibxt6: /usr/lib/x86_64-linux-gnu/libXt.so.6\nlibxt6: /usr/lib/x86_64-linux-gnu/libXt.so.6.0.0\n```\n\nThen you can just install those packages. Make sure to specify that they are 32 bit.\n```\n~/j2me$ sudo apt install libxt6:i386\nReading package lists... Done\nBuilding dependency tree... Done\nReading state information... Done\nThe following NEW packages will be installed:\n  libxt6:i386\n0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 192 kB of archives.\nAfter this operation, 485 kB of additional disk space will be used.\nGet:1 http://deb.debian.org/debian bookworm/main i386 libxt6 i386 1:1.2.1-1.1 [192 kB]\nFetched 192 kB in 0s (1,498 kB/s)\nSelecting previously unselected package libxt6:i386.\n(Reading database ... 626617 files and directories currently installed.)\nPreparing to unpack .../libxt6_1%3a1.2.1-1.1_i386.deb ...\nUnpacking libxt6:i386 (1:1.2.1-1.1) ...\nSetting up libxt6:i386 (1:1.2.1-1.1) ...\nProcessing triggers for libc-bin (2.36-9+deb12u9) ...\n```\n\n## 9. Running the Project\n\nNow, you can just hit the run button in IntelliJ to build your project and run it in the emulator. \n\n![image](https://github.com/user-attachments/assets/b3c5a1b4-8960-4340-a302-982c34600e5f)\n\nYou can even debug it.\n\n![image](https://github.com/user-attachments/assets/6443aa50-e8ff-4c7c-813b-4fd7bf7a7b23)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fading2210%2Fsetup-j2me-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fading2210%2Fsetup-j2me-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fading2210%2Fsetup-j2me-sdk/lists"}