How to get JETTY_BASE to work with Eclipse GWT project - eclipse

I have a google web tool project that uses
serverHome = System.getProperty("jetty.base");
to build a file path. When I run this in Eclipse GWT Development mode, this is returning null which is breaking the file paths for the rest of my application. Is there any way to assign jetty.base or JETTY_BASE to my Google Web Tools project?

Related

How to bootstrap UI5 resources without CDN in Eclipse?

I'm doing a walkthrough for SAPUI5.
The code src="/resources/sap-ui-core.js" doesn't work, because I can't find this directory in my project.
When using a CDN URL, it works fine. But I don't want to use CDN for my application.
So how can I get and import the sap-ui-core.js file into my project so that it is saved on my computer locally?
I'm working with Eclipse btw. and installed the SAPUI5 Tools for Eclipse.
The SAPUI5-Plugin for eclipse includes the SAPUI5 library files.
If you start the App using "Run as..."->"Web App Preview" on your index.html, eclipse starts a jetty http server which serves the SAPUI5 library at /resources.
As long as you don't close the preview window in eclipse you can use any browser to debug your application at the url you find in that preview window.
Check that the dependencies are correct in your project, because the general dependency file such as sap.m may be missing in the project file.

Appengine endpoint client library creation in eclipse

I have a java based appengine endpoint project in eclipse.
When I generate client library using command line tool.
https://developers.google.com/appengine/docs/java/endpoints/endpoints_tool
I'm getting only source based jar file ('project_name_version'.java-1.18.0-rc-sources.jar). It does not work fine in Android Studio when I add as a Library.
How can I get class based jar client library (google-api-services-'project_name_verison'-1.18.0-rc.jar)?
I tried searching online but no luck yet.
You could always zip up the sources file and use them in Android Studio. However , note that in the build.gradle file, you will have to reference the other dependent JAR files + versions that will be needed by the sources that you have generated in Eclipse via the Generate Cloud Endpoint Library option.
Build your app engine back end with JRE 7. You can change this from windows->preferences->java->installed JREs. You'll find an Add button at the right side of the pane. For more detail refer this Tutorial
This will solve most of your problems.

NoClassDefFoundError on Google App Engine

I am developing a project on Eclipse Juno using both GWT and GAE.
My original project had all its packages and classes on the same project and it worked fine both on Development Mode and when uploaded to the Google App Engine on the Internet.
Then I created another project (on the same workspace) were I moved the classes that were generic so they could be used on other projects. I have not created a Jar file. Do I have to? I wish I could just keep my generic classes on another project without putting them on a jar file.
After a while I was able to create correct XXX.gwt.xml files on both projects and added the new project to the "Projects" tab of the main project properties (Project >> Properties >> Projects) to make the moved classes visible to the main project. The GWT compiler found those moved classes, translated them into Javascript code and the main project was able to execute them on the client side.
My problem is on the server side. No matter what I try the server part cannot find the moved classes and when trying to execute any of them it comes with the "NoClassDefFoundError" error when running on the Development Mode (I have not tried to upload to the Google App Engine on the Internet yet).
If I comment out all the references to those classes on the server side the error does not show up, but of course I don't have their functionality.
Gaston Ceron
Yes, you'll have to create a jar of the second project, and put it in the WEB-INF/lib folder.
If you can use maven or ant, you can probably set up appengine to compile the other project into a jar and use it as a dependency for the app engine project.

PlayN Maven Archetype and Running HTML5 in Eclipse

I generated a skeleton PlayN project from the playn-archetype and imported into Eclipse via m2e after verifying a successful build via
mvn clean package
After using the Google Plugin for Eclipse to successfully compile the html subproject, I then right click on the html subproject and perform a Run As -> Web Application.... Per the 'Getting Started' instructions on the PlayN wiki, I attempt to load the resulting Development Mode URL minus the ?gwt.codesvr=120.0.0.1:9997 suffix and am greeted with a dialog containing the following:
GWT module named 'project' may need to be (re)compiled.
I have verified that the <script> tag in my project.html is pointing to the appropriate javascript file (project/project.nocache.js), and I've verified that said javascript file exists and its contents browsed when navigating directly to it (i.e. http://127.0.0.1:8888/project/project.nocache.js).
The project works fine (albeit slowly) when the ?gwt.codesvr=120.0.0.1:9997 suffix is part of the URL (which is expected), and it also works fine when running mvn gae:run from the html subproject folder and browsing to http://127.0.0.1:8080/.
This is more of an annoyance than anything else, but I would at least like to know why it's happening and how to fix it :).
After you started the web application with "Run as... Web application" you need to recompile the project again (while the web application is running).
When you refresh your browser (be aware of the browser-cache) it should work.
This is a known issue is some older versions of PlayN.

AppEngine Java project in Eclipse - which jars to include?

I am building some small Java application to run on Goole AppEngine.
It is not clear to how should I configure eclipse so I'll be able to compile my project but I won't deploy stuff that already exists in on the platform.
(I've tried to read about the subject - here for example - but stil. it is not clear to me).
For example:
The Jersey and the Junit jars - I want them to be uploaded with my code to the cloud in the deployment process.
The AppEngine jars -I need them only for my design time - to be able to write code that is using the platform classes, but I don't want to upload them in the deployment process as they will be available to me by the platform.
Please help to get it right.
I think you need to read a bit from here Google Plugin for Eclipse
And also get the plugin from there, in addition , add the Jersy and the Junit (check first that the API's are on the WillItPlayInJava list) to the build path of the project
WillItPlayInJava