Re: [apidesign] Question for DEW

3 views
Skip to first unread message

Jaroslav Tulach

unread,
Aug 19, 2017, 5:06:30 AM8/19/17
to woogu...@gmail.com, bck2...@googlegroups.com
Hello Wooguil,
thanks for your interest in DEW and your nice words. I haven't touched the DEW project for a few years and I have to admit it is not in a good shape. I've just taken a look and tried to polish it a bit. You can update to new version, but the tests still don't fully run and there are other problems. It may take a while before I manage to fix that. Anyway:

dew$ mvn clean install -DskipTests

should give you

dew$ ls static-dew/target/static-dew-0.1-SNAPSHOT-bck2brwsr.zip
static-dew/target/static-dew-0.1-SNAPSHOT-bck2brwsr.zip

which may contain something to work on. If you interest persists, ping me in a week or so... maybe I have time to do more fixes.
-jt


2017-08-18 8:30 GMT+02:00 Wooguil Pak <woogu...@gmail.com>:
Hello, My name is Wooguil Pak.
At first, I should say "Thank you for your great work". It is really amazing.

Currently, I'm trying to run DEW from github, https://github.com/jtulach/dew.
But it seems that emul.zip is missing in bck2brwsr.js.
When I am trying, web console of browser says like that.
   Reading JARs is only possible with enum.zip(emul.zip??)  module
included: org.apidesign.bck2brwsr.vmzip.ZipResources
bck2brwsr.js:1332:37
   java.lang.ClassNotFoundException:
org.apidesign.bck2brwsr.vmzip.ZipResources  bck2brwsr.js:115028:14
   Cannot load static-dew-0.3-SNAPSHOT.jar -
java.io.IOException:java.lang.ClassNotFoundException:
org.apidesign.bck2brwsr.vmzip.ZipResources

Could you explain how to solve this problem and what should I do?
Although I compiled bck2brwsr obtained from github, I don't know how
to add emul.zip to bck2brwsr.

Thanks in advance.

Best Regards,
Wooguil

--
=========================================================
Wooguil Pak, Ph.D, Assistant Professor
Security and Wireless Network Lab. Dept. of Computer Engineering,
Shindang-Dong, Dalseo-Gu, Daegu, Keimyung Univ. 704-701, Korea
Office:+82-53-580-5229, Cell phone: +82-10-2753-1027
Fax: +82-53-580-6275, Email: woogu...@kmu.ac.kr
=========================================================

--
You received this message because you are subscribed to the Google Groups "apidesign" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apidesign+unsubscribe@googlegroups.com.
To post to this group, send email to apid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apidesign/CACQUmLFJZDPTyqt6PCgEH-Wc%2BB7YA8cZC3SEYMr0Ub3HFs4%3D2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Jaroslav Tulach

unread,
Aug 30, 2017, 1:17:18 AM8/30/17
to Wooguil Pak, bck2...@googlegroups.com
Hello Wooguil & others interested in Bck2Brwsr and DEW,
on Sunday I managed to bring the DEW repo into relatively usable state. I was able to compile and run simple examples (those that throw an exception in initializer, run for sure ;-). Feel free to give it another try:

https://github.com/jtulach/dew

Let me know what problems you find. I'll polish the state a bit more over next weekend.
-jt

Jaroslav Tulach

unread,
Sep 2, 2017, 1:50:37 AM9/2/17
to Wooguil Pak, bck2...@googlegroups.com
Hello again.

2017-08-31 11:07 GMT+02:00 Wooguil Pak <woogu...@gmail.com>:
Hello, Jaroslav Tulach.

I'm very happy to hear the good news from you.
However, I cannot still run any example in DEW because some errors are
generated during compiling. I attached the screenshot named test1.png.

Looking at test1.png, I'd say everything is good. Have you tried to click on the "Press me!" button? It works for me. If I go to

Reloading doesn't work properly yet, but the first run seems to be fine both on chrome and firefox.

I don't see your error message, but the reason for it is probably that the new version tries to invoke a main method. The old examples store the initial code is static initializers:

static {
  // do something
}

to avoid the main method problem it is possible to change that to

public static void main(String... args) {
  // do something
}

then the "main method not found" exception in console shall disappear.


I also tried to run a simple example in a html-java document.
I could compile but it failed when I press the button.
Please refer to the attached file, test2.png.


applyBindings() has private access in dew.demo.prime.PrimeUI 

This is caused by the fact that the GIST examples are made for too old version of HTML/Java API. The new versions (since 1.1) require one to provide targetId attribute to the @Model annotation (see http://bits.netbeans.org/html+java/1.4/net/java/html/json/Model.html#targetId()

As such one has to modify the PrimeUI examples as

@Model(className="PrimeUI", targetId="", properties={
  @Property(name="number", type=int.class),
})
class PrimeDemo {

then the compilation succeeds. However the code still doesn't execute properly. I'll take a look at it now.
 
I tested in ubuntu 16.04.1 using openjdk version "1.8.0_131".

Anyway, it was improved greatly and I really appreciate of your efforts.


Thanks. Your interest motivates me to get the system running.
-jt
Reply all
Reply to author
Forward
0 new messages