Won't compile using v1.4.0

I have downloaded the newer version, v1.4.0 of the runtime envrionment. I have set the path c:\j2re1.4.0.
I'm able to execute my Java programs but not able to compile. Why is this?
Thanks in advance.
Ricardo
[email protected]

I'm able to execute my Java programs but not able to
compile. Why is this?You have only downloaded the Java Runtime Environment, not the Java 2 Software Development Kit - try downloading the SDK...
http://java.sun.com/j2se/1.4/download.html

Similar Messages

  • Library Projects compiled using Flash Builder and ANT have different outputs

    Hi Guys.,
    I am really having hard time to get something work right with RSL projects in Flex 3.2 SDK. Here is my weird problem.
    I have a library projects which has the following settings in Flash Builder
    Link Type : External
    airglobal.swc
    framework.swc
    datavisualization.swc
    rpc.swc
    utilites.swc
    applicationupdater.swc
    applicationupdater_ui.swc
    Link Type: Merged into code
    airframework.swc
    servicemonitor.swc
    Compiler settings
    -directory=true -output=../../lib/core -debug=true -optimize=false -define+=CONFIG::bindingdebug,false -define+=CONFIG::frameworkdebug,false -define+=CONFIG::flexspy,true -define+=CONFIG::debug,true -define+=CONFIG::release,false -define+=CONFIG::logtoconsole,false -allow-source-path-overlap=true  -keep-as3-metadata+=Metadata,DefaultProperty,Required,Event,AssignableTo,Inject,InjectCon structor,Publish,Subscribe,PublishSubscribe,Factory,Init,Destroy,Observe,AsyncInit,Managed Events,MessageDispatcher,MessageHandler,MessageBinding,MessageInterceptor,MessageError,Com mand,CommandComplete,CommandResult,CommandError,CommandStatus,ResourceBinding,Selector,Tar get,Autoremove,Internal,ObjectDefinition,DynamicObject
    When I compile my library projects I get a MyLibraryproject.swc. The SWC has the following files in it
    mx/controls/HTML.png
    mx/core/Windows.png
    library.swf
    Note: airframework.swc and servicemonitor.swc has a many png files and properties files in it. But these properties and png files are not included when compiled in Flash builder.
    But when the same project is compiled using ANT compc task, i get all the png and properties files from airframework.swc and servicemonitor.swc files into my library project SWC file.
    Here is the ANT version which is used to compile the library project
    <compc output="${project.output.dir}/${project.name}.swc"
       include-classes="${as} ${mxml}"
       use-network="false"
       directory="false"
       allow-source-path-overlap="true"
       incremental="${build.incremental}"
       debug="${build.debug}"
       locale="${build.locale}"
       optimize="false"
       >
    <define name="CONFIG::bindingdebug" value="${build.bindingdebug}" />
    <define name="CONFIG::logtoconsole" value="${build.logtoconsole}" />
    <define name="CONFIG::frameworkdebug" value="${build.frameworkdebug}" />
    <define name="CONFIG::flexspy" value="${build.flexspy}" />
    <define name="CONFIG::debug" value="${build.debug}" />
    <define name="CONFIG::release" value="${build.release}" />
    <keep-as3-metadata name="Metadata" />
    <keep-as3-metadata name="DefaultProperty" />
    <keep-as3-metadata name="Required" />
    <keep-as3-metadata name="Event" />
    <keep-as3-metadata name="AssignableTo" />
    <keep-as3-metadata name="Inject" />
    <keep-as3-metadata name="InjectConstructor" />
    <keep-as3-metadata name="Publish" />
    <keep-as3-metadata name="Subscribe" />
    <keep-as3-metadata name="PublishSubscribe" />
    <keep-as3-metadata name="Factory" />
    <keep-as3-metadata name="Init" />
    <keep-as3-metadata name="Destroy" />
        <keep-as3-metadata name="Observe" />
        <keep-as3-metadata name="AsyncInit" />
        <keep-as3-metadata name="ManagedEvents" />
        <keep-as3-metadata name="MessageDispatcher" />
        <keep-as3-metadata name="MessageHandler" />
        <keep-as3-metadata name="MessageBinding" />
        <keep-as3-metadata name="MessageInterceptor" />
        <keep-as3-metadata name="MessageError" />
        <keep-as3-metadata name="Command" />
        <keep-as3-metadata name="CommandComplete" />
        <keep-as3-metadata name="CommandResult" />
        <keep-as3-metadata name="CommandError" />
        <keep-as3-metadata name="CommandStatus" />
        <keep-as3-metadata name="ResourceBinding" />
    <keep-as3-metadata name="Selector" />
    <keep-as3-metadata name="Target" />
    <keep-as3-metadata name="Autoremove" />
    <keep-as3-metadata name="Internal" />
    <keep-as3-metadata name="ObjectDefinition" />
    <keep-as3-metadata name="DynamicObject" />
    <load-config filename="${air.config}"/>
    <compiler.include-libraries dir="${flex.frameworks.dir}/libs/air" append="true">
         <include name="servicemonitor.swc" />
         <include name="airframework.swc" />
    </compiler.include-libraries>
    <external-library-path dir="${build.compc.dir}" append="true">
         <include name="TriGeoFlexFramework/TriGeoFlexFramework.swc" />
         <include name="TriGeoLibrary/TriGeoLibrary.swc" />
         <include name="TriGeoRPCFramework/TriGeoRPCFramework.swc" />
         <include name="Degrafa_Beta3.1_Flex3" />
         <include name="parsley-flex3-2.4.0.swc" />
         <include name="spicelib-flex-2.4.0.swc" />
    </external-library-path>
    <external-library-path dir="${flex.frameworks.dir}/libs" append="true">
         <include name="framework.swc" />
         <include name="datavisualization.swc" />
         <include name="utilities.swc" />
         <include name="rpc.swc" />
         <include name="air/airglobal.swc" />
         <include name="air/applicationupdater.swc" />
         <include name="air/applicationupdater_ui.swc" />
    </external-library-path>
    <source-path path-element="${basedir}/src" />
    </compc>
    </target>
    </project>
    Any insights is greatly appreciated.!

    #1, If it compiles then you have no issue. There's no reason at this point not to use 4.6. You should bundle a captive runtime to assure the users computer won't need to have AIR installed at all.
    #2, Papervision is old. Use the Stage3D and/or a wrapper framework. As far as the generic "If I download lots of data will it take the user more time to load it", well, of course. Just don't make the loading experience painful. Entertain them while they way or find ways of displaying data sooner than later. If it's desirable on the web has more to do with the context of the app and the device displaying it. In other words, a phone user would find it easy but obviously not a desktop user.
    #3, Definitely referring you to Google on that one.
    #4, Size always matters, it's common sense. The more you process the harder it is. While I haven't done AR I've used the Microsoft Kinect SDK and ANE and tracking was extremely fast but limited. From what I've seen and your basic built in location and direction hardware on any mobile device you shouldn't have much trouble. Depends on what you're doing.
    #5, This discussion would be way too large for a forum. You'd need to consult a firm experienced in AR development.
    #6, "Applications using the commercial license do not have to provide source code, but must pay a licensing fee. Contact ARToolworks at [email protected] for more information." They will base your price on your product, there is no single price.
    #7, The models could be huge and elaborate or tiny and simple which changes the answer. Consult the answer in #4. Ultimately most people are getting on fast networks with mobile and excessively fast on desktop/wifi. Size matters a lot less than 3 years ago.
    #8, Depends on what you're doing. You have to explain it.

  • Code won't compile - array

    This is my first in depth attempt to understand the code for enabling arrays. I THINK I have a fairly simple problem, but the code won't compile and NetBeans is telling me I'm missing a symbol &/or class, which I just don't get. Here is the code for the Inventory1 module as well as the main module - what am I not seeing?
    Inventory1 module
    import java.util.Scanner;
    import static java.lang.System.out;
    public class Inventory1
      //declare and initialize variables
      int[] itemNumber = new int [5];
      String[] productName = new String[5];
      int[] stockAmount = new int[5];
      double[] productCost = new double[5];
      double[] totalValue = new double[5];
      int i;
      //int i = 0;
      //initialize scanner
      Scanner sc = new Scanner(System.in);
      Inventory1 info = new Inventory1
    public void inventoryInput()
      while (int i = 0; i < 5; i++)
         out.println("Please enter item number: "); //prompt - item number
         info.itemNumber[i] = sc.nextInt(); // input
         out.println( "Enter product name/description: "); //prompt - product name
         info.productName[i] = sc.nextLine(); // input
         out.println("Quantity in stock: "); // prompt - quantity
         int temp = sc.nextInt(); // capture temp number to verify
         if( temp <=0 )
         { // ensure stock amount is positive number
             out.println( "Inventory numbers must be positive. Please" +
                 "enter a correct value." ); // prompt for correct #
             temp = sc.nextInt(); // exit if statement
         else info.stockAmount[i] = temp; // input
         out.println("What is the product cost for each unit? "); // prompt - cost
         double temp2 = sc.nextDouble();
         if( temp <=0 )
             out.println( "Product cost must be a positive dollar " +
                  "amount. Please enter correct product cost." );
             temp2 = sc.nextDouble();
         else info.productCost[i] = temp2;
      out.println( "We hope this inventory program was helpful. Thank you for " +
          "using our program." );
      } // end method inventoryInput   
    }main module
    public class Main {
      public static void main(String[] args) { //start main method
            Inventory1 currentInventory = new Inventory1(); //call Inventory class
            currentInventory.inventoryInput();
    }

    init:
    deps-jar:
    Compiling 1 source file to C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\build\classes
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:28: '(' or '[' expected
    public void inventoryInput()
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: '.class' expected
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: illegal start of type
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: not a statement
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: ';' expected
    while (int i = 0; i < 5; i++)
    5 errors
    BUILD FAILED (total time: 0 seconds)

  • Migrate Application Jdeveloper 11.1.1.0.2 to 11.1.2.2.0 - won´t compile

    Hi,
    I'm trying to migrate my application from JDev 11.1.1.0.2 to 11.1.2.2.0 but even after Jdev migrate to new version, the application won't compile correct. Seems that some classes wont recognize dependecies from other package. If i have a class in Web that import a class from Model, in compile time the console give me this kind a error: "package 'xxx.yyy.www' does not exist". If i open any class that gave me this error there isn't any warning or red line showing errors, in the line of the import i can use Ctrl + right click and go to the class without problems. The dependecies between projects (web, model and ejb) are correct. I dont know what is, any help will be appreciated.
    Thanks in advance,
    Alexandre Rocco.

    Hi
    I am facing the same problem when migrating from JDev 11.1.1.4.0 to JDev 11.1.2.2.0. Any idea?
    Regards,
    Ferez

  • DG4ODBC MSSQL query works in sql, but won't compile in PL/SQL.

    I'm using DG4ODBC from 11g to query a SQL Server database. The query I'm using works in a SQL DEveloper SQL worksheet and sqlplus, but won't compile in a PL/SQL procedure.
    The query is
      INSERT
      INTO crm_labels
          accountid,
          label_name,
          cir_labelcode,
          cir_knownasname,
          cir_countryidname,
          parentaccountidname,
          cir_customertypecode1,
          cir_customertypecode2,
          cir_dealstatus
      SELECT "AccountId",
        REPLACE("Name",chr(0)) label_name,
        REPLACE("Cir_labelcode",chr(0)) ,
        REPLACE("Cir_knownasname",chr(0)),
        REPLACE("cir_countryidName",chr(0)),
        REPLACE("ParentAccountIdName",chr(0)),
        "Cir_customertypecode1",
        "Cir_customertypecode2",
        "Cir_dealstatus"
      FROM "dbo"."Account"@crmsvc
      WHERE "Cir_labelcode" IS NOT NULL;The error message is
    Error(1): ORA-04052: error occurred when looking up remote object dbo.Account@CRMSVC ORA-01948: identifier's name length (34) exceeds maximum (30)I'm guessing that it is attempting to describe additional columns in the Account table.
    If I remove the dbo,
      FROM "Account"@crmsvcI get
    Error(1): ORA-04052: error occurred when looking up remote object PUBLIC.Account@CRMSVC ORA-00604: error occurred at recursive SQL level 1 ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Microsoft][ODBC SQL Server Driver][SQL Serve which is less than helpful. However, if I try to use the same query to create a materialized view, I get.
    SQL Error: ORA-04052: error occurred when looking up remote object PUBLIC.Account@CRMSVC
    ORA-00604: error occurred at recursive SQL level 1
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Address1_TimeZoneRuleVersionNu'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Address1_UTCConversionTimeZone'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Address2_TimeZoneRuleVersionNu'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Address2_UTCConversionTimeZone'. {42S22,NativeErr = 207}[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'Pias_NewLabelInDealNotificatio'. {42S22,NativeErr = 207}
    ORA-02063: preceding 2 lines from CRMSVCwhich seems to confim that in some circumstance, oracle will attempt to parse more than was asked for.
    Any work arounds?
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    DG4ODBC is also 11.2.0.3

    The gateway claims about this column "Address1_TimeZoneRuleVersionNu" which is not listed in your select list.
    When a gateway connection is established it first checks out all columns of the table you want to select to determine the data types and then it fetches the data for the columns you want to select. But there's also an exception - when you use functions the gateway is not able to translate into the syntax of the foreign database. in this case ALL columns will be fetched into the Oracle database and the result is processed locally (post processing).
    You're using replace function which won't be mapped to the foreign database equivalent using DG4ODBC so it will post process the result and fetch from all columns all the data into the Oracle database. Your table contains a column which exceeds the 30 character limitation of Oracle, hence the select will fail.
    The only work around is to create a view on the foreign database side which reduces the column name length to 30 characters or less.

  • [SOLVED] ruby-panelapplet2 won't compile (i686 & x86_64)

    Hi!
    I already wrote forum post in 64 bit section, but today I got to i686 machine and the error is the same, that damned package won't compile
    Can anyone help getting this compiled? Any hints?
    Errors are as follows:
    Package 'glipper' has no Name: field
    checking for GCC... yes
    checking for rb_define_alloc_func() in ruby.h... yes
    checking for rb_block_proc() in ruby.h... yes
    checking for new allocation framework... yes
    checking for attribute assignment... no
    checking for libpanelapplet-2.0 version (>= 2.6.0)... yes
    checking for G_PLATFORM_WIN32... no
    creating rbpanelappletversion.h
    creating Makefile
    creating Makefile
    /tmp/yaourt-tmp-user/aur-ruby-panelapplet2/ruby-panelapplet2/src/ruby-gnome2-all-0.19.1/glib/src/lib/pkg-config.rb:85:in `name': undefined method `[]' for nil:NilClass (NoMethodError)
        from /tmp/yaourt-tmp-user/aur-ruby-panelapplet2/ruby-panelapplet2/src/ruby-gnome2-all-0.19.1/glib/src/lib/mkmf-gnome2.rb:165:in `create_pkg_config_file'
        from /tmp/yaourt-tmp-user/aur-ruby-panelapplet2/ruby-panelapplet2/src/ruby-gnome2-all-0.19.1/panel-applet/extconf.rb:30:in `<main>'
    extconf.rb: Leaving directory 'panel-applet'
    That is driving me crazy, coz I can't get SSHMenu work properly and that is one of the tools I use all the time
    If someone has that package in x86_64, please send that to me (edzis123[@]inbox.lv). Please remove all numbers and brackets from there
    If the package is not available, alternate way is sending the files in the package, I suppose these should be like this (I took sample from i686):
    /usr/lib/ruby/site_ruby/1.9.1/panelapplet2.rb
    /usr/lib/ruby/site_ruby/1.9.1/x86_64-linux/panelapplet2_main.so
    /usr/lib/ruby/site_ruby/1.9.1/x86_64-linux/panelapplet2.so
    Thanx in advance.
    Last edited by Kirurgs (2010-02-21 21:32:26)

    Hi!
    After spending quite a lot of time on this, I found the error why I couldn't compile almost any of ruby packages including ruby-gnomepanel2.
    To my big surprise, pacman -R glipper fixed the issue and I'm now using sshmenu w/o any issues.
    Ruby seems to broke if some additional (possibly incorrect) packages are installed, which it shouldn't!! Uff...
    regards
    Kirurgs
    Last edited by Kirurgs (2010-02-21 21:32:57)

  • FtpClient client.delete("file") won't compile?

    Hello Fine People,
    I have this ftp program that is working, except for the delete command:
    import sun.net.ftp.*;
    import sun.net.*;
    String server = "192.168.0.0";
    String user = "me";
    String passwd = "mypassword";
    FtpClient client = new FtpClient();
    client.openServer(server);
    client.login(user, passwd);
    TelnetInputStream tis = null;
    client.binary();
    client.cd("Composites");
    tis = client.list();
    client.get("filename");
    client.delete("filename");
    This is roughly how it is. Without the last line, it compiles and runs fine. But when I add the client.delete line, it won't compile and gives this error:
    ImageTransfer.java:229: cannot resolve symbol
    symbol : method delete (java.lang.String)
    location: class sun.net.ftp.FtpClient
    client.delete("filename");
    Please help!
    - Logan

    Yes. The class you should be importing is, obviously, FTPClient. But don't waste your time trying to compile what is clearly just a code fragment example. The article lists several sources of FTP client software. Once you have chosen one package to evaluate, write your test program using the actual classes from that package, using its API documentation for guidance.

  • Msg.addRecipient(Message.RecipientType.TO,to) - won't compile in program

    I have had success in one of my servlets using JavaMail. I was able to send an email to my inbox to test it out. I proceeded to create another servlet based on that 1st one, and for reasons I can't explain, the servlet won't compile.
    I get this error.
    cannot resolve symbol :
             variable : RecipientType
             location : java.lang.String
                           msg.setRecipient(Message.RecipientType.TO, to); I get the same error when I switch out setRecipient for addRecipient.
    However, through further testing, I've found that not only does my 1st servlet still compile, but I'm also able to run the code from the 2nd servlet, successfully in a JSP page. This is driving me nuts...how could there be a problem compiling? There's no reason why one servlet compiles (with similar if not almost exactly the same code) and the other won't. Plus this runs fine in a JSP page...what's going on??? I've spent hours on this and I can't figure it out...please help, any input is appreciated.
    Here is the JSP page that runs successfully :
    <%@page import="java.io.*"%>
    <%@page import="java.util.Properties"%>
    <%@page import="javax.mail.*"%>
    <%@page import="javax.mail.Message.RecipientType"%>
    <%@page import="javax.mail.internet.*"%>
    <%@page import="javax.servlet.*"%>
    <%@page import="javax.servlet.http.*"%>
    <%@page import="javax.naming.*"%>
    <%@page import="javax.sql.*"%>
    <%@page import="java.sql.*"%>
    <%                         
               Connection conn = null;
               Statement stmt = null;
               ResultSet rs = null;
                  try {                              
                   Context ctx = new InitialContext();
                         if(ctx == null )
                     throw new Exception("Boom - No Context");
                           DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/myDB");     
                      conn = ds.getConnection();
                      stmt = conn.createStatement();                   
                      //get the POP3 and SMTP property values from db
                            rs = stmt.executeQuery("Select Tech_Support_Email, POP3, SMTP from sitewide_info");                                               
                            String hostemailaddress = "";
                            String POP3 = "";  //mail.smtp.host, this one 1st
                            String SMTP = ""; //smtp.stratos.net, this one 2nd
                            if(rs.next()) {
                               hostemailaddress = rs.getString(1);
                               POP3 = rs.getString(2);
                               SMTP = rs.getString(3);
                  // Specify the SMTP Host
                 Properties props = new Properties();                                           
                  //POP3 = mail.smtp.host & SMTP = smtp.stratos.net - must be in this order
                  props.put(POP3, SMTP);
                  // Create a mail session
                  Session ssn = Session.getDefaultInstance(props, null);
                  ssn.setDebug(true);                                            
                  String subject = "Testing out Email";
                  String body = "hello";
                  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  rs = stmt.executeQuery("Select Customer_Name, Email_Address from customer_profiles where "
                                                           +"Customer_Number=1111");
                             String fromName = "";
                             String fromEmail = "";
                             if(rs.next()) {
                                fromName = rs.getString(1);
                                fromEmail = rs.getString(2);
                  InternetAddress from = new InternetAddress(fromEmail,fromName);                                
                  String toName = "Bob";          
                  InternetAddress to = new InternetAddress(hostemailaddress,toName);             
                      // Create the message
                      Message msg = new MimeMessage(ssn);
                      msg.setFrom(from);
                      msg.addRecipient(Message.RecipientType.TO, to);
                      msg.setSubject(subject);
                      msg.setContent(body, "text/html");
                      Transport.send(msg);             
                  }//try
                   catch (MessagingException mex) {                     
                          mex.printStackTrace(); }
                   catch(Exception e) {}
            finally {         
                try {
                  if (rs!=null) rs.close();
                     catch(SQLException e){}             
                  try {
                  if (stmt!=null) stmt.close();
                     catch(SQLException e){}
                  try {
                  if (conn!=null) conn.close();
                     catch(SQLException e){}
            }//finally          
    %>                           
    Here's the servlet that won't compile :
    package testing.servlets.email;
    import java.io.*;
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.Message.RecipientType;
    import javax.mail.internet.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.naming.*;
    import javax.sql.*;
    import java.sql.*;
         public class MessageCenterServlet extends HttpServlet {
              public Connection conn = null;
              public Statement stmt = null;
              public Statement stmt2 = null;
              public ResultSet rs = null;
              public ResultSet rss = null;
              public PrintWriter out = null;
              public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
                   doPost(req,res);
              public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
                  try {               
                        out = res.getWriter();
                        Context ctx = new InitialContext();
                         if(ctx == null )
                     throw new Exception("Boom - No Context");
                           DataSource ds =
                     (DataSource)ctx.lookup(
                        "java:comp/env/jdbc/myDB");     
                      conn = ds.getConnection();
                      stmt = conn.createStatement(); 
                      stmt2 = conn.createStatement();                 
                      HttpSession session = req.getSession();                                                             
                         String Subject = (String)session.getAttribute("Subject");
                         String Message = (String)session.getAttribute("Message");
                         sendAnEmail(rs,stmt,Subject,Message,res);                                     
                        }//try
                      catch (Exception e) { }
                      finally { cleanup(rs,rss,stmt,stmt2,conn); }
              }//post       
             public void cleanup(ResultSet r, ResultSet rs, Statement s, Statement s2, Connection c){
                try {
                  if (r!=null) r.close();
                     catch(SQLException e){}
                  try {
                  if (rs!=null) rs.close();
                     catch(SQLException e){}
                  try {
                  if (s!=null) s.close();
                     catch(SQLException e){}
                  try {
                  if (s2!=null) s2.close();
                     catch(SQLException e){}
                  try {
                  if (c!=null) c.close();
                     catch(SQLException e){}
            }//cleanUp          
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                
            public void sendAnEmail(ResultSet rs, Statement stmt, String Subject,String Message, HttpServletResponse res) {          
                 try {               
                      //get the POP3 and SMTP property values from db
                            rs = stmt.executeQuery("Select Tech_Support_Email, POP3, SMTP from sitewide_info");                                               
                            String hostemailaddress = "";
                            String POP3 = "";
                            String SMTP = "";
                            if(rs.next()) {
                               hostemailaddress = rs.getString(1);
                               POP3 = rs.getString(2);
                               SMTP = rs.getString(3);
                  // Specify the SMTP Host
                 Properties props = new Properties();                                                         
                  props.put(POP3, SMTP);
                  // Create a mail session
                  Session ssn = Session.getDefaultInstance(props, null);
                  ssn.setDebug(true);                                            
                  String subject = "Testing out Email";
                  String body = "hello";
                  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  rs = stmt.executeQuery("Select Customer_Name, Email_Address from customer_profiles where "
                                                           +"Customer_Number=1111");
                             String fromName = "";
                             String fromEmail = "";
                             if(rs.next()) {
                                fromName = rs.getString(1);
                                fromEmail = rs.getString(2);
                  InternetAddress from = new InternetAddress(fromDealerEmail,fromDealerName);                    
                String toName = "Bob";                            
                InternetAddress to = new InternetAddress(hostemailaddress,toName);
                      // Create the message
                      Message msg = new MimeMessage(ssn);
                      msg.setFrom(from);
                      msg.setRecipient(Message.RecipientType.TO, to);
                      msg.setSubject(subject);
                      msg.setContent(body, "text/html");
                      Transport.send(msg);             
                  }//try
                   catch (MessagingException mex) {                     
                          mex.printStackTrace(); }
                   catch(Exception e) {}
                 }//end
    }//class              -Love2Java
    Edited by: Love2Java on Mar 11, 2008 9:15 PM

    I have similar problem
    I have the below code in Eclipse and I was able to compile and run it and everything works fine...
    but I have code over in Oracle Jdev and jdev is complaining that "Message.RecipientType.TO" is not found....
    I do have all the jars in the class path.... can't figure out what's wrong
    can some one plz help me out.
    import java.util.Date;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.mail.util.ByteArrayDataSource;
    public void postMail( String recipients, String subject,
    String message , String from) throws MessagingException
    boolean debug = false;
    //Set the host smtp address
    Properties props = new Properties();
    props.put("mail.smtp.host", "server");
    props.put("mail.smtp.auth", "true");
    Authenticator auth = new SMTPAuthenticator();
    Session session = Session.getDefaultInstance(props, auth);
    session.setDebug(debug);
    // create a message
    Message msg = new MimeMessage(session);
    // set the from and to address
    InternetAddress addressFrom = new InternetAddress(from);
    msg.setFrom(addressFrom);
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(recipients, false));
    // Setting the Subject and Content Type
    msg.setSubject(subject);
    msg.setContent(message, "text/plain");
    Transport.send(msg);
    private class SMTPAuthenticator extends javax.mail.Authenticator
    public PasswordAuthentication getPasswordAuthentication()
    String username ="user";
    String password = "pass";
    return new PasswordAuthentication(username, password);
    }

  • AIR app won't compile with custom icons

    My AIr app won't compile when I choose anything but the
    default icons. I created 4 pngs in Photoshop and it gives me the
    error: Useage error (incorrect arguments)
    Any help? I've tried using only 1 icon, all 4, and no icons.
    Only no icons works.

    You dont have to use the GUI to set it, you can use the air
    appliation XML.
    inside your air-app.xml file look for something like:
    <icon>
    <image128x128>icons/myIcon128.png</image128x128>
    <image48x48>icons/myIcon48.png</image48x48>
    <image32x32>icons/myIcon32.png</image32x32>
    <image16x16>icons/myIcon16.png</image16x16>
    </icon>
    if its not there add it, but replace the myIcon128.png with
    your 128 point png image etc.
    also the above assumes your icons are in a folder called
    "icons" in the same directory as your air file.
    Hope it helps.

  • JDeveloper 10.1.2.1 won't compile my code?

    Hi,
    I'm pretty new to JDeveloper, and Java in general.
    I've just downloaded and tried to run JDeveloper 10g (10.1.2.1.0, Build 1913) and I've having problems.
    When the application loads, I get a dialog message titled "Java Virtual Machine Launcher", with the message "Could not find the main class. Program will exit"
    JDeveloper then finishes loading.
    I've knocked up a quick JSP page, but it won't compile. I get the message "Internal compilation error, terminated with a fatal exception."
    Also, I've notived that if I go to Project Properties and try to look at Profiles->Development->Libraries, JDeveloper throws a NullPointerException.
    I've got JDeveloper 10.1.3 on my machine, and it has none of these problems?
    After looking around on the web, I'm thinking it might be a CLASS_PATH problem, but how can I confirm this, and how can I fix it?
    Any ideas on what is wrong would be appreciated?
    Thanks
    Thom

    Thanks thahn.
    That fixed the "Java Virtual Machine Launcher" error - I would never have thought spaces in the directory name could have caused this problem!
    The other problems remain though, so I still can't compile any code.

  • TS1702 I have ePub documents that won't open using iBooks, how can i get them formatted so that I can use them

    I have ePub documents that won't open using iBooks, how can i get them formatted so that I can use them

    You could try downloading a program called Calibre.  It is very good at converting files between formats.  I use it all the time to convert PDF's from work to read on iTunes when I don't want to have to keep zooming in and out to read the actual text. 
    I know that iBooks will read PDF's but they can get pretty squashed down some times. Especially if the original font was small to begin with.  So I run them through Calibre and then email them to my phone and open them in iBooks. 

  • SQL query won't compile based on DB role privileges

    Can someone give me an explanation why the SQL query in a report won't compile if an object is owned by another schema and the parsing schema is given privileges to the table via a role grant?
    Or to phrase it another way, why do we have to make direct grants on tables to the parsing schema for reports based on SQL queries that access tables in other schemas?
    Thanks in advance,
    Paul

    Paul - In Oracle, roles are not enabled during the execution of definer's rights stored procedures which is the environment in which all Application Express application code is parsed/executed. There are scads of posts about this topic in this forum.
    Scott

  • Robohelp for Word won't compile

     Hi,I've been trying to get one of my projects to work in Robohelp for Word. But the minute I create a second topic the compiled doen't work. there are no errors. the compilation just never starts. This also happens when I rename the first topic to something else.
    I have the following configurations:
    Robphelp for Word 7 build 145
    MS Office Work 2007
    windows XP professional with service pack 3
    I have deleted and started the project from scratch several times without any success. Any help would be highly appreciated
    Thanks
    Edna

    Hi,
    Thanks for your reply. The problem is there even with tutorial files and dummy projects.
    It seems that there is a problem with saving the document. If I don’t add anything the projects will compile problery. But the minute I change something it won't compile. When I want to close the word document I get a meesage saying if I would like Robohelp to save the document. If I press on "yes" nothing happens. If I press on "yes to all" nothing happens. Pressing on "no" closes the document.
    I have setup my word 2007 in a way so it will save .doc formats instead of .docx. But either way it makes no different the problem is with both file formats.

  • I won't be using the alias. Please delete it for me.

    i'm korean.
    no use "USA communities"
    I won't be using the alias. Please delete it for me.

    Just don't use it, there is no way to delete it.

  • Unable to compile using rmic

    Hello all
    I have successfully compiled files using javac. The path is set, so I just need to open a command prompt and simply type javac AddServerImpl.java and it compiles with out errors. I do not have to specify any path at all.
    But when I try to compile using rmic, that is where I have the problem. It simply says "error: Class AddServerImpl$.java not found. 1 error."
    I simply don't understand what the problem is. If the path can work with javac <name>, why can't it work with rmic.
    I have even tried copying the java files, to where the rmic file is present and then tried running rmic AddServerImpl. But it still does not work. I have even included the following line under the environment variables "setclass path = %classpath%c:\rmiproject\"
    A bit desparate of ideas.
    Thankyou

    If the path can work with javac <name>, why can't it work with rmic.Because javac takes a path to a filename. rmic takes a package-qualified classname. Different strokes.

Maybe you are looking for

  • Index not created but it still reserved space on the disk

    Hi all, I have got a problem with creating an index. I am using oracle 10.2 DB on Windows 2003 Server. There are several jobs that are running at night to collect data from another database. Therefor I am always dropping the indices (for faster inser

  • Error while activating multiple requests in ODS.

    Hi All, I get a "ORA-12801:  unable to extend temp segment" error while activating an ODS. The problem is I selected 7 requests for activation and my Basis guy tells me he cannot add any more files to the temp tablespace. I guess the solution would b

  • How much interfaces can be driven in "real-time" with a VI in LABVIEW 6i

    In my application I need to merged data from different devices hanging to my computer via different interface types. Each data set in to be specifically formatted in a file. Each data set comes a a rate of ~ 10 Hz. As acquisition devices I do have -

  • Is it possible to invert a movie file filmed vertically

    This may be stupid and u can tell me so, but I took some video on my digital camera however when I took it, I had the camera in a vertical position so of course the video saved the images in horizontal format as it does all video...silly me! Anyway t

  • Sort Messages in MessageArea

    I need to sort the messages in the messagearea in the following order: 1. Error 2.Warning 3.Success Is this possible? Best regards, Thomas