#Terminal and Desktop library Java

1 messages · Page 1 of 1 (latest)

sick echo
#

I have two questions

  • Is there a Terminal UI in java
    -- something like bubble tea(go)/ink(js)
  • Is there a way to build a desktop application using html/css/js in Java.
    -- like webview, electron, tauri
raven boughBOT
#

<@&987246487241105418> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
I have two questions - Is there a Terminal UI in java -- something like bubble tea(go)/ink(js) - Is there a way to build a desktop application using html/css/js in Java. -- like webview, electron, tauri
  1. For a Terminal UI in Java, there are libraries like Lanterna and Charva that can be used to create text-based user interfaces similar to bubble tea in Go or ink in JS. These libraries allow for creating interactive console applications with features like colors, cursor movement, and keyboard input handling.

  2. As for building desktop applications using HTML/CSS/JS in Java, you can use JavaFX or Swing libraries. Both JavaFX and Swing provide APIs for creating graphical user interfaces (GUIs) in Java. JavaFX is the newer and more modern option, with support for web technologies like HTML, CSS, and JavaScript through the WebView component. This allows you to embed web content within your desktop application.

In summary, there are options available for creating a Terminal UI in Java using libraries like Lanterna and Charva. Additionally, you can build desktop applications with HTML/CSS/JS components using JavaFX or Swing libraries.

cosmic wave
#
  1. jshell
  2. majority of java desktop apps are written with javafx, which supports some sort of html/css stuff
#

otherwise u can also create an actual website with java using thymeleaf or vaadin and then display that using electron/cef or similar

#

id recommend going the most popular approach though, i. e. javafx. will be easier overall

#

or to not use java for web and instead write it with actual frontend tech

#

like html/typescript/css/react/angular/vue and whatnot

formal sapphire
#

JavaFX has javafx.scene.web.WebView if you need to open "sites" inside a JavaFX app.

But as @cosmic wave said, it makes more sense to go direct to JavaFX Desktop App, or some frontend tech.

Why need to open the entire app on WebView/etc ?

If you really need a Desktop App (and not just open it on browser) I think you should use a better tool (like JavaFX)

If you don't need, just open it on browser, you can make it an PWA as well.

#

If the Desktop App is just for Windows, you can check .NET as well.

sick echo
#

Thanks for suggesting I will try javafx

next flare
#

like bubble tea (go) is a framework to build simple and complex terminal applications

#

jshell is a REPL tool on the other hand

formal sapphire
#

For "Simple CLI", there's spring shell.

#

but "CLI" is not the same of TUI, TUI is more old Cobol apps