One of the biggest concepts to get your mind around with GWT is that
while you develop everything in Java, in the end the GWT compiler
converts your Java into Javascript (mostly, but some CSS & HTML too).
So when you create a Java class called foo.java, what will result is
something like foo.js.  So if in foo.java, you use java.lang.String,
you think you're using the one in the standard Java JRE.  But you're
not.  What GWT has is a large set of JRE emulated classes, written in
Javascript.  So the compiler knows how to convert java.lang.String
into something appropriate to run in a browser.

So in foo.java, you do what every good Java developer does and import
something like javax.mail.Message and so on, and crank out some
beautiful code.  And you then ask the GWT compiler to convert that
into Javascript....and it can't.  It has no idea how to do javax.mail
type of things in a web browser....mostly because it can't.  The
browser is a heavily constrained runtime environment and things like
filesystem access, port/packet operations (which I believe javamail
does down in the bowels), data access, and whole bunch of other Java
stuff can't be done in Javascript, in a web browser and therefore GWT
can't do them on client.

The only way to achieve this is to build a GWT client that
communicates with a GWT server (preferably with GWT-RPC, but that's
your call) where you can run full fledged Java and are not bound by
the issues inside a web browser.  I write this a lot, but it's worth
mentioning again:  this is not a limitation per se of GWT...all web
browser based clients that run natively in Javascript are bound by the
same security rules.  Plugins like Flash, Silverlight and Java Applets
are outside of this control umbrella.  The amount of Java that is
emulated in Javascript by the GWT compiler is staggering, but not
infinite...

Hope this helps.

Later,

Shaffer


On Jun 4, 11:57 am, samounas <[email protected]> wrote:
> Please can you tell me how to use javaMail in gwt application.
> Because when i insert the code related to the mailing in my
> application. I find these errors when i wanted to compile my code:
>
> [ERROR] Errors in 'file:/D:/workspace/ilemERP/osi/osi-client/src/main/
> java/ch/ilem/erp/osi/client/panel/cust/OsiReqNewPanel.java'
>          [ERROR] Line 985: No source code is available for type
> java.util.Properties; did you forget to inherit a required module?
>          [ERROR] Line 986: No source code is available for type
> com.framework.genie.utilities.Utilities; did you forget to inherit a
> required module?
>          [ERROR] Line 995: No source code is available for type
> javax.mail.Session; did you forget to inherit a required module?
>          [ERROR] Line 998: No source code is available for type
> javax.mail.Message; did you forget to inherit a required module?
>          [ERROR] Line 998: No source code is available for type
> javax.mail.internet.MimeMessage; did you forget to inherit a required
> module?
>          [ERROR] Line 1001: No source code is available for type
> javax.mail.internet.InternetAddress; did you forget to inherit a
> required module?
>          [ERROR] Line 1002: No source code is available for type
> javax.mail.Message.RecipientType; did you forget to inherit a required
> module?
>          [ERROR] Line 1005: No source code is available for type
> javax.mail.internet.MimeUtility; did you forget to inherit a required
> module?
>          [ERROR] Line 1029: No source code is available for type
> javax.mail.Transport; did you forget to inherit a required module?
>          [ERROR] Line 1031: No source code is available for type
> com.framework.genie.log.LoggerFactory; did you forget to inherit a
> required module?
>    Finding entry point classes
>       [ERROR] Unable to find type 'ch.ilem.erp.osi.client.IlemErpOsi'
>          [ERROR] Hint: Previous compiler errors may have made this
> type unavailable
>          [ERROR] Hint: Check the inheritance chain from your module;
> it may not be inheriting a required module or a module may not be
> adding its source path entries properly
>
> So how can i resolve this problem?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to