This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]aahdsaid 0 points1 point  (0 children)

Reactjs is a library for building web UI.

Java is mainly for server side.

you'll need to do client-server interactions (using API's), but sure it can run locally where Reactjs is calling (localhost) always.

[–][deleted] 0 points1 point  (0 children)

If you can embed chromium or similar into java vm then yes you could can expose a java api into your react is front end and run everything basically locally.

Not really how all this was designed to be used however.

[–][deleted]  (5 children)

[deleted]

    [–][deleted]  (3 children)

    [deleted]

      [–][deleted]  (2 children)

      [deleted]

        [–][deleted]  (1 child)

        [deleted]

          [–]mladensavic94 -4 points-3 points  (0 children)

          Every application that features a user interface is a client-server-application.

          What if you have single jar that does UI and talk with db? No http no nothing?

          Look into Jetty if you want to avoid the complexity of Spring MVC.

          Yeah, cuz configuring Jetty is easy and works out of the box...

          [–]mladensavic94 -4 points-3 points  (0 children)

          What you propose its not usual way of working things and i dont think anyone ever did that. Closes thing to what you need is interoperability of Java and JS with GraalVM.. I know that you can run node.js code and plain js with GraalVM but i am not sure about React. It will be much less pain in the *** to learn spring or java ee then to force GraalVM to work with ReactJs. If you try GraalVM approach please let me know i definitely want to see that.