Running Flex in Eclipse - eclipse

I have a Java project and Flex together in Eclipse. The Java is the server and Flex is the client.
I once (this morning) could just right click on my main.mxml -> RunAs->FlexApplication and that would launch the client.
I messed up the project somehow ( deleted the main.mxml, then returned ti etc...) and can not run it now.
What I am trying to do is right click->RunConfigurations... and trying to configure it. But can't!
My other group member has a file name in "Application File:" dialog. I don't have and ant add.
Anyway any ideas how can I configure the main.mxml to run?

Right click your new application file and select "set as default application". That should recompile the project and make it available to you in the "run configuration" Dialog.

Related

Not able to create module in GWT in eclipse

I followed this link to write my first gwt hello world program in eclipse. I created GWT Project in eclipse,then I want to create module for that,then I right clicked on package,new-->module
in gwt,then it is not going to next step, that is the problem..
1- Start eclipse
2- From eclipse marketplace seearch for gwt
3- install Eclipse GWT plugin 3.0.0
4- From eclipse menu select window -> preferences
5- open entry GWT -> GWT settings
6- Click Download button, this will take you the gwt sdk download page.
7- Donwolad and extract the latest sdk.
8- From eclipse GWT setttings preference window click on add
9- Select the extracted SDK folder.
10- Check the check box next to the new added SDK to make it default.
11- click Apply and close
Create and run a project
1- Locate the gwt plugin action button in the toolbar.
2- Select the button and select New GWT application project ... from the dropdown.
3- Enter the project name and package then click Finish
4- Select the newly created project and from the GWT action button select GWT compile project.
5- Once the compilation is completed, Right click the project then select Run as -> 2 GWT Development mode with jetty.
6- Once ready double click the url of the HTML to open it in the browser.
#Devi George: As in your case the suggested above by #Ahmad Bawanesh answer didn't help resolving the caption issue. There is nothing in the answer that actually mentions "module", let alone how to add one. I've had everything set up as explained, and still had a compiler error. What helped to address it described in this thread. Next, you should make sure the Java JRE setting in Eclipse preferences points to the installed JRE 1.8 location and is selected as the default. This thread got it covered.
As to the actual question on adding a module to a GWT project, you can always add a file and name it as needed with an xml file extension. Search the page for "Modules: Units of configuration" on how to configure the newly created xml file. Obviously, it must have a module tag inside, among other things.

How to setup tomcat with intelliJ?

I used to use eclipse for my java project till now. In that I used to give a server.xml corresponding to a tomcat server. But in IntelliJ I can't find where should I give that server.xml. Can anyone help me out?
You can find this file in Directories Used by IntelliJ IDEA to Store Settings, Caches, Plugins and Logs.
For my computer, I am using window 10, I found that in following path:
C:\Users\<USER ACCOUNT NAME>\.IntelliJIdea15\system\tomcat\<project name>\conf\server.xml
In intellij, you should click on Run > Edit configurations... > Add new configuration (clicking on "+" icon) > Tomcat (select local or remote) and complete the configuration using your settings.
I hope this can help you.
Thanks
Goto File, then New Project.
Create from Scratch.
Click Next, give the Project a Name, and keep Clicking Next until the Desired Technologies window comes.
Click Web-Application, then Finish.
Click File, then Settings.
Click on Application Servers and Hit the + to add a new Tomcat Server.
Set the Home Directory of the application server you have just installed(ex: c:/Program Files/Apache Software Foundation// and then Click ok.
Click on the run button, and then then Edit Defaults.
Click on the + in the top left hand corner and add a Tomcat Server, then Local configuration.
Select the Tomcat in the pulldown menu next to Application Server.
I hope this will help you.

How to remove a configuration in Eclipse GWT

I have migrated my application development to a new PC and now when I run the application (Run > Run as > Web application). I get the "HTML Page Selection" popup in which I select my application. However, now I also get a "Choose a launch configuration:" popup which lists "AwardTracker" and "AwardTrackwer.html". They both do the same thing. How do I remove one of these please (this is more annoying than anything else)?
Regards,
Glyn
How to remove a configuration in Eclipse GWT
Simply select any Web Application and click on RED X icon displayed on top right of it to remove an existing configuration.
Once a Web Application is configured then there is no need to create it again. Just launch it from existing one to avoid it choosing a launch configuration again.
Once configured then don't run it again by RIGHT click on the project to run as Web Application. Simply select from the existing one form the tool bar as shown in below screenshots.
Click Run > Run Configurations > your configuration (typically, a name of your HTML or JSP file) > Arguments.
Make sure you only have the path that you want to launch.

How to see what triggered "Build workspace" in Eclipse

My eclipse is constantly running "Build Workspace" tasks. It is not a long running builds, more like 1 build a second.
Sometimes I'd see 10 "Build workspace" tasks sleeping and waiting in the Progress tab.
I'd like to know what is triggering those builds. I have many plugins installed.
What is the way to troubleshoot this?
Here are some steps to help you debug what is going on.
Download the Eclipse Classic SDK for whatever version of Eclipse you are currently using. For Juno that link is here.
Open the eclipse.ini for your current normal eclipse and add the following options: -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
Start your Eclipse instance that you want to debug, it should pause at the splash screen
Unzip the Eclipse classic SDK and start that Eclipse instance
Open the Plugins view
Find org.eclipse.core.resources
Right click and select "Add to Java Search"
Open Type dialog, type in "BuildManager"
You should see a class from that plugin be given as an option, then open it
Find the line that looks like: prereqs = currentBuilder.build(trigger, args, monitor); It should be about line 728 (For Eclipse Juno)
Set a breakpoint here
Create a new Remote Java Application debug configuration and point to localhost port 8000
Launch this debug configuration
You should see your other Eclipse instance startup
Now every time the Eclipse build manager fires off a build (which should happen on all of those Build Workspace jobs), then you will see this breakpoint be hit and you can find out what builder is firing.
Update 1
If you need source to other Eclipse bundles they can also be added in the "Plug-ins" view. Select all the plugins there and right-click and use Add to Java Search
What plugins do you have installed that are currently active?
Press CTRL+3 type "plugin" and then choose plugin registry.
In the plugin view right click and choose "Active Only"
Check the non-essential core plugins (for example related to servers which automatically build & publish)
Post a screenshot of active plugins if you need any more help
You may have build automatically checked which will build when you save. Check under the nav Project > Build Automatically
Other way to close all unused projects.
Further, for good view, use filtering: View Menu -> filters -> Check 'Closed Project'.
Sometimes if you have > 20 opened projects you can observe constant 'build workspace' tendency.

Eclipse "Waiting for virtual machine to exit"

I'm working on a blackberry project using eclipse and bb-ant tools. I've created a build.xml file to perform the build. Everytime I try to run an Ant build, eclipse pops up the progress dialog and it hangs stating "Waiting for virtual machine to exit."
I downloaded an open source Blackberry project that has an ant build and it is showing the same behavior.
Does anyone have any suggestions?
Edit:
I used the command line to build my xml file and it built fine. However, when I tried from Eclipse it still hangs.
I've tried both the standard eclipse plugin directory and the path I downloaded ant to.
You could check if your ANT_HOME settings are correct (see also this blog post).
"Window > Preference > Ant > Runtime": "Ant Home Entries".
if the jars files are from a plugin directory (beside the default 'org.apache.ant_1.7.1.v20090120-1145' one) and not an independent ant installation, that might explain the problem.
Try clicking the "Ant Home" button on the right side and setting up ant home such as "C:\path\to\apache-ant-1.7.0"
There are similar bugs to this kind of situation (bug 173419, ticket 91).
It is worth checking the JVM used for the project.
It can also occurs when a ant task is poorly implemented.
You had the problem because the java version ant tries to run with is incorrect.
By default, eclipse will try to run the ant build with the java version it uses to compile the java files (Blackberry JRE), which won't work! You need to change the jre version by choosing "Run As... > Ant build". Before clicking run, go to the JRE tab, choose "Separate JRE:" and change "Blackberry JRE " to a standard java JRE. Press the run button and everything should work correctly.
I hit this problem also. Although I never used the same solution, you pointed me in the same direction.
I was using a ant file as a builder in my project, and I disabled the Allocate Console build option. This is when I hit the 'Waiting for virtual machine to exit'.
So I simply enabled the Launch in background option and it worked.