Java-Excel program not working

Hi,
Can anyone Help me?
Below is a small code snippet i used to read an excel file using the POI-HSSF API
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFCell;
import java.io.FileInputStream;
* This is a sample to Read an  Excel Sheet using
* Jakarta POI API
* @author  Elango Sundaram
* @version 1.0
public class ReadXL {
    /** Location where the Excel has to be read from. Note the forward Slash */
    public static String fileToBeRead="Read.xls";
    public static void main(String argv[]){      
        try{
                System.out.println("hai");
                    // Create a work book reference
                    HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(fileToBeRead));
                    // Refer to the sheet. Put the Name of the sheet to be referred from
                    // Alternative you can also refer the sheet by index using getSheetAt(int index)
                    HSSFSheet sheet = workbook.getSheet("Sheet1");
                    //Reading the TOP LEFT CELL
                    HSSFRow row = sheet.getRow(0);
                    // Create a cell ate index zero ( Top Left)
                    HSSFCell cell = row.getCell((short)0);
                    // Type the content
                    //System.out.println("THE TOP LEFT CELL--> " + cell.getStringCellValue());           
        }catch(Exception e) {
            System.out.println("!! Bang !! xlRead() : " + e );
}I have compiled in JAVA 1.5.0_09 under Solaris 5.10 platform
$ javac -cp poi-3.0.1-FINAL-20070705.jar  -Xlint:deprecation ReadXL.java
$ java ReadXL
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbookHow to proceed???

You need to add the directory where the ReadXL class is located.
java -cp .:poi-3.0.1-FINAL-20070705.jar ReadXLMessage was edited by:
RealHowTo

Similar Messages

  • Could not find an installed JDK, SCM Java Tools may not work until registry

    Hello all,
    I've downloaded the latest full version of Designer (10.1.2.3), but getting installation error: Could not find an installed JDK, SCM Java Tools may not work until registry
    Any solution?

    3. install the Designer 10.1.2.3 patch to the Developer suite home.When I try to do this at C:\oracle\product\Ora10gDSR2, I get a message OUI-10137: An Oracle Home with name OUIHome already exits at C:\OraHome (a directory that doesn't exist) please specify another name for Oracle Home.
    I don't want to just specify another name because cleaning up these faulty installations requires deleting registry keys, etc, since the deinstall does't really remove everything sufficiently to start with a clean slate.
    I also got the Java JDK message because the JDK 5 is no longer being put straight onto the C drive, it is buried in C:\Sun\SDK\jdk, so some java programs have to be pointed to it. The Oracle installer doesn't provide this option.
    Also, Michael, your post, "Re: Designer 10.1.2.3 on windows Xp Posted: Oct 20, 2007 7:05 AM in response to: mmehdi" is full of unreadable characters and question marks. Maybe I don't have a font you are using. There are also references to a zip file and a Word document that aren't there.
    Anyway, thanks for all your time and effort,
    Edward

  • Java script is not working in custom tabular form

    hai all,
    i have changed my built in tabular form to custom tabular form.my java script is coding working fine in built in tabular form . But in my custom tabular form java script is not working ,since it is created as standard report(Display As).
    pls help me.
    with thanks and regards
    sivakumar.G

    Is the appostrophe function test(pthis) *'* present in your javascript code...
    If not can you post the same in apex.oracle.com and give the credential so that I can the why its not wroking
    Regards,
    Shijesh

  • Java command still not working - please help

    i have installed jdk1.6.0_05. The javac command works fine but the java command does not work at all. even when i try java HelloWorld i receive this exception message
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    Caused by: java.lang.ClassNotFoundException: HelloWorld
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    please help (you to SUN)!!

    bart@kerberos:~$ javac -help
    Usage: javac <options> <source files>
    where possible options include:
      -g                         Generate all debugging info
      -g:none                    Generate no debugging info
      -g:{lines,vars,source}     Generate only some debugging info
      -nowarn                    Generate no warnings
      -verbose                   Output messages about what the compiler is doing
      -deprecation               Output source locations where deprecated APIs are used
      -classpath <path>          Specify where to find user class files and annotation processors
      -cp <path>                 Specify where to find user class files and annotation processors
      -sourcepath <path>         Specify where to find input source files
      -bootclasspath <path>      Override location of bootstrap class files
      -extdirs <dirs>            Override location of installed extensions
      -endorseddirs <dirs>       Override location of endorsed standards path
      -proc:{none,only}          Control whether annotation processing and/or compilation is done.
      -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
      -processorpath <path>      Specify where to find annotation processors
      -d <directory>             Specify where to place generated class files
      -s <directory>             Specify where to place generated source files
      -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
      -encoding <encoding>       Specify character encoding used by source files
      -source <release>          Provide source compatibility with specified release
      -target <release>          Generate class files for specific VM version
      -version                   Version information
      -help                      Print a synopsis of standard options
      -Akey[=value]              Options to pass to annotation processors
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime systemSee the bold part.
    More information: [http://java.sun.com/docs/books/tutorial/java/package/managingfiles.html]

  • 'Program not working' - panorama

    When I attempt to create a panorama using Photoshop Elements 9 on my recently purchased Windows 8.1 pc I get a message saying 'Program not Working' and I have to close the editor. This function was ok on my old Windows XP pc. Can anyone help?

    First, quit the editor, then restart it while holding down ctrl+alt+shift. Keep the keys down till you see a window asking if you want to delete the settings file. You do. Note that if you have set the welcome screen to automatically open the editor, it won't work from that shortcut. Use the actual .exe/application file or the buttons in the organizer or on the welcome screen.

  • I started to download Maverick but then read that Word and Excel do not work  with Maverick.  I hit pause on the download. How do I stop the download.  In non technical terms please!

    How do I stop the download of Maverick on my MacBookPro?  I started downloading then discovered that 2008 Word and Excel do not work  with Maverick. I have too many files in the 2008 version to upgrade them at this time.  I just need instructions in non technical terms to stop the Maverick download.

    I did the same as Tapmr and have paused the "upgrade".  So am I to understand that the upgrade only downloads and will not automatically install it?  I am an extreme novice here, and cannot afford any issues after I upgrade/download.  I don't know how to make a clone copy as you suggested either.
    I need assurance that if the upgrade is allowed to continue that I will be able to delete the upgrade downloaded and continue on as before with my regular system. 

  • My adobe is not working with Windows 7 it says "program not working"

    My adobe does not worked with I have tried 9 & 10 both versions. It does not seem to work with Windows 7.

    Adobe Reader X works very well on Windows 7.
    Please give us the exact error message you're getting; "program not working" is not a message that Windows or Adobe Reader would issue.

  • HT1338 Hi, as I shall correct Java for a new mountain ...? Java is currently not working at all Jarda

    Hi, as I shall correct Java for a new mountain ...?
    Java is currently not working at all
    Jarda

    Your question doesn't make much sense, so this is a WAG. Launch the Java Preferences.app in /Utilities, install the Java Runtime Environment when prompted, and, when that's finished, enable Java and Web Start apps.

  • Java program not working using newer version of scheduler (AutoSys)

    A little background: I'm in the middle of trying to upgrade our AutoSys server (scheduler) to the latest version (version R4 to R11) and have to do regression testing to ensure our jobs will work in the new version. There's a small java program that is not working supposedly due to the following error:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: com/f1j/swing/common/JDKAdapter
    at com.f1j.swing.common.Adapter.<clinit>(Adapter.java:86)
    at com.f1j.swing.engine.ss.JBook.<init>(JBook.java:3032)
    at com.f1j.swing.engine.ss.JBook.<init>(JBook.java:3096)
    at com.test.Foo.performScan(Foo.java:122)
    So in the old version (R4), it runs fine. In R11, I get the exception above. The CLASSPATH matches and I've verified that by echoing it in the shell script that calls the java program. Here's how it's called in the shell script.
    echo $CLASSPATH
    ${JAVA_HOME}/bin/java com.test.Foo
    So the Foo class was written by me, which makes use of this external library called f1j11swing.jar (for spreadsheet creation).
    The source of the error is from this line in Foo (line 122):
              book = new com.f1j.swing.engine.ss.JBook();
    The funny part is JDKAdapter (the missing class) is in the same jar file as JBook, so it definitely finds the library in the classpath. But for some reason, this new AutoSys version is spitting out this error. I've exhausted many approaches to resolving this, but I'm still stuck.
    Here's the layout of how things are called (should be same for R4 and R11):
    1. AutoSys server logs into client machine XYZ as user arnold
    2. arnold (AutoSys client) on XYZ executes shell script to call java program
    The only significant difference I see is that the AutoSys server in R4 is HP while the R11 server is Sun. However, it shouldn't matter because the client server they're logging into to execute the script is the same linux server.
    Does anyone have any ideas? I've already started dialogue with the vendor and it seems kind of in limbo at the moment. Please let me know if you need more info. Thanks.

    Hi DrClap,
    I just checked jre/lib/ext of my $JAVA_HOME and verified that there doesn't exist any library with a class named "Adapter." We don't put anything in this directory other than what came with the original installation. I've tried isolating the jars before as well, by doing something like (to no avail):
    java -cp /users/test/lib/f1j11swing.jar:/users/test/lib/Foo.jar com.test.Foo
    If I remove the f1jswing11.jar path in the above command, it will complain about other things. Also, for fun, I tried dropping f1j11swing.jar into the ext folder and removing it from the CLASSPATH and it yielded the original error. Running it directly from the shell and old version of autosys works fine.
    I hope I understood your suggestion correctly and please let me know if you have any other ideas. I'm surprised why java would act differently with a different version of an AutoSys client logging into the same machine and environment. Thanks.
    xiarce - I haven't heard anything regarding this, but I'll bring it up. Thanks.
    Edited by: user4170063 on Apr 13, 2011 2:25 PM

  • MySQL and Java - getting program to work

    I am setting up mysql to run sql from a Java program on my pc at home and probably biting off more than I can chew. I get these messages when executing the java program ExecuteSQL.java:
    Exception in thread "main" java.lang.NoClassDefFoundError: Test2 <wrong name: MyProjects/test2/Test2>
    at java.lang.ClassLoader.defineClass0<Native Method>
    at java.lang.ClassLoader.defineClass<Unknown Source>
    at java.security.SecurityClassLoader.defineClass<Unknown Source>
    at java.net.URLClassLoader.defineClass<Unknown Source>
    at java.net.URLClassLoader.access$100<Unknown Source>
    at java.net.URLClassLoader$1.run<Unknown Source>
    at java.security.AccessController.ddPrivileged<Native Method>
    at java.lang.ClassLoader.findClass<Unknown Source>
    at java.lang.ClassLoader.loadClass<Unknown Source>
    at sun.misc.Launcher$AppClassLoader.loadClass<Unknown Source>
    at java.lang.ClassLoader.loadClass<Unknown Source>
    at java.lang.ClassLoader.loadClassInternal<Unknown Source>
    This is what I did.
    I created a folder on my C: drive named MySQL.
    I downloaded these two zip files form the MySQL website
         * mysql-connector-java-3.0.11-stable
         * mysql-4.0.18-win.zip
    Installed both of these in folder MySQL.
    I modified this line in the program ("ExecuteSQL" 1st pgm in chapter 17) I got from "Java Examples In a Nutshell" and compiled it into directory jwork.
    String driver = "com.mysql.jdbc.driver", url = "jdbc:mysql://", user = "", password = "";
    The readme file talks about putting a jar file in $JAVA_HOME/jre/lib/ext.
    the word "Java_Home" (I now know) is not literally the name but represents the
    name of the folder where the JDK to be used exists. So I put a copy of
    mysql-connector-java-3.0.11-stable-bin.jar in folder C:\JDK14/jre/lib/ext.
    Then I get a ClassNotFoundException error com.mysql.jdbc.driver.
    After finding
    http://forum.java.sun.com/thread.jsp?forum=31&thread=439796
    and
    http://forum.java.sun.com/thread.jsp?forum=31&thread=499888
    and others, I copied (a second copy) the jar file to the directory where I am create my java objects.
    Then I unzipped it to that directory, creating three folders that hold the unzipped objects.
    I tried executing the program again. I get the messages at the top of this post.
    The Manifest file is in one of the three folders unzipped to my java work directory.
    In the second of the two above threads, jsalonen says:
    the problem can be solved by mentioning mysql.jar in the Class-Path attribute
    in the manifest of the jar file:
    In this "manifest" file, there are only three lines and I added a fourth and it looks like this
    (there are two, one in directory MySQL\META-INF and one in directory jwork\META-INF:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.1
    Created-By: 1.4.0_01-b03 (Sun Microsystems Inc.)
    Main-Class:jwork\ExecuteSQL
    How do I "mention" mysql.jar in the class path attribute?
    In the index.list file (in the directory with the manifest file, do I need to add anything to refer that "com.mysql.jdbc.driver" is the driver?
    Do I need index.list in MySQL\META-INF ?
    Thank you for your help. The program ExecuteSQL follows.
    * Copyright (c) 2000 David Flanagan. All rights reserved.
    * This code is from the book Java Examples in a Nutshell, 2nd Edition.
    * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied.
    * You may study, use, and modify it for any non-commercial purpose.
    * You may distribute it non-commercially as long as you retain this notice.
    * For a commercial use license, or to purchase the book (recommended),
    * visit http://www.davidflanagan.com/javaexamples2.
    /** package com.davidflanagan.examples.sql; */
    import java.sql.*;
    import java.io.*;
    * A general-purpose SQL interpreter program.
    public class ExecuteSQL {
    public static void main(String[] args) {
    Connection conn = null; // Our JDBC connection to the database server
    try {
    String driver = "com.mysql.jdbc.driver", url = "jdbc:mysql://",
    user = "", password = "";
    // Parse all the command-line arguments
    for(int n = 0; n < args.length; n++) {
    if (args[n].equals("-d")) driver = args[++n];
    else if (args[n].equals("-u")) user = args[++n];
    else if (args[n].equals("-p")) password = args[++n];
    else if (url == null) url = args[n];
    else throw new IllegalArgumentException("Unknown argument.");
    // The only required argument is the database URL.
    if (url == null)
    throw new IllegalArgumentException("No database specified");
    // If the user specified the classname for the DB driver, load
    // that class dynamically. This gives the driver the opportunity
    // to register itself with the DriverManager.
    if (driver != null) Class.forName(driver);
    // Now open a connection the specified database, using the
    // user-specified username and password, if any. The driver
    // manager will try all of the DB drivers it knows about to try to
    // parse the URL and connect to the DB server.
    conn = DriverManager.getConnection(url, user, password);
    // Now create the statement object we'll use to talk to the DB
    Statement s = conn.createStatement();
    // Get a stream to read from the console
    BufferedReader in =
              new BufferedReader(new InputStreamReader(System.in));
    // Loop forever, reading the user's queries and executing them
    while(true) {
    System.out.print("sql> "); // prompt the user
    System.out.flush(); // make the prompt appear now.
    String sql = in.readLine(); // get a line of input from user
    // Quit when the user types "quit".
    if ((sql == null) || sql.equals("quit")) break;
    // Ignore blank lines
    if (sql.length() == 0) continue;
    // Now, execute the user's line of SQL and display results.
    try {
    // We don't know if this is a query or some kind of
    // update, so we use execute() instead of executeQuery()
    // or executeUpdate() If the return value is true, it was
    // a query, else an update.
    boolean status = s.execute(sql);
              // Some complex SQL queries can return more than one set
              // of results, so loop until there are no more results
    do {
    if (status) { // it was a query and returns a ResultSet
    ResultSet rs = s.getResultSet(); // Get results
    printResultsTable(rs, System.out); // Display them
    else {
    // If the SQL command that was executed was some
    // kind of update rather than a query, then it
    // doesn't return a ResultSet. Instead, we just
    // print the number of rows that were affected.
    int numUpdates = s.getUpdateCount();
    System.out.println("Ok. " + numUpdates +
                             " rows affected.");
    // Now go see if there are even more results, and
    // continue the results display loop if there are.
    status = s.getMoreResults();
    } while(status || s.getUpdateCount() != -1);
    // If a SQLException is thrown, display an error message.
    // Note that SQLExceptions can have a general message and a
    // DB-specific message returned by getSQLState()
    catch (SQLException e) {
    System.err.println("SQLException: " + e.getMessage()+ ":" +
                        e.getSQLState());
    // Each time through this loop, check to see if there were any
    // warnings. Note that there can be a whole chain of warnings.
    finally { // print out any warnings that occurred
              SQLWarning w;
    for(w=conn.getWarnings(); w != null; w=w.getNextWarning())
    System.err.println("WARNING: " + w.getMessage() +
                             ":" + w.getSQLState());
    // Handle exceptions that occur during argument parsing, database
    // connection setup, etc. For SQLExceptions, print the details.
    catch (Exception e) {
    System.err.println(e);
    if (e instanceof SQLException)
    System.err.println("SQL State: " +
                        ((SQLException)e).getSQLState());
    System.err.println("Usage: java ExecuteSQL [-d <driver>] " +
                   "[-u <user>] [-p <password>] <database URL>");
    // Be sure to always close the database connection when we exit,
    // whether we exit because the user types 'quit' or because of an
    // exception thrown while setting things up. Closing this connection
    // also implicitly closes any open statements and result sets
    // associated with it.
    finally {
    try { conn.close(); } catch (Exception e) {}
    * This method attempts to output the contents of a ResultSet in a
    * textual table. It relies on the ResultSetMetaData class, but a fair
    * bit of the code is simple string manipulation.
    static void printResultsTable(ResultSet rs, OutputStream output)
         throws SQLException
    // Set up the output stream
    PrintWriter out = new PrintWriter(output);
    // Get some "meta data" (column names, etc.) about the results
    ResultSetMetaData metadata = rs.getMetaData();
    // Variables to hold important data about the table to be displayed
    int numcols = metadata.getColumnCount(); // how many columns
    String[] labels = new String[numcols]; // the column labels
    int[] colwidths = new int[numcols]; // the width of each
    int[] colpos = new int[numcols]; // start position of each
    int linewidth; // total width of table
    // Figure out how wide the columns are, where each one begins,
    // how wide each row of the table will be, etc.
    linewidth = 1; // for the initial '|'.
    for(int i = 0; i < numcols; i++) {             // for each column
    colpos[i] = linewidth; // save its position
    labels[i] = metadata.getColumnLabel(i+1); // get its label
    // Get the column width. If the db doesn't report one, guess
    // 30 characters. Then check the length of the label, and use
    // it if it is larger than the column width
    int size = metadata.getColumnDisplaySize(i+1);
    if (size == -1) size = 30; // Some drivers return -1...
         if (size > 500) size = 30; // Don't allow unreasonable sizes
    int labelsize = labels.length();
    if (labelsize > size) size = labelsize;
    colwidths[i] = size + 1; // save the column the size
    linewidth += colwidths[i] + 2; // increment total size
    // Create a horizontal divider line we use in the table.
    // Also create a blank line that is the initial value of each
    // line of the table
    StringBuffer divider = new StringBuffer(linewidth);
    StringBuffer blankline = new StringBuffer(linewidth);
    for(int i = 0; i < linewidth; i++) {
    divider.insert(i, '-');
    blankline.insert(i, " ");
    // Put special marks in the divider line at the column positions
    for(int i=0; i<numcols; i++) divider.setCharAt(colpos[i]-1,'+');
    divider.setCharAt(linewidth-1, '+');
    // Begin the table output with a divider line
    out.println(divider);
    // The next line of the table contains the column labels.
    // Begin with a blank line, and put the column names and column
    // divider characters "|" into it. overwrite() is defined below.
    StringBuffer line = new StringBuffer(blankline.toString());
    line.setCharAt(0, '|');
    for(int i = 0; i < numcols; i++) {
    int pos = colpos[i] + 1 + (colwidths[i]-labels[i].length())/2;
    overwrite(line, pos, labels[i]);
    overwrite(line, colpos[i] + colwidths[i], " |");
    // Then output the line of column labels and another divider
    out.println(line);
    out.println(divider);
    // Now, output the table data. Loop through the ResultSet, using
    // the next() method to get the rows one at a time. Obtain the
    // value of each column with getObject(), and output it, much as
    // we did for the column labels above.
    while(rs.next()) {
    line = new StringBuffer(blankline.toString());
    line.setCharAt(0, '|');
    for(int i = 0; i < numcols; i++) {
    Object value = rs.getObject(i+1);
              if (value != null)
              overwrite(line, colpos[i] + 1, value.toString().trim());
    overwrite(line, colpos[i] + colwidths[i], " |");
    out.println(line);
    // Finally, end the table with one last divider line.
    out.println(divider);
    out.flush();
    /** This utility method is used when printing the table of results */
    static void overwrite(StringBuffer b, int pos, String s) {
    int slen = s.length(); // string length
    int blen = b.length(); // buffer length
    if (pos+slen > blen) slen = blen-pos; // does it fit?
    for(int i = 0; i < slen; i++) // copy string into buffer
    b.setCharAt(pos+i, s.charAt(i));

    Don't put those JARs in the lib/ext directory. Only language extensions (e.g., packages that start with "javax") belong in there.
    Learn how to set the CLASSPATH properly for starters:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html
    You might want to look at the JDBC tutorial, too:
    http://java.sun.com/docs/books/tutorial/jdbc/
    Do one thing at a time. Get the program to work, then worry about packaging it into an executable JAR.

  • Java Web Start not working with Proxy

    I have Java Web Start program not listening to proxy settings. It tries to access localhost using our proxy settings, but with no user name or password. I'm wondering if Java Web Start has proxy settings somewhere. I'm not sure since when we disable the proxy settings the program works without issue. Any thoughts?
    Thanks

    For instance Safari uses those System Proxy settings, Firefox uses it's own!
    So Java is using it's own, now we're waiting for an expert to drop in!

  • WD java-Blackberry link not working

    Hi,
    I have a application which has two links that the user gets via a mail which is trigered automatically once the billing form is saved for approval (Mangaer gets the mail which on clicking opens a wd java application).
    1. For general user and other
    2.For Blackberry users.
    This application was working properly with previous versions of ECC.But after a recent patch update ECC 6.0 EHP4,the blackberry link is not working properly.After searching the sdn I came to know that the recent update allows only encrypted url
    to be sent and decrypted at the server (/thread/1769302 [original link is broken]).
    Please suggest me how do i get the url as per the current ECC EHP4 patch so that the approver on clicking the blackberry link will be directed to the Webdynpro application that we have developed.
    Please suggest.
    Regards,
    Ranjan.

    Well I am sure it will get fixed, the big question is when ? I like you have a Blackberry phone and a Mac Book Pro and did not update to Yosemite yet but it is only a matter of time as there will be no more updates for Mavericks and Apple keeps popping up reminding me every time I open a program.
    Things move too fast today and everyone wants to be the best so the upgrades just keep coming and coming giving us little time to adjust and making others play catch-up and there seems to be many more issues that have to be fixed.
    When they do get fixed along comes another upgrade and it starts all over again. Change is good but I think most people will opt out of change for reliability.
    Please let me know how Media sync works and don't forget you can still use BB Device Manager for most things but not all.
    I use only BB Device Manager as my Contacts and Calendar are backed up at MSN.

  • Java -Xmx command not working

    Hye
    I am using Eclipse Version: 3.1.2
    and JDK 5 . My Web project is giving my Java Heap Space error on heavy load.
    I know that -Xmx command will increase the heap size but the command is not working with eclipse
    can anyone tell me how to do it in Eclipse?
    by the way -Xmx command is working on command program but for only one program.
    And how can i Increase the heap space for all projects.?
    Thanks in Advance

    What exactly are you typing? Is it just
    java -Xms128m -Xmx256m?
    You do need to provide a class name, you know. You can't just type the above to have it change some global setting that applies to all future VM invocations. You'll have to either add the -Xms and -Xmx to the script that starts tomcat, or in whatever configuration file or options you're using for tomcat.
    It might be a properties file or something, or a .bat file, or if you're starting tomcat as a service, there might be a task bar tray thingy that lets you configure tomcat.

  • Keycode display program not working

    Hey, I wrote this code that detects the keycodes then displays them into the status bar and in the applet window, This worked fine. I then added an if statement so it would display the message "ESC KEY" if the Esc key was pressed I can't find any reason why i'ts not working i've tried putting the if statement in many different places in the program but it still won't work. I am definately saving it.
    Can anyone help?
    <CODE>
    // Luke Mildenhall-Ward
    // KeyCode Display program
    // December 2002
    // Imports
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class Pong3 extends Applet implements Runnable, KeyListener
    // Variable declaring
    public String message;
    public int keyCode;
    public Thread pongt = null;
    // Initialisation
    public void init()
    addKeyListener(this);
    pongt = new Thread(this);
    pongt.start();
    // Key Listening
    public void keyTyped(KeyEvent key) {}
    public void keyReleased(KeyEvent key) {}
    public void keyPressed(KeyEvent key)
    try
    keyCode = key.getKeyCode();
    // THIS IS THE (if) PART THAT I'VE RECENTLY ADDED:
    if (keyCode == 27) {
    message = "ESC KEY";
    else {
    message = "Key = " + keyCode;
    catch (Exception ex) {}
    // Start
    public void start()
    if (pongt == null)
    pongt = new Thread(this,"pongt");
    pongt.start();
    // Stop
    public void stop()
    pongt = null;
    // Run
    public void run()
    Thread thisThread = Thread.currentThread();
    while (pongt == thisThread)
    // Status bar
    showStatus(message);
    try {Thread.sleep(20);}
    catch (InterruptedException e){}
    // Issuing repaint
    repaint();
    // Painting
    public void paint (Graphics g)
    g.drawString(message, 100, 100);
    </CODE>

    Note that you can use the getKeyText() method to get the 'name' of the key automatically.     
    public void keyPressed(KeyEvent e)
              System.out.println("PRESSED: " + e.getKeyText(e.getKeyCode()) + "\n");
         }

  • Upload Excel is not working

    Hi all, Excel upload program is not working in SAP CRM 7.2 Service Pack 10 with IE 11. Same is working fine in SP08. Below is the code.
    The debugger is not coming into Servervent handler method . any notes suggested ? sorry for posting the big code lines.
    <thtmlb:fileUpload id="fileUpDown" />
    <thtmlb:button id = "UPLOAD"
                    iconSrc = "ICON_XLS"
                    tooltip = "Upload Excel file"
                    text = "Upload"
                    onClick =  "upload_file( );" />--%>
      <thtmlb:textArea id  = "Excel_Data"
          text   = " "
          width  = "0"
          height = "0"
          rows   = "0" />
    <%-- Registering server event--%>
    <bsp:htmlbEvent name = "nameUpload"
                      id = "idUpload"
                      onClick = "SERVEREVENT"
    <%--                 serverEvent"--%>
                      p1 = "p1"
                      p2 = "p2"
                       p3 = "p3" />
    <script language="javascript"  type="text/javascript">
    function upload_file( ){
    var iRow="1",
          jCol="1",
          ActiveRows="0",
          fileName="",
          sValue=" ";
    fileName=document.getElementById("<%= controller->component_id %>_fileUpDown").value;
    if ( fileName == "" ) {
    alert("Upload." + "\n" + " " + "\n" + "Please choose an Excel file as source.");
    return;
    if ( fileName != "") {
    <%--alert("Upload." + "\n" + " " + "\n" + "This file is to be uploaded:" + "\n" + fileName);--%>
    var r=confirm("Upload." + "\n" + " " + "\n" + "This file is to be uploaded:" + "\n" + fileName);
    if (r!=true)
    return;
    Excel = new ActiveXObject("Excel.Application");
    Book = Excel.Workbooks.Open( fileName );
    ActiveRows = Book.Worksheets("Input").Range("A1.IV64000").CurrentRegion.Rows.Count;
    <%--ActiveRows = Range("A1.IV64000").CurrentRegion.Rows.Count;--%>
    for (iRow=1; iRow<=ActiveRows; iRow++) {
    for (jCol=1; jCol<=4; jCol++) {
    cData = Book.Worksheets("Input").Cells(iRow,jCol).value;
    <%--cData = Cells(iRow,jCol).value;--%>
    sValue = sValue.concat(cData,"\n");
    sValue = sValue.concat("\n\r");
    document.getElementById("<%= controller->component_id %>_Excel_Data").value = sValue;
    Excel.Workbooks.Close;
    <%--return statement here calls the server event SERVERVENT--%>
      return nameUpload();
    </script>
    regards,rama

    Hello all,
    Excel = new ActiveXObject("Excel.Application");
    the above statement is not working in Service pack 10 CRM 7.2.  any help is appropriated
    thanks,rama

Maybe you are looking for

  • Posting period problem in BAPI_ACC_DOCUMENT_POST

    I am using BAPI_ACC_DOCUMENT_POST to post documents for AR.It works fine in all the scenarios except when 2 posting periods are open.The previous posting period is open till 1st week of next month.I want to post in the 1st week for the previous posti

  • HT5538 Broke my iPhone so i want to use my iPod touch for imessaging but my imessages wont send

    I broke my iPhone and I would like to use my iPod to send iMessages, except everytime i try and send a message they won't deliver. My iPhone and iPod accounts are linked.... so not sure why this is happening. I went into messages settings and made su

  • Ringtones function not available on my iTunes

    I do not have ringtone functions on my iTunes, I've updated to latest versions, completely uninstalled everything apple or iTune related on my computer, and redownloaded, and still can't get the functions! Flatmates version has right click - create r

  • Search Not Working for Several Users

    We are running GW 7.0.1, several users have lost the ability to search. GWCheck was run on the user and message database, but this did not resolve the issue. Any help would be greatly appreciated. thanks ed

  • Has anybody else noticed a 10-25% openGL slow down with 10.7.5?

    Hi,  I was running x-plane 9.70 at certain settings on my 17" MBP (early 2011, 10.7.3) and noticed I was getting about 70 fps... nice.  I do an update on firmware and OS (10.7.5) and I notice that the x-plane fps has dropped to about 55. The settings