Java Compiler API Status?

Does anyone know what the current status of JSR 199: Java Compiler API is?
(http://www.jcp.org/en/jsr/detail?id=199)
To me it seems the inclusion in JDK 1.5 was silently dropped. I have not found the smallest bit of information, though.

JSR199 is in suspended animation. For Tiger, we're
merely documenting the com.sun.tools.javac.Main entry
point.Hi,
where could this documentation be found?
Regards
Richard

Similar Messages

  • Stress out Java Compiler API

    any1 know how to display the error message when the compilation is not done??
    the compiltion process is ok, but, if the compilation isnt done, there will be no error messages..
              JavaCompiler JCompile=ToolProvider.getSystemJavaCompiler();
              StandardJavaFileManager sjfm=JCompile.getStandardFileManager(null,null,null);
              Iterable FileObject=sjfm.getJavaFileObjects(TheFile);
              JCompile.getTask(null,sjfm,null,null,null,FileObject).call();cant seems to understand the api for that, can any1 help me??

    getTask() takes a DiagnisticListener argument.
    Or collect the messages in a list with a DiagnosticCollector. There's an example near the start of the JavaCompiler API docs http://java.sun.com/javase/6/docs/api/javax/tools/JavaCompiler.html

  • Is there any Java Mail API to get the delivery mail status

    My requirement is to capture the delivery mail status that is being sent via my application. Is there any Java Mail API or any other way to do this.Kindly guide

    Yes, you can use the [UTL_HTTP Package|http://www.oracle.com/pls/db102/to_URL?remark=ranked&urlname=http:%2F%2Fdownload.oracle.com%2Fdocs%2Fcd%2FB19306_01%2Fappdev.102%2Fb14261%2Fpackages.htm%23sthref1930]

  • Java compile error for removed API

    Hi,
    What are the Java compile errors for API that has been removed?
    As I understand it, API elements are deprecated and not removed from the API immediately, but will be removed in future releases or after so many years.
    When Java code is compliled in a higher Java version, and the API has finally been removed - what are the errors that will be ouput in the log?
    Thank you for your time.

    WalterLaan wrote:
    And if you recompile one with a method removed that the other use and then run the other you would get a NoSuchMethodError (or more generally just an error sub class of LinkageError).
    Not that you should be catching those unless you accept classes from the user (as plugins).Presumably you mean he should not be catching them?
    @OP: In general, you should not catch unchecked exceptions. These are RuntimeException, Error, and their descendants. There are exceptions, such as at "layer boundaries," or when you don't want errors in one module/application/plugin/etc. to affect or prevent processing in others.

  • [DeployDecisionServices] Failed at Java Compilation

    Hello,
    i'm facing a problem when trying to deploy a decision service within a BPEL process. I have created some xml facts and rules with rule author. Everythings works fine also the compilation of jaxb classes and syntax check of RL output.
    When using the rule repository in a BPEL process by creating a decision service and a decide activity the deployment stops during the compilation of the jaxb classes. As mentioned the compilation of jaxb classes on cmd works fine an it seems that the compilation during the deployment works fine as well as all .class files are beeing created in PROJECT_HOME%decisionservices\DecisionService\war\WEB-INF\classes. Nevertheless deployment stops at this point and I can't get my decision service deployed.
    Any help is much appreciated !
    The ant output:
    | Deploying decision services for ruleTest on localhost, port 8888
    [deployDecisionServices] Start of deploying decision services.
    [deployDecisionServices] Deploy decision service in directory C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService
    [deployDecisionServices] Start deploying decision service from directory C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService to J2EE context /rules/test/ruleTest/1.0/DecisionService
    [deployDecisionServices] Replace placeholders in file C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\wsdl\DecisionService.wsdl
    [deployDecisionServices] Replace placeholders in file C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\wsdl\DecisionService.wsdl done.
    [deployDecisionServices] Replace placeholders in file C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\public_html\GetDecisionServiceInfo.jsp
    [deployDecisionServices] Replace placeholders in file C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\public_html\GetDecisionServiceInfo.jsp done.
    [deployDecisionServices] Start compiling fact type classes in directory C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes
    [deployDecisionServices] Compiling from shell, src=C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes, classpath=C:\product\JDev\jdev\lib\ojc.jar;C:\product\JDev\ant\lib\ant-oracle.jar;C:\product\JDev\integration\lib\orabpel.jar;C:\product\JDev\integration\lib\orabpel-ant.jar;C:\product\JDev\integration\lib\orabpel-common.jar;C:\product\JDev\integration\lib\orabpel-thirdparty.jar;C:\product\JDev\webservices\lib\orawsdl.jar;C:\product\JDev\lib\xmlparserv2.jar;C:\product\JDev\lib\xml.jar;C:\product\JDev\j2ee\home\lib\oc4j-internal.jar;C:\product\JDev\j2ee\home\lib\adminclient.jar;C:\product\JDev\integration\bpm\support\files;C:\product\JDev\jdev\lib\jdev.jar;C:\product\JDev\ant\lib\xml-apis.jar;C:\product\JDev\ant\lib\xercesImpl.jar;C:\product\JDev\ant\lib\jakarta-oro-2.0.8.jar;C:\product\JDev\ant\lib\commons-net-1.3.0.jar;C:\product\JDev\ant\lib\ant.jar;C:\product\JDev\ant\lib\ant-xslp.jar;C:\product\JDev\ant\lib\ant-xalan1.jar;C:\product\JDev\ant\lib\ant-weblogic.jar;C:\product\JDev\ant\lib\ant-vaj.jar;C:\product\JDev\ant\lib\ant-trax.jar;C:\product\JDev\ant\lib\ant-swing.jar;C:\product\JDev\ant\lib\ant-stylebook.jar;C:\product\JDev\ant\lib\ant-starteam.jar;C:\product\JDev\ant\lib\ant-oracle-adfp.jar;C:\product\JDev\ant\lib\ant-nodeps.jar;C:\product\JDev\ant\lib\ant-netrexx.jar;C:\product\JDev\ant\lib\ant-launcher.jar;C:\product\JDev\ant\lib\ant-junit.jar;C:\product\JDev\ant\lib\ant-jsch.jar;C:\product\JDev\ant\lib\ant-jmf.jar;C:\product\JDev\ant\lib\ant-jdepend.jar;C:\product\JDev\ant\lib\ant-javamail.jar;C:\product\JDev\ant\lib\ant-jai.jar;C:\product\JDev\ant\lib\ant-icontract.jar;C:\product\JDev\ant\lib\ant-commons-net.jar;C:\product\JDev\ant\lib\ant-commons-logging.jar;C:\product\JDev\ant\lib\ant-apache-resolver.jar;C:\product\JDev\ant\lib\ant-apache-regexp.jar;C:\product\JDev\ant\lib\ant-apache-oro.jar;C:\product\JDev\ant\lib\ant-apache-log4j.jar;C:\product\JDev\ant\lib\ant-apache-bsf.jar;C:\product\JDev\ant\lib\ant-apache-bcel.jar;C:\product\JDev\ant\lib\ant-antlr.jar;C:\product\JDev\jdk\lib\tools.jar
    [deployDecisionServices] Source file exists. Read Java source file names.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequest.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestImpl.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestType.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestTypeImpl.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponse.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseImpl.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseType.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseTypeImpl.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/ObjectFactory.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/ObjectFactory.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/Zustaendig.java to the list of Java sources to compile.
    [deployDecisionServices] Adding C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/ZustaendigImpl.java to the list of Java sources to compile.
    [deployDecisionServices] Compiled class(es) "C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequest.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestType.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestTypeImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponse.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseType.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseTypeImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/ObjectFactory.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/ObjectFactory.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/Zustaendig.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/ZustaendigImpl.java"
    [deployDecisionServices] Error in ant execution: Java compilation failed.
    Failed to compile file(s) "C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequest.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestType.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestTypeImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponse.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseType.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseTypeImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/ObjectFactory.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/ObjectFactory.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/Zustaendig.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/ZustaendigImpl.java".
    Exception reported is: C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU\GeburtsurkundeProcessRequestTypeImpl.java:39: Class GU.AntragstellerType not found.
    return (AntragstellerType) super.getElement("Antragsteller", "http://xmlns.oracle.com/Geburtsurkunde", (oracle.xml.jaxb.JaxbNode)obj, 0);
    ^
    C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU\GeburtsurkundeProcessRequestTypeImpl.java:50: Class GU.AnschriftType not found.
    return (AnschriftType) super.getElement("Anschrift", "http://xmlns.oracle.com/Geburtsurkunde", (oracle.xml.jaxb.JaxbNode)obj, 1);
    ^
    C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU\GeburtsurkundeProcessRequestTypeImpl.java:61: Class GU.BankverbindungType not found.
    return (BankverbindungType) super.getElement("Bankverbindung", "http://xmlns.oracle.com/Geburtsurkunde", (oracle.xml.jaxb.JaxbNode)obj, 2);
    ^
    3 errors
    Please verify that file C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequest.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestType.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessRequestTypeImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponse.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseType.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/GeburtsurkundeProcessResponseTypeImpl.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\GU/ObjectFactory.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/ObjectFactory.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/Zustaendig.java, C:\product\JDev\jdev\mywork\Buergerservice\ruleTest\decisionservices\DecisionService\war\WEB-INF\classes\ZS/ZustaendigImpl.java is valid java file or if all required libraries are included in your classpath.
    classpath: C:\product\JDev\jdev\lib\ojc.jar;C:\product\JDev\ant\lib\ant-oracle.jar;C:\product\JDev\integration\lib\orabpel.jar;C:\product\JDev\integration\lib\orabpel-ant.jar;C:\product\JDev\integration\lib\orabpel-common.jar;C:\product\JDev\integration\lib\orabpel-thirdparty.jar;C:\product\JDev\webservices\lib\orawsdl.jar;C:\product\JDev\lib\xmlparserv2.jar;C:\product\JDev\lib\xml.jar;C:\product\JDev\j2ee\home\lib\oc4j-internal.jar;C:\product\JDev\j2ee\home\lib\adminclient.jar;C:\product\JDev\integration\bpm\support\files;C:\product\JDev\jdev\lib\jdev.jar;C:\product\JDev\ant\lib\xml-apis.jar;C:\product\JDev\ant\lib\xercesImpl.jar;C:\product\JDev\ant\lib\jakarta-oro-2.0.8.jar;C:\product\JDev\ant\lib\commons-net-1.3.0.jar;C:\product\JDev\ant\lib\ant.jar;C:\product\JDev\ant\lib\ant-xslp.jar;C:\product\JDev\ant\lib\ant-xalan1.jar;C:\product\JDev\ant\lib\ant-weblogic.jar;C:\product\JDev\ant\lib\ant-vaj.jar;C:\product\JDev\ant\lib\ant-trax.jar;C:\product\JDev\ant\lib\ant-swing.jar;C:\product\JDev\ant\lib\ant-stylebook.jar;C:\product\JDev\ant\lib\ant-starteam.jar;C:\product\JDev\ant\lib\ant-oracle-adfp.jar;C:\product\JDev\ant\lib\ant-nodeps.jar;C:\product\JDev\ant\lib\ant-netrexx.jar;C:\product\JDev\ant\lib\ant-launcher.jar;C:\product\JDev\ant\lib\ant-junit.jar;C:\product\JDev\ant\lib\ant-jsch.jar;C:\product\JDev\ant\lib\ant-jmf.jar;C:\product\JDev\ant\lib\ant-jdepend.jar;C:\product\JDev\ant\lib\ant-javamail.jar;C:\product\JDev\ant\lib\ant-jai.jar;C:\product\JDev\ant\lib\ant-icontract.jar;C:\product\JDev\ant\lib\ant-commons-net.jar;C:\product\JDev\ant\lib\ant-commons-logging.jar;C:\product\JDev\ant\lib\ant-apache-resolver.jar;C:\product\JDev\ant\lib\ant-apache-regexp.jar;C:\product\JDev\ant\lib\ant-apache-oro.jar;C:\product\JDev\ant\lib\ant-apache-log4j.jar;C:\product\JDev\ant\lib\ant-apache-bsf.jar;C:\product\JDev\ant\lib\ant-apache-bcel.jar;C:\product\JDev\ant\lib\ant-antlr.jar;C:\product\JDev\jdk\lib\tools.jar

    Hi Everyone,
    I've resolved the error. It was the fact that I was pointing to the wrong rmi port. I found out by typing out the "opmnctl status -l" on the command line and realised that my rmi port was 12401 instead of 23791. Hence, under the "deployDecisionServices" namespace in the build.xml file, I modified it from "rmiport="${rmiport}" to "rmiport="12401"" and deploy it and everything works. Thank you everyone for your time and efforts.
    Regards,
    John

  • Java Communications API and Java SDK 1.4.2

    I just installed the Java Communications API 2.0 on my Windows XP system, with JDK 1.4.2. As per the install instructions, I copied files from the zip into my /lib and /bin directories and set the classpath. However, when I attempt to compile any of the samples, the compiler displays a large number of errors. I know the API documentation only references JDK1.2 -- are there any special tricks to installing on newer JDKs, or will I need to acquire an older JDK to develop?

    My path variable is still not being set! Here is the content of my autoexec.bat located on the root directory of C:\
    rem - By Groove Setup
    PATH=%PATH%;"C:\Program Files\Groove Networks\Groove\Bin"
    PATH=%PATH%;C:\PROGRAM FILES\J2SDK1.4.2_07\BIN
    /code]
    When I type 'path' at the MSDOS C:\ prompt, I receive the following in the get the following:C:\WINDOWS;C:\WINDOWS\COMMAND;\C:\PROGRAM FILES\GROOVE NETWORKS\GROOVE\BIN
    As an aside, I noticed that when I perform a search of the my hard drive (c:\), I find two autoexec.bat files. One at the root, and the other in C:\Windows\Command\EBD.
    I believe the instructions stated to modify the autoexec.bat at the root directory.
    TIA for any assistance. This is really becoming a nusance and taking up quite a bit of my time trying to resolve this problem.

  • Help reg the Demos of Java 3D API

    Hi,
    I am new to the field of 3D programming. I just started by installing the Java3d1.2 FCS Linux on my system and I have already Java 1.2 installed. I am working on Linux environment. After installing the API I tried running the HelloUniverse demo. I get the following error.
    Xlib: Extension "GLX" missing on display ":0.0"
    Xlib: Extension "GLX" missing on display ":0.0"
    Xlib: Extension "GLX" missing on display ":0.0"
    Xlib: Extension "GLX" missing on display ":0.0"
    Xlib: Extension "GLX" missing on display ":0.0"
    Xlib: Extension "GLX" missing on display ":0.0"
    Xlib: Extension "GLX" missing on display ":0.0"
    Xlib: Extension "GLX" missing on display ":0.0"
    Exception in thread main java.lang.NullPointerException at HelloUniverse.main(HelloUniverse.java,Compiled Code).
    And when I run these demos by clicking on the Links on the index.html page,
    The applet is not started.
    Please let me know what to do to get things working.
    Thank you in advance.
    Vamshi

    it seem it the configuration of Xfree or mesa which is wrong do you have installed particular driver like NIVDIA DRIVER
    what kind of linux do you have (debian,mandrake,red hat,slackware,gentoo,LFS...)
    cyril

  • Error in Java compilation: \s7u.log (The system cannot find the file specified)

    Hi there,
    I got an error when I tried to compile a group of sqlj and java files. The error below:
    ----------------------------------------------sqlj -status -passes -compile=true -ser2class -d=. -classpath=.;%CLASSPATH% E:\work\src\java\com\interadnet\persistence\*.sqlj E:\work\src\java\com\interadnet\persistence\*.java
    out [Translating 53 files]
    out [Reading file AdServerInformationType]
    out [Reading file AdsType]
    out [Reading file AgencyType]
    out [Reading file CampaigntocompletionType]
    out [Reading file CampaignType]
    out [Reading file ChannelType]
    out [Reading file ClientType]
    out [Reading file CompletionType]
    out [Reading file ContactType]
    out [Reading file CreativeType]
    out [Reading file FtpServerType]
    out [Reading file InsertioninstructionType]
    out [Reading file MediaServerType]
    out [Reading file SystemPropertyType]
    out [Reading file VendorType]
    out [Reading file AdServerInformationTypeRef]
    out [Reading file AdServerInformationView]
    out [Reading file AdsTypeRef]
    out [Reading file AdsView]
    out [Reading file AgencyTypeRef]
    out [Reading file AgencyView]
    out [Reading file CampaigntocompletionTypeRef]
    out [Reading file CampaignToCompletionView]
    out [Reading file CampaignTypeRef]
    out [Reading file CampaignTypeRefs]
    out [Reading file CampaignView]
    out [Reading file ChannelTypeRef]
    out [Reading file ChannelTypeRefs]
    out [Reading file ChannelView]
    out [Reading file ClientTypeRef]
    out [Reading file ClientTypeRefs]
    out [Reading file ClientView]
    out [Reading file CompletionTypeRef]
    out [Reading file CompletionTypeRefs]
    out [Reading file CompletionView]
    out [Reading file ContactTypeRef]
    out [Reading file ContactView]
    out [Reading file CreativeTypeRef]
    out [Reading file CreativeTypeRefs]
    out [Reading file CreativeView]
    out [Reading file FtpServerTypeRef]
    out [Reading file FtpServerView]
    out [Reading file InsertioninstructionTypeRef]
    out [Reading file InsertioninstructionTypeRefs]
    out [Reading file InsertionInstructionView]
    out [Reading file MediaServerTypeRef]
    out [Reading file MediaServerView]
    out [Reading file SystemPropertyTypeRef]
    out [Reading file SystemPropertyTypeRefs]
    out [Reading file SystemPropertyView]
    out [Reading file VendorTypeRef]
    out [Reading file VendorTypeRefs]
    out [Reading file VendorView]
    out [Translating file AdServerInformationType]
    out [Translating file AdsType]
    out [Translating file AgencyType]
    out [Translating file CampaigntocompletionType]
    out [Translating file CampaignType]
    out [Translating file ChannelType]
    out [Translating file ClientType]
    out [Translating file CompletionType]
    out [Translating file ContactType]
    out [Translating file CreativeType]
    out [Translating file FtpServerType]
    out [Translating file InsertioninstructionType]
    out [Translating file MediaServerType]
    out [Translating file SystemPropertyType]
    out [Translating file VendorType]
    out [Translating file AdServerInformationTypeRef]
    out [Translating file AdServerInformationView]
    out [Translating file AdsTypeRef]
    out [Translating file AdsView]
    out [Translating file AgencyTypeRef]
    out [Translating file AgencyView]
    out [Translating file CampaigntocompletionTypeRef]
    out [Translating file CampaignToCompletionView]
    out [Translating file CampaignTypeRef]
    out [Translating file CampaignTypeRefs]
    out [Translating file CampaignView]
    out [Translating file ChannelTypeRef]
    out [Translating file ChannelTypeRefs]
    out [Translating file ChannelView]
    out [Translating file ClientTypeRef]
    out [Translating file ClientTypeRefs]
    out [Translating file ClientView]
    out [Translating file CompletionTypeRef]
    out [Translating file CompletionTypeRefs]
    out [Translating file CompletionView]
    out [Translating file ContactTypeRef]
    out [Translating file ContactView]
    out [Translating file CreativeTypeRef]
    out [Translating file CreativeTypeRefs]
    out [Translating file CreativeView]
    out [Translating file FtpServerTypeRef]
    out [Translating file FtpServerView]
    out [Translating file InsertioninstructionTypeRef]
    out [Translating file InsertioninstructionTypeRefs]
    out [Translating file InsertionInstructionView]
    out [Translating file MediaServerTypeRef]
    out [Translating file MediaServerView]
    out [Translating file SystemPropertyTypeRef]
    out [Translating file SystemPropertyTypeRefs]
    out [Translating file SystemPropertyView]
    out [Translating file VendorTypeRef]
    out [Translating file VendorTypeRefs]
    out [Translating file VendorView]
    out [Compiling 53 Java files]
    err*** The following character string is too long:
    err***
    out Error in Java compilation: \s7u.log (The system cannot find the file specified)
    Any suggestion appreciated.
    Daniel Huang

    Having not seen this before, I assume that the issue is that the command line string is too long when Javac is invoked.
    Here are a few things to reduce the size of the command line:
    - do not use the CLASSPATH option, but set the CLASSPATH environment variable (you can to that in a .bat file)
    - do not provide the .java files but rely on the implicit make capability in both, the SQLJ translator and the Java compiler. (Note: you must mention all of the .sqlj files that your program requires, do not rely on implicit make to find all of those.)
    - you can perform the -ser2class conversion as a separate step (see the SQLJ FAQ), as well as the Java compilation
    - there may or may not be a facility in your operating system to increase the size of the environment (and this may or may not have an effect on the maximum command line length)
    - you could try to omit the -passes option and see if that helps (that may actually be where your invocation if failing in the first place, in that it cannot write to some temporary file).
    Let us know how it goes. Thanks!

  • Complete working code for Gmail POP3 & SMTP with SSL - Java mail API

    Finally, your code-hunt has come to an end!!!!
    I am presenting you the complete solution (with code) to send and retrieve you mails to & from GMAIL using SMTP and POP3 with SSL & Authenticaion enabled. [Even starters & newbies like me, can easy try, test & understand - But first download & add JAR's of Java Mail API & Java Activation Framework to Netbeans Library Manager]
    Download Java Mail API here
    http://java.sun.com/products/javamail/
    Read Java Mail FAQ's here
    http://java.sun.com/products/javamail/FAQ.html
    Download Java Activation Framework [JAF]
    http://java.sun.com/products/javabeans/jaf/downloads/index.html
    Also, The POP program retrieves the mail sent with SMTP program :) [MOST IMPORTANT & LARGELY IN DEMAND]okey.. first things first... all of your thanks goes to the following and not a s@!te to me :)
    hail Java !!
    hail Java mail API !!
    hail Java forums !!
    hail Java-tips.org !!
    hail Netbeans !!
    Thanks to all coders who helped me by getting the code to work in one piece.
    special thanks to "bshannon" - The dude who runs this forum from 97!!I am just as happy as you will be when you execute the below code!! [my 13 hours of tweaking & code hunting has paid off!!]
    Now here it is...I only present you the complete solution!!
    START OF PROGRAM 1
    SENDING A MAIL FROM GMAIL ACCOUNT USING SMTP [STARTTLS (SSL)] PROTOCOL OF JAVA MAIL APINote on Program 1:
    1. In the code below replace USERNAME & PASSWORD with your respective GMAIL account username and its corresponding password!
    2. Use the code to make your Gmail client [jsp/servlets whatever]
    //Mail.java - smtp sending starttls (ssl) authentication enabled
    //1.Open a new Java class in netbeans (default package of the project) and name it as "Mail.java"
    //2.Copy paste the entire code below and save it.
    //3.Right click on the file name in the left side panel and click "compile" then click "Run"
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class Main
        String  d_email = "[email protected]",
                d_password = "PASSWORD",
                d_host = "smtp.gmail.com",
                d_port  = "465",
                m_to = "[email protected]",
                m_subject = "Testing",
                m_text = "Hey, this is the testing email.";
        public Main()
            Properties props = new Properties();
            props.put("mail.smtp.user", d_email);
            props.put("mail.smtp.host", d_host);
            props.put("mail.smtp.port", d_port);
            props.put("mail.smtp.starttls.enable","true");
            props.put("mail.smtp.auth", "true");
            //props.put("mail.smtp.debug", "true");
            props.put("mail.smtp.socketFactory.port", d_port);
            props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
            props.put("mail.smtp.socketFactory.fallback", "false");
            SecurityManager security = System.getSecurityManager();
            try
                Authenticator auth = new SMTPAuthenticator();
                Session session = Session.getInstance(props, auth);
                //session.setDebug(true);
                MimeMessage msg = new MimeMessage(session);
                msg.setText(m_text);
                msg.setSubject(m_subject);
                msg.setFrom(new InternetAddress(d_email));
                msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
                Transport.send(msg);
            catch (Exception mex)
                mex.printStackTrace();
        public static void main(String[] args)
            Main blah = new Main();
        private class SMTPAuthenticator extends javax.mail.Authenticator
            public PasswordAuthentication getPasswordAuthentication()
                return new PasswordAuthentication(d_email, d_password);
    END OF PROGRAM 1-----
    START OF PROGRAM 2
    RETRIVE ALL THE MAILS FROM GMAIL INBOX USING Post Office Protocol POP3 [SSL] PROTOCOL OF JAVA MAIL APINote:
    1.Log into your gmail account via webmail [http://mail.google.com/]
    2.Click on "settings" and select "Mail Forwarding & POP3/IMAP"
    3.Select "enable POP for all mail" and "save changes"
    4.In the code below replace USERNAME & PASSWORD with your respective GMAIL account username and its corresponding password!
    PROGRAM 2 - PART 1 - Main.java
    //1.Open a new Java class file in the default package
    //2.Copy paste the below code and rename it to Mail.java
    //3.Compile and execute this code.
    public class Main {
        /** Creates a new instance of Main */
        public Main() {
         * @param args the command line arguments
        public static void main(String[] args) {
            try {
                GmailUtilities gmail = new GmailUtilities();
                gmail.setUserPass("[email protected]", "PASSWORD");
                gmail.connect();
                gmail.openFolder("INBOX");
                int totalMessages = gmail.getMessageCount();
                int newMessages = gmail.getNewMessageCount();
                System.out.println("Total messages = " + totalMessages);
                System.out.println("New messages = " + newMessages);
                System.out.println("-------------------------------");
    //Uncomment the below line to print the body of the message. Remember it will eat-up your bandwidth if you have 100's of messages.            //gmail.printAllMessageEnvelopes();
                gmail.printAllMessages();
            } catch(Exception e) {
                e.printStackTrace();
                System.exit(-1);
    END OF PART 1
    PROGRAM 2 - PART 2 - GmailUtilities.java
    //1.Open a new Java class in the project (default package)
    //2.Copy paste the below code
    //3.Compile - Don't execute this[Run]
    import com.sun.mail.pop3.POP3SSLStore;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Date;
    import java.util.Properties;
    import javax.mail.Address;
    import javax.mail.FetchProfile;
    import javax.mail.Flags;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Part;
    import javax.mail.Session;
    import javax.mail.Store;
    import javax.mail.URLName;
    import javax.mail.internet.ContentType;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.ParseException;
    public class GmailUtilities {
        private Session session = null;
        private Store store = null;
        private String username, password;
        private Folder folder;
        public GmailUtilities() {
        public void setUserPass(String username, String password) {
            this.username = username;
            this.password = password;
        public void connect() throws Exception {
            String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
            Properties pop3Props = new Properties();
            pop3Props.setProperty("mail.pop3.socketFactory.class", SSL_FACTORY);
            pop3Props.setProperty("mail.pop3.socketFactory.fallback", "false");
            pop3Props.setProperty("mail.pop3.port",  "995");
            pop3Props.setProperty("mail.pop3.socketFactory.port", "995");
            URLName url = new URLName("pop3", "pop.gmail.com", 995, "",
                    username, password);
            session = Session.getInstance(pop3Props, null);
            store = new POP3SSLStore(session, url);
            store.connect();
        public void openFolder(String folderName) throws Exception {
            // Open the Folder
            folder = store.getDefaultFolder();
            folder = folder.getFolder(folderName);
            if (folder == null) {
                throw new Exception("Invalid folder");
            // try to open read/write and if that fails try read-only
            try {
                folder.open(Folder.READ_WRITE);
            } catch (MessagingException ex) {
                folder.open(Folder.READ_ONLY);
        public void closeFolder() throws Exception {
            folder.close(false);
        public int getMessageCount() throws Exception {
            return folder.getMessageCount();
        public int getNewMessageCount() throws Exception {
            return folder.getNewMessageCount();
        public void disconnect() throws Exception {
            store.close();
        public void printMessage(int messageNo) throws Exception {
            System.out.println("Getting message number: " + messageNo);
            Message m = null;
            try {
                m = folder.getMessage(messageNo);
                dumpPart(m);
            } catch (IndexOutOfBoundsException iex) {
                System.out.println("Message number out of range");
        public void printAllMessageEnvelopes() throws Exception {
            // Attributes & Flags for all messages ..
            Message[] msgs = folder.getMessages();
            // Use a suitable FetchProfile
            FetchProfile fp = new FetchProfile();
            fp.add(FetchProfile.Item.ENVELOPE);       
            folder.fetch(msgs, fp);
            for (int i = 0; i < msgs.length; i++) {
                System.out.println("--------------------------");
                System.out.println("MESSAGE #" + (i + 1) + ":");
                dumpEnvelope(msgs);
    public void printAllMessages() throws Exception {
    // Attributes & Flags for all messages ..
    Message[] msgs = folder.getMessages();
    // Use a suitable FetchProfile
    FetchProfile fp = new FetchProfile();
    fp.add(FetchProfile.Item.ENVELOPE);
    folder.fetch(msgs, fp);
    for (int i = 0; i < msgs.length; i++) {
    System.out.println("--------------------------");
    System.out.println("MESSAGE #" + (i + 1) + ":");
    dumpPart(msgs[i]);
    public static void dumpPart(Part p) throws Exception {
    if (p instanceof Message)
    dumpEnvelope((Message)p);
    String ct = p.getContentType();
    try {
    pr("CONTENT-TYPE: " + (new ContentType(ct)).toString());
    } catch (ParseException pex) {
    pr("BAD CONTENT-TYPE: " + ct);
    * Using isMimeType to determine the content type avoids
    * fetching the actual content data until we need it.
    if (p.isMimeType("text/plain")) {
    pr("This is plain text");
    pr("---------------------------");
    System.out.println((String)p.getContent());
    } else {
    // just a separator
    pr("---------------------------");
    public static void dumpEnvelope(Message m) throws Exception {       
    pr(" ");
    Address[] a;
    // FROM
    if ((a = m.getFrom()) != null) {
    for (int j = 0; j < a.length; j++)
    pr("FROM: " + a[j].toString());
    // TO
    if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
    for (int j = 0; j < a.length; j++) {
    pr("TO: " + a[j].toString());
    // SUBJECT
    pr("SUBJECT: " + m.getSubject());
    // DATE
    Date d = m.getSentDate();
    pr("SendDate: " +
    (d != null ? d.toString() : "UNKNOWN"));
    static String indentStr = " ";
    static int level = 0;
    * Print a, possibly indented, string.
    public static void pr(String s) {
    System.out.print(indentStr.substring(0, level * 2));
    System.out.println(s);
    }END OF PART 2
    END OF PROGRAM 2
    P.S: CHECKING !!
    STEP 1.
    First compile and execute the PROGRAM 1 with your USERNAME & PASSWORD. This will send a mail to your own account.
    STEP 2.
    Now compile both PART 1 & PART 2 of PROGRAM 2. Then, execute PART 1 - Main.java. This will retrive the mail sent in step 1. njoy! :)
    In future, I hope this is added to the demo programs of the Java Mail API download package.
    This is for 3 main reasons...
    1. To prevent a lot of silly questions being posted on this forum [like the ones I did :(].
    2. To give the first time Java Mail user with a real time working example without code modification [code has to use command line args like the demo programs - for instant results].
    3. Also, this is what google has to say..
    "The Gmail Team is committed to making sure you always can access your mail. That's why we're offering POP access and auto-forwarding. Both features are free for all Gmail users and we have no plans to charge for them in the future."
    http://mail.google.com/support/bin/answer.py?answer=13295
    I guess bshannon & Java Mail team is hearing this....
    Again, Hurray and thanks for helping me make it!! cheers & no more frowned faces!!
    (: (: (: (: (: GO JCODERS GO!! :) :) :) :) :)
    codeace
    -----                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Thanks for the reply,
    I did checked by enabling session debuging and also checked pop settings it's enabled for all
    mails, I tried deleting some very old messages and now the message count is changed to 310.
    This may be the problem with gmail.
    Bellow is the output i got,
    DEBUG: setDebug: JavaMail version 1.4ea
    DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
    DEBUG POP3: connecting to host "pop.gmail.com", port 995, isSSL false
    S: +OK Gpop ready for requests from 121.243.255.240 n22pf5432603pof.2
    C: USER [email protected]
    S: +OK send PASS
    C: PASS my_password
    S: +OK Welcome.
    C: STAT
    S: +OK 310 26900234
    Custom output: messageCount : 310
    C: QUIT
    S: +OK Farewell.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using Java mail API from JSPDynPage

    Hi Experts,
    I am working on a Portal Assignment that requiresto sent work flow mails on the basis of error conditions.
    Can u please suggest if at all I can use Java Mail APIs from JSP page within the JSP DYN Page Framework.
    If at all Java Mail can be used could u please suugest some help docs on the same.
    Thanks for the help.
    Manab C Ghosh
    EP Consultant
    Kolkata INDIA
    +919830603327

    Hi Experts,
    Thanks for all the responses to my Mail question(mailing from JSPDynPage).
    I have found the solution.
    Here is how I have got the things: (pls note there are other solns)
    Using Java Mail APIs;
    Create a Java file in the scr.core / src.api
    MailSender.java
    * Created on Jul 21, 2005
    * To change the template for this generated file go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    package com.mailsend.test;
    import java.util.Date;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    * Edited on Jul 24, 2005
    * @author Manab C Ghosh
    public class MailSender {
         public String sendMessage(){
            String msg ="Hello mail Test";
            String smtpServer ="mySMTPServer";
            String smtpSender = "senderemailaddress";
            String smtpRecipient="receipientemailaddress";
            String stBody =  msg ;
            //String stDate = new Date().toString() ;
            String stSubject = "Mail Test ";
            Send(     smtpServer,          //SMTPServer
                      smtpSender,          //Sender
                      smtpRecipient,     //Recipient
                      stSubject,          //Subject
                      stBody               //Body
                        );               //Attachments                    
         return "Mail Success";
    public static void Send(String SMTPServer,
                                  String From,
                                  String To,
                                  String Subject,
                                  String msgText1
            // Error status;
            int ErrorStatus = 0;
            // create some properties and get the default Session
            Properties props = System.getProperties();
            props.put("mail.smtp.host", SMTPServer);
            Session session = Session.getDefaultInstance(props, null);     
            try {
                 // create a message
                 MimeMessage msg = new MimeMessage(session);
                 msg.setFrom(new InternetAddress(From));
                 InternetAddress[] address = {new InternetAddress(To)};
                 msg.setRecipients(Message.RecipientType.TO, address);
                 msg.setSubject(Subject);
                 // create and fill the first message part
                 MimeBodyPart mbp1 = new MimeBodyPart();
                 mbp1.setText(msgText1);
                 // create the Multipart and its parts to it
                 Multipart mp = new MimeMultipart();
                 mp.addBodyPart(mbp1);
                 //mp.addBodyPart(mbp2);
                 // add the Multipart to the message
                 msg.setContent(mp);
                 // set the Date: header
                 msg.setSentDate(new Date());
                 // send the message
                 Transport.send(msg);
            } catch (MessagingException mex) {
    Call this file from the JSP page (which is set at JSPDynPage controller)
    one important thing-----
    Create a dir under PORTAL-INF and import the following jars-- activation.jar, mail.jar,imap.jar,smtp.jar, mailapi.jar.
    This works..
    Thanks once again to the Experts.
    happy mailing
    Manab Ghosh.
    INDIA (+919830603327)

  • Searching Java Compiler from Sun

    Hello
    I have Download the JAVA SDK 1.4 Standard from SUN. I have find 4 demo Java Applications but no JAVA Compiler.
    Now someone how I can get the full Java compiler with all librarys and Documentation?
    Kind regards
    Sven

    If you install the JDK1.4 you should have the compiler. You'll see it under {JAVAHOME}\bin. To compile a java file, you'll have to use javac.
    The API documentation is a seperate download.

  • Java Speech API

    Hi
    When i compile the following program it give me error some of the Java speech API.
    import javax.speech.AudioException;
    import javax.speech.Central;
    import javax.speech.EngineException;
    import javax.speech.synthesis.Synthesizer;
    import javax.speech.synthesis.SynthesizerModeDesc;
    Can any one help.
    Thanks
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.File;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Locale;
    import java.util.Hashtable;
    import java.util.prefs.Preferences;
    import javax.speech.AudioException;
    import javax.speech.Central;
    import javax.speech.EngineException;
    import javax.speech.synthesis.Synthesizer;
    import javax.speech.synthesis.SynthesizerModeDesc;
    import javax.swing.DefaultComboBoxModel;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextField;
    import javax.swing.JTextArea;
    import javax.swing.JToolBar;
    public class JavaVoice extends JFrame implements Comparator {
         private Synthesizer synth;
         private File readFile = null;
         Preferences preferences = Preferences.userRoot().node("dlb/JavaVoice");
         JComboBox voices;
         Hashtable list;
         public JavaVoice() {
              super("Java Voice Synthesizer");
              addWindowListener(new AppCloser());
              DefaultComboBoxModel model = new DefaultComboBoxModel();
              try {
                   javax.speech.EngineList elist = Central.availableSynthesizers(null);
                   list = new Hashtable(elist.size());
                   Collections.sort(elist,this);
                   for (int i=0;i<elist.size();i++) {
                        SynthesizerModeDesc desc = (SynthesizerModeDesc)elist.elementAt(i);
                        model.addElement(desc.getModeName());
                        list.put(desc.getModeName(),desc);
                   synth = Central.createSynthesizer((SynthesizerModeDesc) list.get(preferences.get("voice.selected","")));
                   synth.allocate();
                   synth.resume();
              catch(EngineException ex) {
                   ex.printStackTrace();
              catch(AudioException ex) {
                   ex.printStackTrace();
              final JTextArea textArea = new JTextArea();
              textArea.setLineWrap(true);
              textArea.setWrapStyleWord(true);
              JScrollPane scrollPane = new JScrollPane(textArea);
              getContentPane().add(scrollPane,BorderLayout.CENTER);
              JToolBar toolBar = new JToolBar();
              JButton button = new JButton("Open");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        JFileChooser fileChooser = new JFileChooser(preferences.get("voice.openDirectory",System.getProperty("user.dir")));
                        if(fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
                             readFile = fileChooser.getSelectedFile();
                             preferences.put("voice.openDirectory",readFile.getParent());
                             try {
                                  FileReader reader = new FileReader(readFile);
                                  textArea.read(reader,readFile.getName());
                                  reader.close();
                             catch(IOException ex) {
                                  ex.printStackTrace();
              toolBar.add(button);
              button = new JButton("Clear");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        textArea.setText("");
              toolBar.add(button);
              toolBar.add(button);
              button = new JButton("Start");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        String str = textArea.getSelectedText();
                        if(str != null && str.length() > 0) {
                             synth.speakPlainText(str.toLowerCase(),null);
                             textArea.setSelectionStart(0);
                             textArea.setSelectionEnd(0);
                        else {
                             str = textArea.getText();
                             synth.speakPlainText(str.toLowerCase(),null);
              toolBar.add(button);
              button = new JButton("Stop");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        try {
                             synth.cancel();
                        catch(ArrayIndexOutOfBoundsException ex) {}
              toolBar.add(button);
              toolBar.addSeparator();
              toolBar.add(new JLabel("Voice:"));
              voices = new JComboBox(model);
              voices.setSelectedItem(preferences.get("voice.selected",""));
              voices.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        try {
                             synth.deallocate();
                             String str = (String) voices.getSelectedItem();
                             preferences.put("voice.selected",str);
                             synth = Central.createSynthesizer((SynthesizerModeDesc) list.get(str));
                             synth.allocate();
                             synth.resume();
                        catch(EngineException ex) {
                             ex.printStackTrace();
                        catch(AudioException ex) {
                             ex.printStackTrace();
              toolBar.add(voices);
              toolBar.addSeparator();
              button = new JButton("Exit");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        try {
                             synth.deallocate();
                        catch(EngineException ex) {
                             ex.printStackTrace();
                        preferences.putInt("voice.mainWindow.x",getLocation().x);
                        preferences.putInt("voice.mainWindow.y",getLocation().y);
                        preferences.putInt("voice.mainWindow.width",getSize().width);
                        preferences.putInt("voice.mainWindow.height",getSize().height);
                        System.exit(1);
              toolBar.add(button);
              getContentPane().add(toolBar,BorderLayout.NORTH);
              final JTextField textField = new JTextField();
              textField.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ev) {
                        String txt = textField.getText();
                        if(txt.length() > 0) {
                             textArea.append(txt+'\n');
                             synth.speakPlainText(txt, null);
                             textField.setText("");
              getContentPane().add(textField,BorderLayout.SOUTH);
              int x = preferences.getInt("voice.mainWindow.x",1);
              int y = preferences.getInt("voice.mainWindow.y",1);
              int width = preferences.getInt("voice.mainWindow.width",640);
              int height = preferences.getInt("voice.mainWindow.height",480);
              setLocation(x,y);
              setSize(width,height);
              setVisible(true);
         public int compare(Object obj1, Object obj2) {
              SynthesizerModeDesc desc1 = (SynthesizerModeDesc) obj1;
              SynthesizerModeDesc desc2 = (SynthesizerModeDesc) obj2;
              return desc1.getModeName().compareToIgnoreCase(desc2.getModeName());
         public static void main(String args[]) {
              new JavaVoice();
         class AppCloser extends WindowAdapter {
              public void windowClosing(WindowEvent ev) {
                   try {
                        synth.deallocate();
                   catch(EngineException ex) {
                        ex.printStackTrace();
                   System.exit(1);
    ---------------------------------------------------------------------------------------------------------

    use code tags, post the error message.
    http://forum.java.sun.com/help.jspa?sec=formatting

  • Failed to build Java Mail API 1.4.5 with maven-3.0.4

    Hi,
    I am trying to build Java Mail 1.4.5 with Maven-3.0.4 using default settings of maven.
    It is getting failed to build due to following errors -
    [ERROR] COMPILATION ERROR :
    [INFO] -----------------------------------------------------------
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[210,37] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[369,47] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[913,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[916,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[919,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[922,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[925,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[928,29] cannot find symbol
    symbol : variable Version
    location: class javax.mail.Session
    [INFO] 8 errors
    [INFO] -----------------------------------------------------------
    [INFO] ----------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ----------------------------------------------------------------------
    [INFO] Total time: 1:51.197s
    [INFO] Finished at: Tue Jan 08 13:06:01 IST 2013
    [INFO] Final Memory: 12M/67M
    [INFO] ----------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
    3.2:compile (default-compile) on project javax.mail: Compilation failure: Compil
    ation failure:
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[210,37] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR]\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[369,47] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[913,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[916,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[919,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[922,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR]\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[925,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[928,29] cannot find symbol
    [ERROR] symbol : variable Version
    [ERROR] location: class javax.mail.Session
    [ERROR] -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
    rg.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on
    project javax.mail: Compilation failure
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
    ct(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
    ct(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
    ild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
    eStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
    cher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
    a:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
    uncher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
    352)
    Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation fail
    ure
    at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
    Mojo.java:656)
    at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
    BuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
    .java:209)
    ... 19 more
    [ERROR]
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExceptionSame issue I am facing when I am trying to build Java Mail with netbeans - 7.2.1, it getting failed with same version issue in Session.java class.
    How can I set this Version in Session.java class to get rid of this error?
    If we can use nexus repository then please let me know how to set this.
    Thanks,
    Neelam Sharma

    I answered this question here:
    http://stackoverflow.com/questions/14217596/failed-to-build-java-mail-api-1-4-5-with-maven-3-0-4/14288418#14288418

  • Download Java 6 API

    Is there a way to download the entire Java 6 API to my computer so that I don't need internet access for it?
    Thanks

    ok, im having problems downloading THIS jre-6u1 i started it the first time but it was so slow i canceled the install, then i tried a second time i get this HTTP STATUS CODE=302 unable to install- Anyone have a solution? I've tried restore, nothing works

  • Flex Compiler API Issue: Error: unable to open './flex-config.xml'

    1) I make a java struts(or a servlet) to build swf file
    dynamically when receiving the request from client. The struts
    source code please see the attached code. deploy the structs to the
    Tomcat
    2) then copy the <Flex_SDK>/frameworks to the
    <tomcat_home>/webapps/dozhang/WEB-INF
    3) then copy the all the libraries under the
    <Flex_SDK>/lib to the
    <tomcat_home>/webapps/dozhang/WEB-INF/lib
    4) Copy a test a.mxml to c:\
    5) Start up Tomcat , access the structs, I will get the
    Error: unable to open './flex-config.xml' in the tomcat log.
    Can anyone tell me how to specify the location of the
    flex-config.xml ?

    Ok, I solved it by myself
    I need to add the following codes when calling the Compiler
    API
    Configuration conf = application.getDefaultConfiguration();
    conf.setToken("flexlib", "path to the frameworks")
    applicaiton.setConfiguration(conf);
    Then it solved the problem

Maybe you are looking for

  • Include in smartform.

    Hi.. how do you write include in a smartform? for exmplae this is the include statment i have: INCLUDE &VBDKA-ZTERM& OBJECT TEXT ID SDTP PARAGRAPH L. Regards, Srihari.

  • Integrating "Recent Notifications",- from KM intto Universal worklist

    Hi There Has anyone any experience with integrating The action inbx = "Recent notifications" from KM in the portal into the universal worklist so the users will get a complete picture of notifications from R/3 and also from KM in the portal... Is it

  • Premiere CC 2014 lost FLV rendering option

    Is FLV rendering option left out of Premiere Pro CC 2014... or am I missing something? Simply did not find it on the export list anymore...

  • FCP 7 corrupt cross dissolve

    I am using FCP 7 and I am now suddenly having problems with the cross dissolve. When I insert a cross dissolve into the timeline the second image sometimes jumps when the video is played. Then when I exported the video and played it at every dissolve

  • Configuring BO DB params in Solaris

    Hi, I am trying to setup the BO XI 3.1 server on Solaris 10.  I have imported the .biar file however I am not able to make the reports point to the correct Reporting DB to generate the reports. Curently I due to teh network settings I am unable to us