Is it possible to export a GUI form so it can be run in any IDE?
Answered
I'm trying to create a pretty simple GUI, and IntelliJ has seemed to have the best free GUI creater that I could find. I have spent countless hours trying to figure out how I could save or export the files to be able to use them in another IDE. I'm doing this for school projects, so they need to be able to run on a clean build of Eclipse when my professor grades it. Am I going to have to continue using WindowBuilder/manually configuring the GUI for that to happen?
Please sign in to leave a comment.
In GUI Designer settings you can configure IDEA to generate GUI code into source .java files instead of the .class files. Then just include forms_rt.jar in the classpath and your project will compile and run from any IDE.
I have found where to change from binary class files to Java source code, but I'm not sure where to find forms_rt.jar. Also, upon changing to the Java source code option, the $$$setupUI$$$() that was created has multiple "cannot resolve symbol 'intellij'" syntax errors like for example on this line:
Any idea what I did wrong?
Thanks for the help!
Add IDEA_HOME\redist\forms_rt.jar into module dependencies (http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html).
Got it working, you're a lifesaver. Thanks again!
I have no idea where to find or get "IDEA_HOME\redist\forms_rt.jar" it simply isn't on my computer and I'm not sure how to get new libraries or Mavens I'm kind of lost.
The forms_rt.jar file seems to be located at "IDEA_HOME/lib/forms_rt.jar" now.
I found the .jar file and added it to the project, then i rebuild it but when i try to run it using another ide it doesn't work, what should i do? :(
Apple
What IDE are you trying to run it in? Is there any error message?
Please attach screenshots of your project in IDEA with output folder expanded to show its contents, and also Project Structure | Modules | Dependencies dialog showing forms_rt.jar added to the module.
@...
Thanks, but i realized what the problem was, i was using an absolute path for the .jar file so there was no way it could run in another ide and even less another machine. I just put it as a library of the project and it compiled and runned just fine :D
Apple Great, good to know👍