How to manually test compiled GWT project? - java

I am brand new to GWT. I followed the official tutorials, but on the Compilation section, I am getting completely confused by this:
Tip: If you launched the development mode server, you can run your application in production mode (after compiling it) by removing the gwt.codesvr parameter from the URL before loading the application.
I don't see this gwt.codesvr parameter anywhere, either in build.xml or in the devmode UI. What is meant by this? How can I test the compiled version of the application locally?

I don't know that parameter either.
I think the best way to start with GWT using Eclipse is by using the Eclipse plugin from branflake.
https://github.com/gwt-plugins/gwt-eclipse-plugin
On this github page a link is presented "GWT Eclipse Plugin Youtube Playlist". Follow that link and watch the videos. You will probably learn a lot from them.

When you run devmode, by default the codeserver will be on port 9997. You don't need the gwt.codesvr=... parameter in the URL unless you are doing something special.
When you start devmode, either from the command line, or in an IDE (eclipse), the launch URL that is given does not have this parameter in it. The documentation you refer to would relate to an earlier version of GWT I assume, and is a little out of date.

Related

what should java.testMethod be set to for vscode to run junit tests

vscode 1.52 redhat 7.7
I believe I have all the extensions I need installed ( although the maven extension failed to install it looks like the pom file was read ). When I open a junit test case I see "run all Tests". When I select it I get an error
set "java.testMethod"" in ./vscode/settings.json
I've searched the web and the vscode documentation but am not finding a reference to java.testMethod so I don't have any idea what to set it to. I am also puzzled that it refers to .vscode/settings.json when that file is under .config/Code/User
I have met the same problem. And it was solved. The reason is that the class did not import the reference. You can check it.
Had very similar issue and it turns out finally that some extensions which I unconsciously installed were fine by the time there was an update.After reintsalling only needed extensions all went back to working mode.Be sure the Test Runner for java (should be in Extension Pack for Java) is enabled.

Launch Eclipse project from plugin

I want to make a Eclipse plugin where I can run and/or debug a project as Java Application but with some customization.
The project application instantiates an engine which I want to access with my own "debugger application". I imagine it would work similar to the default eclipse debugger.
However I only find articles about launch configurations and not how to actually launch the program. The closest I got is this which doesn't have any proper answer.
I also tried to search the Eclipse sourcecode to see if I could find the right method, but there are so many repositories that it's impossible to find what you need.
So what I want to know is how to customize the "Run as Java application" functionality. How can i start the project application in one thread and in another thread start my own application with a reference to the project application?
Hope you clever people of the world have an awesome answer!

Eclipse plugin not working properly

I developed an Eclipse plugin that compiles and runs java code in German. The technique I am using is that I translate the code to English and pass it to Java Compiler and get the results back and print it in the console.
The problem is that the plugin works when I run the plugin from Inside Eclipse but when I install the plugin in Eclipse so that when I open Eclipse it already exists there and start to test if a real user uses my plugin and creates a new Java project and try to the compile button in my plugin it says [The chosen operation is not currently available] ![Here is the the way I run and it opens a new Eclipse application with the installed plugin ]
Any help please
the way you installed your plugin sounds a little weird to me. So at first please try to export your plugin via the Export Wizard.
(Select Export -> Deployable plugins and features from your projects context menu)
Export your project as jar file and copy it to the 'plugin' folder of your eclipse instance.
After that it might be helpful to debug your plugin on OSGI-Level as there might be a problem loading your plugin (at least the error description you have posted indicates that).
Run eclipse with -console -noExit -consoleLog flags to open an OSGI console for debugging. After that try running ss <your-plugin-name> to see what the state of your plugin is.
The output gives you the ID of your plugin and the state it currently has. If the state of your plugin is not ACTIVE try running start <your-plugin-id> to see whether it starts correctly. If there is a problem starting your plugin you should get a respective log message. Feel free to post it here in case you need further help.
Otherwise there are plenty of options what might cause your problems, so maybe its better to try the steps I have described above before getting into details.
If you want to run eclipse plug-in withput using Eclipse Application , then you need to make a Feature project.
Now if your algorithm has something to do with system Path , you must
check Unpack plug-in and you should read the resource accordingly.
Like PLatformUI.getWorkBC() etc..
No other eclipse plug-in (jar) should be inside plugins directory of eclipse of same name of your plug-in. Ensure for this.

GWT compiler doesn't notice changes in code

I use the GWT plugin for eclipse on a project, that's imported from maven. For some reason changes within my code aren't considered while compiling my web application. If I start the preview mode within eclipse, the changes are shown, but when I compile the application via console: mvn clean gae:run -DskipTests(this is the only way I can run my application, since the GWT Development Mode does't work - see this thread ), I still get some older version of my web application, which doesn't contain my changes. I already cleared my browser's cache and rebuild my eclipse project, but still no effect.
Does anyone know how to get the compiler to consider my changes?

GWT context.xml in shell mode

I'm trying to get the GWTShell mode to load my context.xml file in which my database is described.
The only usable info can be found here, but this doesn't seem to work for the context.xml part.
I'm using Eclipse with Cypal Studio (previously called Googlipse).
If there is any other better plugin for Eclipse please recommend it.
As the Shell mode uses a Tomcat instance, which is the same target server we are using in the final deployment, it should be possible to achieve (or fake) a similar behaviour.
As of version 1.4, I have been running all my server side code, in my container of choice (Glassfish) and hooking up the GWTShell to that. Are you using Netbeans, Eclipse or something else? The Netbeans plugin gwt4nb does this for you out of the box, you just have to start your web project in debug mode. I'm sure the GWT plugin for Eclipse does the same thing.
I realise this doesn't directly answer your question -> but my question is, is there a reason you're trying to get GWT to pick up your database settings and not just running your project as normal instead. I find this much better and robust way of running the GWTShell.
Edit: Sorry I don't really use Eclipse, so I can't help you with plugins for it. I find Netbeans far superior for J2EE/web type projects. It's a bit slower, but far more functional. The plugin for that is called 'GWT4NB', it's free and it will set up your ant script in such a way that you just have to right-click on your web project and choose debug. I can understand if you don't want to switch IDEs though.

Categories