Zhou has posted 1 posts at DZone. View Full User Profile

Java2Script 2.0.0

12.08.2008
| 4316 views |
  • submit to reddit
Location: 
http://j2s.sourceforge.net/

Including SWT Desktop Feature and Providing Pipe APIs for Comet Connection

We are very pleased to announce that Java2Script 2.0.0 release is available now. Please visit http://j2s.sourceforge.net/ for updates. 
 
Comparing to previous 1.0.0 version, 2.0.0 has the following major features:

  1. Provide a new "SWT Desktop" for better window management with tray area, task bar and shortcut dashboard. 
  2. Provide Simple and Compound Pipe APIs to setup Comet connection back to server. 
  3. Supports Eclipse 3.4.* besides Eclipse 3.3.*.  
  4. Add Google Chrome Supports.

Besides the above new features, we have fixed lots of bugs in Java2Script compiler, Java core library and SWT library. Java2Script 2.0.0 is much more stable and it is ready for product. 
 
In Java2Script's primary showcase web IM services ( http://webuzz.im/ ), Compound Pipe technology is used to provide multiple IM sessions using only one connection, and Java2Script's new SWT Desktop provides familiar desktop user experience for users. And we add another Java2Script demo: an SWT Tetris game ( http://demo.java2script.org/tetris/ ). For more Java2Script showcases, please visit http://demo.java2script.org/
 
For comments and discussions, please visit http://groups.google.com/group/java2script/ or http://java2script.org/blog/
 
====================== 
 
More About Java2Script 
 
Java2Script (J2S) Pacemaker provides an Eclipse Java to JavaScript compiler plugin and an implementation of JavaScript version of Eclipse Standard Widget Toolkit (SWT) with other common utilities, such as java.lang.* and java.util.*. You can convert your SWT-base Rich Client Platform (RCP) into Rich Internet Application (RIA) by Java2Script Pacemaker. 
 
Appendix (Java2Script's Full Feature List) 
 
Java2Script Core 
—————- 
1. Object oriented JavaScript simulator is introduced 
2. JavaScript ClassLoader is built inside 
3. Eclipse JDT based Java to JavaScript compiler, support Java 1.4 and Java 5 
features, including generic, enums, static imports, enhanced loops 
4. Support incremental building for Java projects 
5. Support Hotspot JavaScript swapping for debugging 
6. Support most classes in java.lang.*, java.utils.* and others packages 
7. Support native JavaScript through @j2s* Javadoc in Java sources 
8. Support creating Java2Script projects by wizard, including Servlet project 
9. Support Eclipse 3.3.* and 3.4.*
10. Support IE6.0/7.0, Firefox, Safari, Chrome, Opera

Java2Script SWT 
————— 
1. Eclipse SWT 3.1 API is ported for JavaScript in modern browsers, Firefox, Internet Explorer, Opera, Safari, Chrome 
2. Desktop and window manager are built inside 
3. Support UI blocking fow SWT’s Shell and Dialog 
4. Support SWT deffered layout 
5. Support detecting font size change in Firefox 
 
Java2Script AJAX 
—————- 
1. HttpRequest/AJAX is introduced for both Java and JavaScript 
2. Simple RPC API is introduced to call back Java server, which supports Cross Site Scripting 
3. Simple and Compound Pipe API is introduced to setup Comet connection to server. 
4. Support dynamic class loading for both Java and JavaScript 
5. Support Java reflection (early implementation) 
 
Java2Script JUnit 
—————– 
1. Support JUnit tests both Test Case and Test Suite in text mode. 
 
Java2Script Example 
——————- 
1. Web IM services in Java2Script ( http://demo.java2script.org/
2. SWT Tetris Game ( http://demo.java2script.org/tetris/
3. SWT Control Examples ( http://demo.java2script.org/controls/ )

 

0
Average: 3 (1 vote)
Published at DZone with permission of its author, Zhou Renjian.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Mike P(Okidoky) replied on Mon, 2008/12/08 - 2:50pm

You write code in Java, translate to JavaScript. Similar to GWT. Java2Script translates Eclipse's SWT gui content instead. I found this:

http://www.theserverside.com/news/thread.tss?thread_id=52176

"5. Support Hotspot JavaScript swapping for debugging"

I'm after the live coding aspect. I can't see myself going through a traditional compile cycle when using a mega complex system like this. How "live" is coding with Java2Script?

Zhou Renjian replied on Mon, 2008/12/08 - 7:21pm in response to: Mike P(Okidoky)

Hi Mike,

To test the feature of "JavaScript swapping for debugging", you can write an SWT example, with a button, hooking a selection listener, for example, print some message. Try to DEBUG this button example. After testing the example, modify your listener's code, and click the button again to see whether the newly modified codes is compiled and loaded into browser or not.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.