I'm using Eclipse with Google's WindowBuilder. When I run my program, WindowBuild launches my browser and my program is displayed in a web. All very slow.
How do I configure, if possible, WindowBuilder so it does not launch the web browser, similar to how Netbeans runs its programs?
Edit 1:
This is similar to: Can I use WindowBuilder without GWT, but I'm looking for an example or instructions for creating simple non-GWT application.
Click the down arrow near the run button, then click run as and run as a java application. This should not run in your browser.
This may depend on what type of project you have declared your project as.
Try to use the swt package.
Related
I am using Eclipse 2018-09 with multiple Java Application run configurations. Below you can see, that I can run them by using the toolbar button. However, in the management view, they are not shown anymore. I already checked the filters. It also says, that it matches all run configurations using the filters at the bottom of the window. I also cannot create a new Java Application run configuration from this view. It simply does nothing when I click the "New launch configuration" button in case Java Application is selected. Any idea besides setting up Eclipse from the ground up (again)?
EDIT: I just downloaded a fresh copy of Eclipse and opened the same workspace. It shows all Java Application run configurations just fine...
everyone!
Here's the thing, I've been developing a JavaFX application with JDK 7u17 (That's the one Netbeans is compilling it, anyways) and I haven't had any problem testing it and running it through Netbeans itself. I simply click Run and it goes smoothly.
I'm creating the .jar files and the other (html, jnlp) through Clean-Build using Netbeans and the app does open perfectly when I execute the Jar.
The problem is when I try to navigate through the App, the app consists of 4 scenes (Login, Main, Search and Create) with me being able to log-in and head to the main scene but that's about it. The buttons to go to the search scene or create scene don't do anything nor I get an error saying something crashed (note I'm not using the console since I don't even know how to make it appear in runtime). I simply click them and they do nothing.
As I said earlier, the app runs perfectly when it's ran through Netbeans.
Some more info:
Netbeans Version: 8.0
Compilling Version through Netbeans: 1.7u17
Existing Java versions on System: 1.8u25, 1.7u67 and 1.7u17 (I already tried enabling only 1.7u17)
The App used FXML to switch between Scenes, it works great between LogIn and Main scenes.
What could it possibly be that it works great using Netbeans and break outside Netbeans?
EDIT #1:
According to the console (Thanks to #janih) I'm running Java version 1.7u17, same as Netbeans and it looks like it's working properly. The problem persists when I'm trying to run the same jar by simply doubli clicking it. It stops showing me controls (Third party controls).
I'm not sure but it could be this:
I was trying to run a project through the given .jar and had those results but that very Project was a plain JavaFX Project, not exactly JavaFX FXML Project and my Project uses FXML files to change between Scenes. What I did is redo the Project in FXML and worked perfectly.
Special thanks to #janih for the help.
I'm working with Ligdx, an API for cross plattaform game development that by default generates at least 2 projects:
The core project: This is the one you are supposed to work on, where all the classes and logic should be placed.
The desktop project: This one is automatically generated from the core project.
The core doesn't have any class to start it because it's supposed to be started from the desktop (or other platforms) project.
It is also always selected -because its what you are working on- so pressing the "run" or "debug" buttons will attempt to run the core project and not the desktop one and immediately fail thus forcing you to select the desktop project before hitting run/debug. This can get extremely annoying, especially when debugging.
So is there a way to force Eclipse to always run the desktop project?
Rekaszeru's answer to this question shows how to set up Eclipse in order to always launch the previously launched application.
You simply have to go to preferences / run-debug / launching and check the "Always launch previously launched application" box as he shown in the picture he used to illustrate his answer:
This will not force one of the projects to always be launched but it would pretty much solve the problem unless you are working on multiple projects at the same time or you alternate between Web/Android/Desktop.
If Your asking how to start a Core project from already existing project present in the eclipse then all you need to do is Right Click on desktop folder of the project and go over Run As and select Java Application
But if that is not what you have posted for I can only understand that you need to understand how a LibGDX project is deployed.... From Desktop project "In xyzMain.java" file you will have a method call to the core project saying:
new LwjglApplication(new Sample(), cfg);
This is where you'r Sample Class from the core project is called over.
But from the title I get a diff feeling that you wish to add another project to your already existing project...
You can do that by changing the build Path of the project....by including Other proj to the one you wish to compile and run.
Hope this helped you out..
I´m not aware of doing exactly what you have described, but I´d suggest using the Launch Configurations menus and dialgos to do what you want in a similar quick way.
Note that you can configure your launch configurations doing: Run -> Run Configurations... (also Run -> Debug configurations...)
Option 1).
Once you have run your Desktop Project, simply use the Run Drop-down button, which contain your launch configurations:
Option 2).
Save a launch configuration file in your Core project (or wherever you want) using the last "common" tab of the launch configuration dialog:
Then you can simply right-click on your that file to launch your Desktop Project:
P.S: I´d also suggest reading a little bit about run configurations in lars tutorial
Running the Community Edition of IntelliJ IDEA on Arch Linux (12.0.4 Build 123.169), I installed the Play!-2.0 Plugin. Once i managed to get it running, I began hitting this wall: whenever I open a *.java-source-file from the project-explorer, it switches me to the UI Designer-view, and I can't access my source code anymore - it just keeps telling me that the "Form file is invalid: Not IntelliJ IDEA GUI Designer form file".
The files I want to work on are pure Java-code, so I have no need for the UI Designer, there is no SWING involved.
Is there a setting somewhere to not invoke this view for any files?
Note: the weird thing is it works if I disable the Play-plugin - something in the plugins.xml maybe?
This may well prove to be a simple config change, but I can't seem to find an obvious setting to solve the following problem:
I have a Vaadin project in Eclipse, which is configured to be debugged with Tomcat v6. If I select the top of the project in the project explorer and hit debug, the eclipse browser launches and my web app opens with the following url:
http://localhost:8080/MyVaadinProject/ THIS WORKS
However, if I'm currently looking at a java file (say Myproject.java), Eclipse tries to open the java file at this url:
http://localhost:8080/MyVaadinProject/WEB-INF/classes/com/example/myproject/Myproject.java
Of course, that produces a 404.
Having to deselect/close my java files every time I want to debug is quite tedious. Is there some way to prevent this behaviour in eclipse?
I am on OSX Lion, Eclipse version 3.7.2.
Thanks!
When running the project, instead of highlighting the class file in the Project Explorer, highlight the very base of the project before running.
This is what we want to run anyway, not the class file itself.
Go to
Windows -> Preferences -> Run/Debug -> Launching
There, at the bottom, select "Always launch the previously launched application".
Now you just have to click your project name in the package explorer and do a Run As -> Run on Server once.
After that launch, you will just need to hit the Run Button and your application should always start the way it should be.