have several java servlet projects. Each one uses a different configuration file. The servlet use and environment variable to find the config file. I have several different run time configurations. One for each project.
Is there a way to set the default run time configuration for each project. I loose a lot of time because I try to debug and accidentally select the wrong profile
Kind regards
Andy
I'm working on a project developing an Eclipse-based application. Running a JUnit plug-in test requires the run configuration for it to have a bunch of parameters set. This means that if I want to run a single test class or method, as far as I can tell I have to create a new configuration or edit one that I reuse. More annoyingly I can't use the convenience of Alt+Shift+X, P.
Is there a way to tell Eclipse that a bunch of parameters are the defaults for an implicitly created run configuration of a given type to use it when it's automagically creating one?
If you are using a custom target platform (which you should use anyway), you can specify Program arguments and VM arguments on the Environment tab of the target platform editor.
They will be used as default values for PDE launch configurations.
I'm trying to use the new SuperDevMode with -launcherdir parameter and currently I point launcherdir to the same folder as where production code is deployed.
The effect is that the .nocache.js file gets overridden by SuperDevMode's nocache.js file and it's impossible to run the app in production-mode(hosted mode) without doing another full recompile.
Is there any way to switch back and forth between SuperDevMode and production mode?
Thank you!
This is indeed how SDM works; the solution is to use distinct output folders for production and dev modes, but this all depends on your build tools, etc.
For instance you could assemble your web app in a distinct folder so you can run it with DevMode.
Or you can use a separate server (or even possibly a reverse proxy) that you configure to load the CodeServer-generated nocache.js in priority over the production one from your assembled webapp. This is what I do in Maven with the Tomcat or Jetty plugins for instance.
I've recently been assigned to work on a Java project. I don't have a lot of experience with this kind of development, so I'm kind of struggling.
The typical development process for this project is:
Make changes in source code
Run ant build script to create EAR
Deploy EAR to development server (Weblogic 12.1.2)
Run application and see if the changes you've made fix the issue you're working on.
So, I am taking it as my personal goal to make it possible to do local development, so debugging will actually work and such.
After spending time googling and playing around, I'm able to get at least part of the way, but am having trouble towards the end of the process.
I've tried some different methods to try to get things working.
First, I checked out the source code via Eclipse, so it shows up as a Project and is correctly linked to subversion. I can bring the build.xml file into the Ant view and build the target I'm interested in. This gives me a EAR file (and a WAR file). But when I try to debug the project, via the right-click on the project and selecting Debug As... I get three options: Java Applet, Java Application, JUnit Test.
If I choose Java Applet, I then get a Select Java Applet popup. After choosing what I think is the right applet I get Errors exist in required project(s), Proceed with launch? If I proceed, I get an Applet Viewer and a bajillion errors and nothing else. If I don't proceed, then the Error log fills up with a bajillion other errors.
If I choose Java Application I get a list of a bunch of different entries, none of which is what I'm trying to debug.
So, after trying all that, I decided to see if I could just import the generated EAR file and debug that way. So, I went through the Import wizard, found the EAR file that I build via Ant. After selecting that and proceeding through the dialog, I get two projects in my Project Explorer: the application (we'll call it AppX) and the AppX_WEB project.
Now, if I select the AppX project and choose Debug As, I get Debug On Server, which is promising. The Console tells me that the server is listening on 127.0.0.1:7001, and the built-in browser actually starts bringing up the page. So I'm feeling pretty good about all that.
The problem is, though, I don't know how to attach that EAR file to the source tree that I've got already so I can actually step through the code.
And going deeper, how do I set it up so that I can develop in my source tree and have them automatically propagated into the EAR file and redeployed?
Or, even better, can I get this working without having to build the EAR file and deploy it? Meaning, can I just run straight from the source tree?
Anyway, any help you can give will be much appreciated.
Thanks!
You can start your server in debug mode then attach eclipse to the running instance and debug it.
For this enable debug port in jvm configurations on your server and launch remote application debugging in eclipse.
Is there a way to add build steps to a "run configuration" in Eclipse?
My project uses an applet that should be built before starting the web application. So I'd like to configure Eclipse to do this single step before actually running the application.
I know I can do it with Ant/Maven, but I wonder if there's a way to do it in Eclipse.
Thanks
For a classic launching (Java or Java Applet) configuration, no. Not directly.
For an External Tols launcher, not directly either.
The idea would be:
to not build your applet every time you modify your main project
make sure it is built when you want to launch your webapp.
For that, you could define two projects:
one for the compilation of your main project.
the second (depending on the first) for the compilation of your applet.
Your launching configuration would then run with the second project (which includes the first)
If the option "Build automatically" is selected, the second project shouldn't run without being compiled first.