Tomcat Startup problems using eclipse

Hello together!
I want to create a JSP page in eclipse.
I use eclipse-wtp-1.0 and tomcat 5.5.12.
I have set the JAVA_HOME, TOMCAT_HOME and CATALINA HOME.
I included this 2 directories in eclipse.
But now I get the following error:
23.02.2006 08:37:31 org.apache.catalina.startup.Catalina load
WARNUNG: Can't load server.xml
23.02.2006 08:37:31 org.apache.catalina.startup.Catalina load
WARNUNG: Can't load server.xml
23.02.2006 08:37:31 org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by: java.lang.NullPointerException
     at org.apache.catalina.startup.Catalina.await(Catalina.java:600)
     at org.apache.catalina.startup.Catalina.start(Catalina.java:560)
     ... 6 more
Could anybody pls help me.
Thanks a lot.

The first posting was refering to a java project.
Now I tried to make a dynamic web project.
There i have the mistake:
First a pop up appears and says: Could not fid the main class. Programm will exit.
and then:
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap
Exception in thread "main"
Does anybody know how I create a project (JSP/JSF), so that I can start the page with for example tomcat.
If one of you has a toturial where there are exactly the versions written, as I did everything refering to an toturial.
Pls give advice, how to get it started.
Thanks in advance.

Similar Messages

  • Problem using eclipse

    Hi,
    I am trying to use Eclipse but I encountered some problems. I drag and drop an application of mine, into a Java project in Eclipse, I try to run and I get :
    Usage: javaw [-options] class [args...]
               (to execute a class)
       or  javaw [-options] -jar jarfile [args...]
               (to execute a jar file)
    where options include:
        -client       to select the "client" VM
        -server       to select the "server" VM
        -hotspot       is a synonym for the "client" VM  [deprecated]
    .Whats that about?

    I think it would be better to build a new project in Eclipse with the same name as your old project, and with the same java class names as your old project (with no content) in a similiar package structure (this is especially easy if the project is small). Then copy/paste the contents of the java classes into the ones in Eclipse. Then add the jar files to the lib folder that are missing (then add them to the project via the menu buy right clicking on the project icon, going to properties, etc).
    Drag/dropping a project into eclipse will probably not configure the missing jar files, etc that Eclpise needs. Note if your project is a tomcat project, then in eclpise, create a tomcat project and configure its settings such as where the tomcat server is located and what version of java jdk your using for the project.
    However, if you have an already existing Eclipse project you only need to 'import' the project via the Eclpise menu.

  • Jdk 1.5.0_04 and Eclipse with SuSE Linux - startup problems with Eclipse

    Hi,
    I have SuSE Linux 9.3 and just downloaded Jdk 1.5.0_04 and Eclipse IDE 3.1 for Linux.
    I have sucessfully installed Java in the following directory under Linux:
    '/usr/java/jdk1.5.0_04'
    And I also have downloaded Eclipse IDE 3.1 for Linux. I have unzipped it into the following directory:
    '/home/juergenkemeter/bin/eclipse/eclipse
    I have chosen the upper Java JRE in the Eclipse preferences.
    Now to my problem:
    Sometimes it happens that when I startup Eclipse or try to runa java program, Eclipse is shut down with a) no comment at all, or b) with an error message "JVM terminated. Exit code = 1 (...)". I can send the picture of the whole screenshot of the error message if it helps.
    Now I think that this is due to wrong installation paths of the Jdk and Eclipse?! Perhaps there are some conflicts regarding user rights (admin and the normal user 'juergenkemeter'.
    If anyone has suggestions, that would be helpful. Its nasty when Eclipse shuts down while programming...
    cheers,
    J�rgen

    I only used the getSystemResource because it is slightly more convenient. The
    getResource version requires a "/" in front of the filename, as in:
    java.net.URL imageURL = getClass().getResource("/" + imageName);
    System.out.println("Loading icon: " + imageName);
    for (int i = 0; i < 32000; i++)
    System.out.println(i);
    icon = new ImageIcon(imageURL);
    Unfortunately, this still deadlocks after a few thousand hits.
    Of course, I don't need thousands of icons in my application, but the real-world issue is that the program locks up every few times it is started, which is a real drag for the customers!
    I suppose the InputStream way would work, though it is not very elegant compared to loading the resource in the usual manner. I'll try it if there are no other suggestions.
    Thanks,
    Dan

  • Tomcat startup problem

    Hi all!!
    I'm using a BOE XI 3.1 SP2 with Apache Tomcat Was, in a Windows 2003 VMware image...
    I'm having problems starting tomcat.... It's really slow... and I don't know what to do.
    I've tried to modify the tomcat configuration, adding more maximum memmory pool... and I have the same problem
    any idea???
    thanks to all!!

    I typically set my tomcat memory in the tomcat configuration/java options tab to 384 min/max
    I do this because my BM's are set to only run on 768 memory. Also I turn off any unused services in the CMC and make sure they do not start by default (pm services, voyager etc). By default tomcat tries to grab up to 1 gig memory and if your VM doesn't have that available you will see slowness. Also to note tomcat 5.5 in general is much slower than the old 5.0 version that was in XIR2.
    Regards,
    Tim

  • Tomcat startup problem Win98

    Hello Friends,
    I am trying to start up Tomcat server, but keep getting error that TOMCAT_HOME is not set. I am using Windows 98. I tried to set the Tomcat_home using
    SET TOMCAT_HOME = C:\Tomcat in autoexec.bat
    but it gives error - out of enviromental space
    How can I set this env. variable? or increase env. space on win98?
    Thank you.

    Hi,
    Thanks for your reply.
    Buy I still get the following error:
    startup.bat -->
    Out of enviroment space
    Out of enviroment space
    Unable to determine value of TOMCAT_HOME
    In my autoexec.bat I have created teh following variables:
    SET CLASSPATH = ".;D:\work\Java\jdk1.3.1\lib;D:\work\Java\jdk1.3.1\lib\dt.jar;dt.jar;D:\work\Java\jdk1.3.1\lib\jvm.jar;jvm.jar;D:\work\Java\jdk1.3.1\lib\jawt.jar;jawt.jar;D:\work\Java\jdk1.3.1\lib\tools.jar;tools.jar"
    SET TOMCAT_HOME = "D:\Programs\jakarta-tomcat-3.2.2"
    SET JAVA_HOME = "D:\work\Java\jdk1.3.1"
    Have no clue ...

  • Tomcat Startup Problem with coyoteconnector

    I am a newbie java person and have installed the tomcat files.
    When I run startup I get the following error;
    Classnotfoundexception on the CoyoteConnector.
    I have the classpath pointing to all and sundry but it still does not see it.
    c:\jdk;C:\jdk\lib\tools2.jar;C:\jdk\lib;c:\tomcat4.1;C:\TOMCAT4.1\server\lib\tomcat-coyote.jar;c:\tomcat4.1\common\lib\servlet.jar;.
    JAVA_HOME=C:\jdk
    Any ideas?

    This is the actual error log;
    Using CATALINA_BASE: c:\tomcat4.1
    Using CATALINA_HOME: c:\tomcat4.1
    Using CATALINA_TMPDIR: c:\tomcat4.1\temp
    Using JAVA_HOME: C:\jdk
    Using CLASSPATH: c:\jdk;c:\tomcat4.1;C:\TOMCAT4.1\server\lib\tomcat-coyote.jar:.;c:\jspwork;.;c:\tomcat4.1\bin\bootstrap.jar
    Initializing jdb...
    run org.apache.catalina.startup.Bootstrap start
    VM Started: ERROR reading c:\tomcat4.1\conf\server.xml
    At Line 90 /Server/Service/Connector/ className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=20000 useURIValidationHack=false
    Catalina.start: java.lang.ClassNotFoundException: org.apache.coyote.tomcat4.CoyoteConnector
    java.lang.ClassNotFoundException: org.apache.coyote.tomcat4.CoyoteConnector
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:120)
         at org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:616)
         at org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412)
         at org.apache.catalina.util.xml.XmlMapper.startElement(XmlMapper.java:91)
         at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:333)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
         at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
         at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:362)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:301)
         at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
    The application exited

  • Tomcat StartUp Problems

    I have included all the jars in my classpath including j2ee.jars,myfaces-api.jar,myfaces-impl.jar etc. but still starting tomcat through eclipse,
    I am getting the following error:
    SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
    java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

    the jar under the common/lib of your tomcat named servlet-api contains the class ServletContextListener. Do you have the jar placed appropriately?

  • Tomcat startup problem - UserDatabase

    Hi,
    I' unable to start Tomcat. I've installed Tomcat 5.5 on Suse 9.0 Linux and have basically the standard configuration.
    The log file says
    "Exception looking up UserDatabase under key UserDatabase" and
    "No UserDatabase component found under key UserDatabase"I've attached the complete message and my server.xml.
    Any help is very appreciated since I'm completely stuck.
    Many thanks!
    Complete error message:
    2006-01-25 12:54:14,968 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina] - Exception looking up UserDatabase under key UserDatabase
    javax.naming.NamingException: Cannot create resource instance
    at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:132)
    at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
    at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:250)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    2006-01-25 12:54:14,969 [main] ERROR org.apache.catalina.startup.Catalina - Catalina.start:
    LifecycleException: No UserDatabase component found under key UserDatabase
    at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:258)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Server.xml
    <Server port="8005" shutdown="SHUTDOWN" debug="0">
    <Listener
    className="org.apache.catalina.mbeans.ServerLifecycleListener"
    debug="0"/>
    <Listener
    className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
    debug="0"/>
    <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="Benutzerdatenbank, die aktualisiert und
    gespeichert werden kann">
    </Resource>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    </ResourceParams>
    </GlobalNamingResources>
    <Service name="Catalina">
    <Connector port="8080"
    maxThreads="150" minSpareThreads="25"
    maxSpareThreads="75"
    enableLookups="false" redirectPort="8443"
    acceptCount="100"
    debug="0" connectionTimeout="20000"
    disableUploadTimeout="true" />
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" debug="0"
    protocol="AJP/1.3" />
    <Engine name="Catalina" defaultHost="localhost" debug="0">
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
    debug="0" resourceName="UserDatabase"/>
    <Host name="localhost" debug="0" appBase="/data/server/_tomcat_webapps"
    unpackWARs="true" autoDeploy="true" deployOnStartup="true">
    </Host>
    </Engine>
    </Service>
    </Server>
    ----

    This could be related to any connection pooling you are attempting.

  • Using Eclipse instead of XCode/Visual C++ ?

    Hello everybody,
    I am pretty sure this question has already been asked, but I can't get any answer.
    Why does Adobe recommend (and distribute samples) based on XCode and Visual C++? Why is there no documentation/projects based on Eclipse ? I can't see any problems using Eclipse, excepted Xcode/Visual C++ based sample projects and docs.
    I have been working for monthes on Eclipse and I can only see advantages using it :
    Cross-platform : no need to have Windows and OSX projects.
    More functionalities : What about functionality such as call hierarchy, classes navigator, automatic suggestions... ?
    Better integration : CPPUnit, Maven... What a wonderful world out of reach !
    Has anyone among you ever tried to use Eclipse for InDesign plugin development ? What were the problems ? Why Adobe does not event mention the possibility to develop with Eclipse ? Is it really difficult to migrate to Eclipse projects ?
    I'd like to read your feedbacks
    Thanks in advance.
    Regards

    Hello,
    Yes, you can use still use the plugin.
    Refer "http://www.oracle.com/technology/products/enterprise-pack-for-eclipse/index.html".
    thanks

  • Running Tomcat using Eclipse

    Hello all,
    I think I have done the needful regarding putting Tomcat into the Eclipse IDE.At the End I would like to test a simple jsp.I press on the "tomcat" button , tomcat startup button, in the console window i dont get the usual startup things that are specified in the below link.
    http://www-106.ibm.com/developerworks/opensource/library/os-ectom/?ca=dgr-jw03os-ectom
    Kindly let me know in as much detail as possible as to what could have gone wrong.
    Help would be greatly appreciated.
    Thanks
    AS

    try:
    http://www.eclipse.org/search/search.cgi
    with tomcat as searchwordThanks for the advice, will try it.
    AS

  • Problems with Eclipse-Plugin when using JPA in JavaFX

    Hi all,
    I am trying to develop a small JavaFX application with JPA using Eclipse and the FX-Plugin.
    Since I cannot use Annotations in FX code I created Java entity classes that are shadowed by the corresponding FX entities. To associate the Java and FX entites with each other I added a new member to the FX entity of the type of the Java entity. Suprisingly I now get errors that the FX entity cannot resolve the javax.perisistence classes. Those classes are imported in the Java entites without any errors. All entities are in the same package, so I really suspect it's the plugin's fault.
    Has anyone experience with this problem?
    Thanks,
    Chris

    There's something wrong with your code. You need to analyse it.

  • URGENT:STARTUP PROBLEM TOMCAT 4.1.18

    Hi,
    I have win2kprofessional(service pack2) on my pc. I am trying to work with tomcat 4.1.18. I have set the following env variables as per the manual.
    JAVA_HOME=c:\jdk1.2.2
    CATALINA_HOME=c:\jakarta-tomcat-4.1.18
    I don't have any firewalls or any other servers running on port 8080.
    I am getting the following error after executing \bin\startup.bat
    Using CATALINA_BASE: C:\jakarta-tomcat-4.1.18
    Using CATALINA_HOME: C:\jakarta-tomcat-4.1.18
    Using CATALINA_TMPDIR: C:\jakarta-tomcat-4.1.18\temp
    Using JAVA_HOME: C:\jdk1.2.2
    Bootstrap: Class loader creation threw exception
    java.lang.IllegalMonitorStateException: current thread not owner
    at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java, Comp
    at org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.java, Compiled Code)
    at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java, Compiled
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java, Compiled Code)
    Can any one help me out??
    thanx in advance,
    RK

    Are you using the Administrator login (of Win2K)

  • Problem Exporting .Jar Using Eclipse

    I have a small problem of exporting using Eclipse 3.2
    First , i could , debug , run as application with no problem.
    however after i compiled into jar , and i tried opening the jar file
    theres no responses. what could possibly be the problem ?
    my manifest file includes the main class of program and all external .jar files.
    below is my main class
    -automatic batch printing
    -able to select target folder for batch printing
    -able to select interval for printing
    -able to stop printing
    -includes log of activity of threads and printing services
    -free for all to use =D
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Desktop;
    import java.awt.Graphics;
    import javax.swing.JFileChooser;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import java.io.*;
    import java.util.*;
    import java.util.Timer;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    import javax.swing.filechooser.FileFilter;
    import javax.print.*;
    import java.lang.Object;
    import java.awt.JobAttributes.*;
    import javax.swing.text.*;
    import javax.swing.text.html.HTMLDocument;
    import javax.swing.text.rtf.*;
    import java.awt.Dimension;
    import javax.swing.JEditorPane;
    import java.awt.Rectangle;
    import javax.swing.JOptionPane;
    import javax.swing.JScrollPane;
    import javax.swing.JButton;
    import javax.swing.JTextPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JCheckBox;
    import javax.swing.JLabel;
    import javax.swing.SwingUtilities;
    import java.awt.Font;
    public class Test extends JFrame implements Printable{
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;  //  @jve:decl-index=0:visual-constraint="36,9"
         private JButton Open = null;
          Date date;
           class MyFilter extends javax.swing.filechooser.FileFilter {
                 public boolean accept(File file) {
                     String filename = file.getName();
                             if(file.isDirectory()){
                          return true;
                     }else{
                          return filename.endsWith(".rtf");
                 public String getDescription() {
                     return "Rich Text Format ( .rtf ) ";
         public Test() {
              super();
              initialize();
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        Test application = new Test();
                        application.show();
                        application.setLocationRelativeTo(null);
                        application.setVisible(true);
                        application.getJContentPane().setVisible(true);
         private void initialize() {     
              this.setSize(408, 282);
              this.setResizable(false);
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setContentPane(getJContentPane());
              this.setTitle("Auto Print Utility");
              this.setVisible(true);
          * This method initializes jContentPane
          * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jLabel1 = new JLabel();
                   jLabel1.setBounds(new Rectangle(131, 102, 59, 16));
                   jLabel1.setFont(new Font("Apple Chancery", Font.PLAIN, 10));
                   jLabel1.setText("MilliSeconds");
                   jLabel = new JLabel();
                   jLabel.setBounds(new Rectangle(16, 103, 53, 16));
                   jLabel.setText("Interval :");
                   jContentPane = new JPanel();
                   jContentPane.setLayout(null);
                   jContentPane.add(getOpen(), null);
                   jContentPane.add(getStop(), null);
                   jContentPane.add(getJTextField(), null);
                   jContentPane.add(getJScrollPane(), null);
                   jContentPane.add(getJScrollPane1(), null);
                   jContentPane.add(getJTextField1(), null);
                   jContentPane.add(jLabel, null);
                   jContentPane.add(jLabel1, null);
                   jContentPane.add(getJButton(), null);
              return jContentPane;
         static void printPrinterJob() {               
                    PrinterJob printerjob = PrinterJob.getPrinterJob();
                    // set the characteristics of
                    // the job to be printed - use setPageable and book if
                    // outputing a document. Use setPrintable for "simple" printing - all pages formatted the same
                    printerjob.setPrintable(new Test());
                    try {
                      PrintService[] ser =PrinterJob.lookupPrintServices();
                         ReadRegistry rr = new ReadRegistry();
                     int x =ser.length;
                      //  String def = rr.getPrinter();
                     String def ="Microsoft Office Document Image Writer";
                     for(int y=0;y<x;y++){
                         if(ser[y].getName().equals(def)){
                             printerjob.setPrintService(ser[y]);
                             System.out.println(ser[y]+" SET");
                         }else
                     System.out.println(ser[y]);
                    } catch (PrinterException exception) {
                       System.err.println("Printing error: " + exception);
       public static void disableDoubleBuffering(Component c) {
                  RepaintManager currentManager = RepaintManager.currentManager(c);
                  currentManager.setDoubleBufferingEnabled(false);
      public static void enableDoubleBuffering(Component c) {
                  RepaintManager currentManager = RepaintManager.currentManager(c);
                  currentManager.setDoubleBufferingEnabled(true);
      public boolean printfolder(){
              Desktop de = Desktop.getDesktop();
              java.io.File folder = new File(jTextField.getText());
              File[] listOfFiles = folder.listFiles();
               for (int i = 0; i < listOfFiles.length; i++) {
                    if (listOfFiles.isFile()) {
                        try {
                                  de.print(listOfFiles[i].getAbsoluteFile());
                                  File fi = new File(jTextField.getText()+"\\Deleted");
                                  fi.mkdir();
                                  Thread.currentThread().sleep(1000);
                                  listOfFiles[i].renameTo(new File("Z:\\BTSS Log\\Fax\\Y2007 M10 D25\\Deleted",listOfFiles[i].getName().toString()));
                             } catch (Exception e1) {
                                  // TODO Auto-generated catch block
                                  e1.printStackTrace();
              System.out.println("File: " + listOfFiles[i].getName());
              date = new Date();
              PrintLog.append("Printed : "+listOfFiles[i].getName()+" "+date.toString()+"\n");
              } else if (listOfFiles[i].isDirectory()) {
                   date=new Date();
              System.out.println("Directory: " + listOfFiles[i].getName()+" "+date.toString());
              PrintLog.append("No Files Printed "+date.toString()+"\n");
              return true;
         private JButton Stop = null;
         Thread tt = new Thread(){
              public void run(){
                   while(true){
                   int count = 0; // @jve:decl-index=0:
                   printfolder();
                   try {
                        Long lon = new Long(jTextField1.getText());
                        System.out.println(lon);
              tt.sleep(lon);
              } catch (InterruptedException e) {}
              count++;
              if (count >= 10000) break;
         private JTextField jTextField = null;
         private JScrollPane jScrollPane = null;
         private JScrollPane jScrollPane1 = null;
         private JTextField jTextField1 = null;
         private JLabel jLabel = null;
         private JLabel jLabel1 = null;
         private JTextArea PrintLog = null;
         private JTextArea ThreadLog = null;
         private JButton jButton = null;
         public void run(){
                   while(true){
                   int count = 0;
                   printfolder();
                   try {
              // Thread.sleep (300000);//
                        Long lon = new Long(jTextField1.getText());
                        System.out.println(lon);
              Thread.currentThread().sleep(lon);
              } catch (InterruptedException e) {}
              count++;
              if (count >= 10000) break;
         private JButton getOpen() {
              if (Open == null) {
                   Open = new JButton();
                   Open.setBounds(new Rectangle(11, 38, 187, 29));
                   Open.setText("Start");
                   Open.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                             try{
                                  if(jTextField1.getText().equals("")){
                                       JOptionPane.showMessageDialog(null,"MilliSeconds Required, Please Enter A Valid Number Into The TextBox", "MilliSeconds Required", JOptionPane.ERROR_MESSAGE);
                                  }else if(jTextField.getText().equals("")){
                                       JOptionPane.showMessageDialog(null,"Please Specify Directory To Be Print From By Clicking On The TextBox", "Directory Missing", JOptionPane.ERROR_MESSAGE);
                                  }else{
                                       Long.parseLong(jTextField1.getText());
                                       try {     
                                                 if(tt.isAlive()) {
                                                           tt.resume();
                                                           date=new Date();
                                                           ThreadLog.append("Activity Resumes "+date.toString()+"\n");
                                                 } else {
                                                                tt.start();                    
                                                                date=new Date();
                                                                ThreadLog.append("Activity Started "+date.toString()+"\n");
                                                      } catch (Exception f) {
                                                           JOptionPane.showMessageDialog(null, f.getMessage(), "Error Occured", JOptionPane.ERROR_MESSAGE);
                             }catch(Exception f){
                                  JOptionPane.showMessageDialog(null, f.getMessage(), "Long Format Exception", JOptionPane.ERROR_MESSAGE);
              return Open;
         * This method initializes Stop     
         * @return javax.swing.JButton     
         private JButton getStop() {
              if (Stop == null) {
                   Stop = new JButton();
                   Stop.setBounds(new Rectangle(197, 38, 195, 29));
                   Stop.setText("Stop");
                   Stop.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
              try{
         tt.suspend();
         date = new Date();
         ThreadLog.append("Activity Suspend "+date.toString()+" \n");
              }catch(Exception g){
                   JOptionPane.showMessageDialog(null, g.getMessage(), "Error Occured", JOptionPane.ERROR_MESSAGE);
              return Stop;
         public int print(Graphics arg0, PageFormat arg1, int arg2) throws PrinterException {
              // TODO Auto-generated method stub
              return 0;
         * This method initializes jTextField     
         * @return javax.swing.JTextField     
         */JFileChooser jfc = new JFileChooser();
         private JTextField getJTextField() {
              if (jTextField == null) {
                   jTextField = new JTextField();
                   ReadRegistry rr = new ReadRegistry();
                   String dpath = rr.getDirecotry();
                   File file = new File(dpath);
                   jfc.setCurrentDirectory(file);
                   jTextField.setText(dpath);
                   jTextField.setBounds(new Rectangle(11, 14, 383, 20));
                   jTextField.setEditable(false);
                   jTextField.addMouseListener(new java.awt.event.MouseAdapter() {
                        public void mouseClicked(java.awt.event.MouseEvent e) {
                             jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                             jfc.showOpenDialog(jContentPane);
                             File file = jfc.getSelectedFile();
                             String path = file.getAbsolutePath();
                             jTextField.setText(path);
              return jTextField;
         * This method initializes jScrollPane     
         * @return javax.swing.JScrollPane     
         private JScrollPane getJScrollPane() {
              if (jScrollPane == null) {
                   jScrollPane = new JScrollPane();
                   jScrollPane.setBounds(new Rectangle(197, 70, 193, 55));
                   jScrollPane.setViewportView(getThreadLog());
              return jScrollPane;
         * This method initializes jScrollPane1     
         * @return javax.swing.JScrollPane     
         private JScrollPane getJScrollPane1() {
              if (jScrollPane1 == null) {
                   jScrollPane1 = new JScrollPane();
                   jScrollPane1.setBounds(new Rectangle(14, 132, 375, 108));
                   jScrollPane1.setViewportView(getPrintLog());
              return jScrollPane1;
         * This method initializes jTextField1     
         * @return javax.swing.JTextField     
         private JTextField getJTextField1() {
              if (jTextField1 == null) {
                   jTextField1 = new JTextField();
                   jTextField1.setBounds(new Rectangle(70, 101, 62, 20));
              return jTextField1;
         * This method initializes PrintLog     
         * @return javax.swing.JTextArea     
         private JTextArea getPrintLog() {
              if (PrintLog == null) {
                   PrintLog = new JTextArea();
                   PrintLog.setEditable(false);
                   PrintLog.setFont(new Font("Arial", Font.PLAIN, 12));
              return PrintLog;
         * This method initializes ThreadLog     
         * @return javax.swing.JTextArea     
         private JTextArea getThreadLog() {
              if (ThreadLog == null) {
                   ThreadLog = new JTextArea();
                   ThreadLog.setEditable(false);
                   ThreadLog.setFont(new Font("Taffy", Font.PLAIN, 10));
              return ThreadLog;
         * This method initializes jButton     
         * @return javax.swing.JButton     
         private JButton getJButton() {
              if (jButton == null) {
                   jButton = new JButton();
                   jButton.setBounds(new Rectangle(12, 70, 185, 25));
                   jButton.setText("Reset");
                   jButton.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
                             Test nt = new Test();
                             nt.show();
                             hide();
              return jButton;
    } // @jve:decl-index=0:visual-constraint="-9,-14"
    i can compile into jar successfully but the jar file wouldn't respond.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  

    first , it says unable to access jar file .
    upon deeper inspection i found that background processes is created behind thus the jar file been activated but the UI doesnt show up? any more idea of where my codes gone wrong? which seems perfect for me
    anyway thanks but i still .. it says unable to access jar file

  • MSI eclipse plus startup problem

    Hi,
    I have the MSI eclipse plus motherboard, but I have a strange startup problem.
    Sometimes my computer fails to start up. When I try again sometimes it works fine. (without changing any hardware or software configuration)
    The Eclipse plus has a small  D-led2 panel that shows information about the startup phases.
    When my startup fails, the panel mentions: CPU init. And the error Code is FF (this means: power on and first initialize CPU)
    (This is the phase just before DDR init).
    So the startup fails in a very early stage of the startup process, (before I can access my bios)
    When the start up fails, I have to disconnect the power cable, reconnect and try to start again. This is a very uncomfortable situation.
    I have the latest BIOS version 21/04/2009 V1.0
    I tried the fail-save default options in the bios.
    My processor is i7 940
    RAM: OCZ DDR3 . 6 pieces of 2GB. 1600Mhz (3 dual channel kits)
    Power supply: Corsair 1000Watt
    I hope somebody can help me.
    Thanks in advance

    Please note that the memory controller was moved into the CPU with the i7 - it is no longer part of motherboard chipset (MCH). You're not the first and probably won't be the last to buy the wrong type of DDR3 memory for your i7 rig. People, before you buy; check if the memory you are handing money over for is actually suitable for your CPU. Simple really as they will state they are i7 compatible. The i7 has a recommended maximum voltage of 1.65V for the integrated memory controller, 1.9V is probably a dangerous voltage to set it to (if the BIOS even allows it). To quote the OCZ FAQ:
    Quote
    The memory supply voltage also powers the receivers and senders on the memory controller with a voltage plane known as VDDQ. Because the Corei7 is manufactured on a 45 nm node, the logic is sensitive to overvoltage and Intel defines the upper safe limit for the Core i7 as 1.65V.
    So to answer your question:
    Quote
    I still have one question: What do I risk with my DDR3 memory that is standard at 1.9V
    More than likely, the integrity of the i7 940 itself. You have to ask yourself, "What's cheaper to replace... the RAM or the CPU?" The answer should be simple enough to work out for the average user.
    I'd be taking the RAM back if at all possible and exchange/upgrade it for an i7 compatible kit (which will be three/six stick tri-channel, not two/four sticks dual-channel) designed to operate within the 1.5V~1.65V recommended voltage range. The OCZ equivalent (comparing what you currently have) to what you want would be this range.

  • Problem using Tomcat 4.1

    I'm trying to establish connection with the database from JSP.When I'm running it's giving the following error
    "oracle.jdbc.driver.Oracle.Driver class not found"
    I'm using Tomcat 4.1 and database is Oracle 8i.I've already set the classpath."C:\oracle\ora92\jdbc\lib"(Oracle is intalled in C drive).
    Kindly help me resolve this issue.
    Bye.

    Tomcat does not use the system classpath.
    As far as Tomcat is concerned the classpath for a web app is
    1 - web-inf/classes
    2 - jar files in web-inf/lib
    3 - jar files in [TOMCAT]/shared/lib
    4 - jar files in [TOMCAT]/common/lib
    If you are going to be using Tomcat's connection pooling, you need the JDBC driver jar file in [TOMCAT]/common/lib
    I would recommend you put the file ojdbc14.jar (or equivalent) in the [TOMCAT]/common/lib directory
    Restart tomcat, and try again.
    Cheers,
    evnafets

Maybe you are looking for