1. SMTP
JavaMail has no stmp server self.
1) embedded SMTP server:
It might have the spammer reject issue. like 550 5.7.1
usually it should have the public IP and dns, so that Gmail or other big Mail server can trust this embedded smtp server.
good article:
http://www.oracle.com/technetwork/java/faq-135477.html#smtpauth
http://www.coderanch.com/t/434948/open-source/Aspirin-Cannot-Send-Mails
http://www.coderanch.com/t/435963/java/java/Help-Asprin-set-up-local
http://www.chilkatsoft.com/faq/smtp550.html
http://www.eudora.com/techsupport/kb/1593hq.html
Relay - 中继
Spammer - 垃圾邮件发送者
2) log4j also supports email appender as log destination
but currently it doesn't support SSL email server like gmail.
Have to write GmailAppender by self to extend SMTP Appender
3) Asprin as an embedded SMTP server is not stable enough when sending to multipe recipients. Prove again that multipe threads coding is headache.
2. Jar file
- remeber to keep two spaces as splitor for each jar file name.
- can define main class and classpath in manifest.txt
used by Jar command. like:
Jar cvfm myJar.jar Manifest.txt .
good article:
http://forums.sun.com/thread.jspa?threadID=364938
http://hi.baidu.com/hdwt/blog/item/5f99b8c60bd1831c9d163dd9.html
http://nssaiqq.blogbus.com/logs/32078188.html
http://download.oracle.com/javase/tutorial/deployment/jar/appman.html
3. Java Generic
Generic Type cannot be initilized like new() or classforName()
solution: use reflection.
article:
http://www.iteye.com/topic/113447
My first Generic code.
//ServiceFactory.java
import java.util.EnumMap;
enum ServiceType {
UserService,
LoginService
};
public class ServiceFactory {
private static EnumMap<ServiceType, Object>
servicePool = new EnumMap<ServiceType, Object>(ServiceType.class);
public static <T> T getService(Class<T> asyncService, Class service, ServiceType key) {
@SuppressWarnings("unchecked")
T aService = (T) servicePool.get(key);
if (aService == null) {
aService = GWT.create(service);
servicePool.put(key, aService);
}
return aService;
}
public static void main(String args[]) {
ILoginServiceAsync service = ServiceFactory.getService(
ILoginServiceAsync.class, ILoginService.class, ServiceType.LoginService);
}
}
However, this class can only run under Hosted Mode, not runtime mode. because GWT.create() can only work with liberal class - the argument cannot be a var. Terrible!
article:
http://code.google.com/p/google-web-toolkit/issues/detail?id=1045
But GWT.create() still can dynamically load class in client side. The com.google.core.ext.Generator plays the important part.
GWT Dynamic loading using GWT.create() with String literals instead of Class literals
http://stackoverflow.com/questions/451658/gwt-dynamic-loading-using-gwt-create-with-string-literals-instead-of-class-lite
A Simple GWT Generator Example
http://francisshanahan.com/index.php/2010/a-simple-gwt-generator-example/
4. GWT limit
Gwt doesn't support reflection, serialization, multiple threads, classloading, Util.RegExp etc.
why? because they will be compile to Javascript. JavaScript doesn't support them. that's all.
good articles about reflection in GWT:
http://chenjumin.iteye.com/blog/723991
http://wenku.baidu.com/view/abbab84e852458fb770b566b.html
Solution: GWT ENT
http://code.google.com/p/gwt-ent/
分享到:
相关推荐
标题中的"gwt + gxt jar包"指的是GWT和GXT库的Java Archive(JAR)文件集合。这些JAR文件包含了运行GWT和GXT项目所需的类库和资源,使得开发者可以在Java环境中进行开发,而无需直接处理JavaScript代码。 GWT的核心...
GWT-JAR文件通常包含了GWT库的各种组件、API和其他必要的资源,使得开发者能够利用Java语言来编写前端Web应用。 在深入探讨GWT之前,我们需要了解Java语言和JavaScript之间的关系。GWT的核心理念是通过Java编译器将...
Java GWT 开发初级教程 标题解释 本文的标题是 "Java GWT 开发",它旨在教授初级开发者如何使用 Google Web Toolkit(GWT)来开发基于 Java 的 Ajax 应用程序。GWT 是一种免费的开发工具包,由 Google 公司于 2006 ...
**Google Web Toolkit (GWT)** 是由Google推出的一款开源的Java开发框架,主要用于构建高度交互式的Web应用程序,特别是那些类似Google Maps和Gmail这样的AJAX应用。GWT的设计灵感来源于Java AWT包的设计理念,包括...
游戏花园,用于托管用 Java 编写的...client/src/main/java/com/threerings/gardens/GardensClient.gwt.xml client/src/main/java/com/threerings/gardens/client/ClientContext.java client/src/main/java/com/threer
src/main/java/flashbang.gwt.xml src/main/java/flashbang/AppMode.java src/main/java/flashbang/Flashbang.java src/main/java/flashbang/FlashbangApp.java src/main/java/flashbang/GameObject.java src/main/...
**GWT(Google Web Toolkit)开发环境JAVA** Google Web Toolkit(GWT)是一个开放源代码的Java框架,它允许开发者使用Java语言来编写富互联网应用程序(Rich Internet Applications,RIA),并将其编译成优化的...
标题中的“build,gwt,java”涉及到三个关键概念,分别是构建工具(Build)、Google Web Toolkit(GWT)以及Java编程语言。这三个元素在IT领域中都有其独特的地位和应用场景。 1. **构建工具(Build Tools)**: ...
GWT是一个由Google开发的开放源代码框架,允许Java开发者使用Java语言编写客户端Web应用程序,然后自动编译成优化过的JavaScript代码。 GWT-Ext库扩展了GWT的基本功能,引入了一系列与Ext JS类似的组件,如表格、树...
Java和GWT(Google Web Toolkit)是Web应用开发中的两个重要技术。Java是一种广泛使用的面向对象的编程语言,而GWT则是一个开放源码的工具,允许开发者使用Java语言来构建高性能、跨浏览器的富互联网应用程序(Rich ...
gwt2.7 jar包 google web toolkit gwtbootstrap3 gxt核心包
Online TGA Canvas Demo page is http://npe-net.appspot.com/npesdk/gwt/tgaimagedemo/index.html Online TGA WebGL Texture Demo page is http://npe-net.appspot.com/npesdk/gwt/tgawebgldemo/index.html ...
适用版本:gwt 4.3/5.1/5.2/6.0(6.0.4之后版本不需使用此工具) 使用方法: 1.将解压后的两个文件datarepair.bat和myisamchk.exe拷贝到服务器的安装目录data下,如C:\Program Files\RealFriend\Rap Server\data ...
GWT(Google Web Toolkit)是一个开源的Java开发框架,它允许开发者使用Java语言来编写客户端的Web应用程序。GWT-Servlet是GWT框架的一部分,主要负责处理服务器端的交互。`gwt-servlet-2.3.0.jar`是GWT 2.3.0版本的...
标题 "gwt java ajax programming source code" 暗示了这个压缩包可能包含与Google Web Toolkit (GWT)、Java和Ajax编程相关的源代码。GWT是一个开源的开发框架,它允许开发者使用Java语言来编写客户端的Web应用程序...
SmartGwt 4.0 的开发jar包,希望对大家有帮助,有额外需要的可以联系我
gwt-user.jar 大小:2.86 MB
gwt文件上传中用到的jar包,其中下载也用到该jar包。
gwt-servlet.jar 最新版,由于文件太大、不可以上传、有需要可以留言、整包分享给你、