Java (not JavaScript) IDE w/ Electron


#1

Hello,

I am looking to build a Java IDE with Electron. I currently use BlueJ, but the UX is dated, while more modern IDEs like Eclipse or IntelliJ IDEA are to complex for my uses. I also wanted it to be portable, and not require administrator access.

After doing a bit of research, I learned how online Java compilers/IDEs work, as well as how Electron works. Basically, the online Java IDE takes your input and then a server interprets your input and converts it to Java code that a compiler on the server can compile and run, subsequently pushing the result back.

I want to do something similar, except I don’t want a server to be involved, thus making it like a desktop IDE. I plan on making a UX similar to BlueJ, but adding a much needed dark theme and a more slick UX, kind of like Atom’s One Dark theme. The Java JDK also should be bundled in, just like it is with BlueJ.

I don’t really know where to start, as I don’t know how to combine the JDK that would normally be running as a standalone program on the server with the web app itself.

Thanks.


#2

Start here: https://www.quora.com/How-do-I-create-online-compiler-for-C-C++-and-Java-using-node-js-as-server-language

You need to do exactly that. Having read about Electron, you should understand that the UI runs in a process separate from node.js. You can communicate between the two and this is where your major design challenge will be: getting the results of the compile up to the UI. You should be passing file names to node.js and invoking the java compiler at the command line. Capturing the compiler output should be easy enough (output to file), but getting it up to the UI in a usable format is a good deal of work, accompanied by finding a way to display it that is palatable to the user. This is where eclipse has years of code already written. You may want to visit that code to get yourself an idea of what all you need to cover off from a model perspective. Of course you could just spew the text output, if that is all you need.
Good luck.


#3

Thanks @jhaydt! That Quora post was pretty helpful, and I think I have my summer’s work cut out for me now. The IDE I’m envisioning is going to be pretty basic, maybe like BlueJ, so I’ll have to figure out how BlueJ UI works (instead of Eclipse UI). But thanks anyways!