Replace a gwt generated jar with a newer version - gwt

I've developed a GWT+GXT based web application. Recently we run into an issue that I was able to fix easily.
However when I generate the jar file from the tag, including the backport of the fix, even though I replace the old jar with the new one the fix has no effect.
On the other end if I generate the whole WAR everything works fine, but because of the size of it i'd rather like to be able to provide the patch as a jar file.
Am I missing something?
Thank you in advance

The jar file only contains Java sources and compiled Java - when you compile GWT, that produces JavaScript. This is what the war file contains, in addition to all of the other contents. In order to properly update your application, you need to update the compiled JavaScript.
The easiest way to do this, as you've noticed, is to replace the entire war file. If you want to keep the changes to a minimum, you could try just replacing the compiled JS directory and the jar file, but you'll want to be careful that you get the right directory - and all of the contents.

Related

Prevent Eclipse (RAD) from generating code automaticly

I am working on a project, I have imported a jar file with the class files needed to connect to a web service, then added the wsdl to my project. The problem now is eclipse(rad) is generating java files, that I don't need and causing issues as the object already exist in the jar file. How to I prevent Eclipse(RAD) from auto generating java files from the wsdl, as I have wasted 2 days trying to force Eclipse(RAD) from generating these files, as they are unneeded and causing compile problems.
This is the solution I came up with. The issue is that it is not Maven causing this, this is Eclipse(RAD) my objects were in a package such as com.thispackage.servicename.v2 (upgrading from v1 to v2) but the name space in the wsdl was http://servicename.thispackage.com/v2 . as Mavin is not running the wsdl2java, there is no problem, I changed the name space to http://v2.servicename.thispackage.com When Eclipse compiles the wsdl2java fails as the objects already exist in a jar file (so it can not overwrite them) But Eclipse(RAD) will continue on with the compilation and deployment to local server. I just have to click OK to acknowledge the error but everything works as intended.
Not a great solution, and I will have to document it in the README.md (or find a real solution later) but this lets me do the real work I need to do, before I deal with this detail.

JCodec: FrameGrab8Bit.class not included in JAR download - how do I add it?

I just downloaded the latest version of JCodec: JCodec-0.1.9. However, I noticed the manifest doesn't include FrameGrab8Bit.class. As Picture has been deprecated and supplanted by Picture8Bit it would be nice, and almost necessary, to have access to the methods of FrameGrab8Bit. As the file is not included in the JAR, I was wondering how I could easily add the mising file to the JAR (I'm using Windows 10), or if there is another way I could add the file to the project.

Fail to create custom UI component in ZK framework

Trying to create custom UI component going through ZK 6.0.1 Component Development Essentials.
Always got error in logs "http://localhost:8080/zk6/zkau/web/_zv2011051111/js/examples.com.foo.wpd : HTTP Status 404 - /js/examples.com.foo.wpd" when trying to use custom component.
Found the war file with this example in scala, it works OK. I have copied all files from it to my project, and got same error.
The project structure is according to tutorial. What might be wrong?
You have to put the web folder, which contains the js files, in the java classpath, that means it should be put under the src folder. More easy way is to use the ZK Maven Archetype to create the template for you.
At least the way IntelliJ IDEA does things (which I see your are using, as am I), simply placing the web folder under the src folder doesn't seem to automatically get it copied to the artifact (although I'm not sure why). So I tried manually putting it in the WEB-INF/classes folder, and that worked. So the correct path for your example is <project-root>/web/WEB-INF/classes/web/js/examples/com/foo/zk.wpd.

How to set reference to the folder which contains multiple jar files?

My environment:
Netbean 6.9.1
Glassfish 3.0.1
Windows 7
Goal:
When my coworkers opens the Netbean Project, the library is already referenced without them manually create library, adding jars into it and reference it.
Detail:
I created Netbean project and the project has reference to few jar files in the folder.
Currently whoever opens the project for the first time, they have to manually create library and refer it to the project.
My project location:
C:\Users\masatosan\Desktop\myProject\myApp
My library location:
C:\Users\masatosan\Desktop\myProject\lib\myLib
The myLib folder contains:
some1.jar
some2.jar
some3.jar
I can achieve my goal if I create reference to individual jar file by defining to project.properties file like below: (creating reference to sqljdbc4.jar)
file.reference.sqljdbc4.jar=../lib/sqljdbc4.jar
javac.classpath=\
${libs.restlib_gfv3ee6.classpath}:\
${file.reference.sqljdbc4.jar}:
But my case is different since I have 3 jars in the myLib folder and wanting to reference them all.
Is it possible to reference all jars in myLib folder?
Please let me know if you need more clarification.
I'm sorry, but it doesn't work that way. When you create a project, you have to add the jar files individually.
However, if you put your lib folder under your project, netbeans will refer to them via relative paths. Then when you share the project (lib directory included), netbeans will be able to automatically find the jar files when the next person uses the project. That way you only have to add jar files once.
Short of using a dependency management tool like maven (which Netbeans has good support for), this is really the best solution. It uses a bit more disk space (obviously), but that's never been a huge issue for me.
I figured how so let me share.
Tool --> Library then library window pop up.
Create library called "MyLib" which contains multiple jars.
Add "MyLib" to your project. This change will be written to project.properties file under nbproject folder.
project.properties file indicates the classpath of lib reference you just added.
It should look like something below
javac.classpath=\
${libs.Excella.classpath}:\
${libs.MyLib.classpath}
Now someone else opens the project from different machine and she just needs to do step#1 and #2, which is to create library with same library name i.e. "MyLib"
I think this is what Bill was saying originally but thought it would be helpful to give step by step instructions since I finally figured .... after long time :D

Difference between adding library and .jar file in NetBeans?

I have a .jar file of LWUIT, and it's also in there in the NetBeans library.
When I add it as a .jar file my programs run good and when I add it as a library my output is not shown correctly. What's wrong with this?
When added as a library, LWUIT is only available for your application to compile against. I assume LWUIT is not already installed on whatever J2ME-enabled device/emulator you want to run your application.
When added to your application JAR file, LWUIT is also available for your application to run against. Your application JAR file is presumably significantly larger then.