7 ms·
Show HN: A cross-platform terminal emulator written in Java
It's based on the jediterm library developed for IDEs, but it can also be put to work as a standalone terminal emulator with tabs. The library has been around for more than 10 years, but I don't think anyone made a terminal emulator app from it?
- wetpaws 1y ago[dead]
- jarym 1y agoNice work! Code looks pretty clean but what motivated you to write it?
- sebkur 1y agoI found the jediterm library and noticed people asking for releases but the team didn't seem interested (see https://github.com/JetBrains/jediterm/issues/299 https://github.com/JetBrains/jediterm/issues/299 and https://github.com/JetBrains/jediterm/issues/303 https://github.com/JetBrains/jediterm/issues/303). I noticed there are even working examples in the source tree though for a standalone terminal application (https://github.com/JetBrains/jediterm/tree/master/JediTerm/src/main/java/com/jediterm/example https://github.com/JetBrains/jediterm/tree/master/JediTerm/s...) so I thought "let's just package that up into binaries, maybe add tabs to make it convenient to use".
- sebkur 1y agoOne thing I guess this app can do is help track down or surface more still existing bugs in the jediterm library when people start using a jediterm based terminal in their everyday life instead of just while using IntelliJ or Android Studio.
- mdaniel 1y agoI've heard of this %PATH% thing which allows the user to control where they place executables https://github.com/sebkur/forceterm/blob/release-1.1.0/src/main/java/de/topobyte/forceterm/ForceTerm.java#L71 https://github.com/sebkur/forceterm/blob/release-1.1.0/src/m...
- RonanSoleste 1y agoAlso not very platform independent
- sebkur 1y agoWell, it does check if we are on Windows just one line before: https://github.com/sebkur/forceterm/blob/release-1.1.0/src/main/java/de/topobyte/forceterm/ForceTerm.java#L70 https://github.com/sebkur/forceterm/blob/release-1.1.0/src/m...
- alganet 1y agoTrivia: Windows also has %PATHEXT%. It's a set of executable extensions like bat, exe, com, cmd. It is what allows calling `program` and reaching `program.exe`.
- TheTrueScotsman 1y ago[dead]
- sebkur 1y agohmm, I agree, this is pretty hard-coded. It should work for a default installation of git-bash, but of course, the user could have chosen a different location at install time. I'm not even sure how popular git bash is on Windows, I vaguely remember cygwin might be something many user that care to use a terminal might have installed?
- roscas 1y agoMy main reason to use or not use a terminal is to scroll with mouse wheel and change the font size. No fancy gpu acceleration or nice profiles to open servers. A good host with category tree view is a plus, like MobaXterm has. But Terminator does what I need. My pick.
- sebkur 1y agoThe performance of jediterm seemed quite impressive though when I made a quick smoke test with a command such as `time tree ~` in comparison to my regular xfce terminal at lest.
- sebkur 1y agoMouse wheel is working on my Linux box. Is it not on yours? what kind of system? I guess for now there's not much reason to prefer this terminal over any other. I guess we'd need to add something unique, though I'm not sure yet what that might be.
- bitwize 1y agoNeat! A new graphical app in Java!
- sebkur 1y agoThanks!
- 0x445442 1y agoWhat does this buy over all the other terminal emulators? I see why the component is in IDEs so the developer doesn't need to switch apps to get to the terminal. Now a full fledged JVM shell that supports most of the commands we come to expect in a shell and also has the JVM and it's whole ecosystem at its fingertips, that might be something.
- sebkur 1y agoI'm breeding over the same thing. What can we do with this now that would't be so easy within other ecosystems that terminal emulators are typically written in (usually C I guess)?
- zerr 1y agoWhy Swing instead of JavaFX?
- mdaniel 1y agoI believe OP's project is just doing some lightweight "make it executable" bits but the actual JediTerm that it is using for the "terminal" part is, itself, on Swing/AWT https://github.com/JetBrains/jediterm/blob/4cef2840aed5ec1d6fd183e36864262e4549c112/JediTerm/src/main/java/com/jediterm/ui/AbstractTerminalFrame.java#L22-L27 https://github.com/JetBrains/jediterm/blob/4cef2840aed5ec1d6... Although, interestingly, while digging up that link I noticed the JediTermMain that for sure makes it plausibly executable so I dunno if OP's project is actually just "for funzies" or if there's otherwise something added https://github.com/JetBrains/jediterm/blob/4cef2840aed5ec1d6fd183e36864262e4549c112/JediTerm/src/main/kotlin/com/jediterm/app/JediTermMain.kt#L28 https://github.com/JetBrains/jediterm/blob/4cef2840aed5ec1d6...
- sebkur 1y agoyeah, the jediterm library provides a Swing component (JediTermWidget extends JPanel) so it seemed natural to create an app around it that is also Swing based. I guess it's possible to integrate Swing components into JavaFX apps as well, so that should work too. You're right, I'm not doing much except adding some build logic for creating executables really. I also added tabbing and light / dark mode. I guess we could also at least add more options that are readily available for the jediterm widget (https://github.com/JetBrains/jediterm/blob/4cef2840aed5ec1d6fd183e36864262e4549c112/ui/src/com/jediterm/terminal/ui/settings/DefaultSettingsProvider.java https://github.com/JetBrains/jediterm/blob/4cef2840aed5ec1d6...)
- potato-peeler 1y agoWhat is a terminal emulator? Is it just a terminal just like power shell? But why is it an emulator?
- phil9909 1y agoPower Shell is not a terminal, it is a shell (hence the name). Yes, you are using Power Shell in a terminal window, but that is a different program. And it is called a terminal emulator because what we now call a terminal or terminal window is in fact a software emulation of a hardware terminal: https://en.m.wikipedia.org/wiki/Computer_terminal https://en.m.wikipedia.org/wiki/Computer_terminal Edit: To make it a bit clearer: You can access your shell of choice (Bash, Fish, Power Shell, Cmd, ...) in different terminal emulators (Windows Console, GNOME Terminal, Visual Studio Code, Kitty, Forceterm, ...). The drawing of the characters to the screen, scrolling, menus and other UI parts are handeled by the terminal, but the actual logic (processing the commands you type) is done by the shell. The shell decides WHAT to display and the terminal emulator decides HOW it is displayed.
- potato-peeler 1y agoI think I need to know what a shell is before I can understand a terminal. To me shell is just a layer exposed by the OS which allows programs to access OS functions. And terminal is an interactive UI to interact with the OS and its programs. Emulator is synonymous with something here?