"Exception in thread "main" java.lang.NoClassDefFound Error" in XP

I was creating programs just fine for awhile. Then, for some unknown reason, I start getting the runtime error message, "Exception in thread "main" java.lang.NoClassDefFound Error." I set my PATH in the following manner:
Start | Control Panel | Performance and Maintenance | System | Advanced | Environment Variables | Use Variables for Owner | PATH | Edit | C:\j2sdk1.4.2_04;C:\j2sdk1.4.2_04\bin;C:\j2sdk1.4.2_04\jre\bin | Ok | Ok | Ok
I then closed the dialog boxes and restarted my computer. I then tried to run a program that ran before, only to get the same runtime error! Can someone please help me???

NoClassDefFoundError happens because the JVM cannot find some class from your program, not because the OS cannot find your JVM (PATH regulates the latter, but not the former). JVM looks up classes in directories (or JAR files) specified through the -classpath option, like "java -classpath c:\myclasses MyMainClass". Read the online doc for the "java" launcher for more info.

Similar Messages

  • Error:"exception in thread main:java.lang.noclassdeffound error.

    Hi,
    I am new to this java tech and programming. I just started learning and installed j2sdk1.4.0_03. I wrote a small hello world program and compiled it without any errors. When I execute the same using java hello command, I am getting an error like this: exception in thread "main" java.lang.noclassdeffound error. I am not able to resolve this issue. Please let me know the sol.
    thanks
    venkatraman

    send the program u have typedUmm... Why?
    Anyway @NovaKane: Welcome. Together with seifist and sunny we have at
    least three new posters who show enough intelligence to find chuck's
    solution (or one of the many hundreds of others like it) and the politeness
    to thank him for it. What's the forum coming to?
    If you need it there is a description of the classpath here:
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html
    Again, welcome. And thanks for raising the intelligence level (and politeness
    quotient) of the fora.

  • Exception in thread "main" java.lang.UnsupportedClassversion error.

    hi,
    I am having the JDk and jre versions in C: drive
    i am jdk version 1.5.0
    but when i am running the command version it is showing 1.4.2_03 version and also i am having the oracle 10g on my system.
    tried seeting classpath also but no success.
    I am trying to run a simple helloworld program.while compiling there seems to be no problem..
    But while running the program i am encountring the following error.
    Exception in thread "main" java.lang.UnsupportedClassversion error.
    can someone help me regarding this

    Classpath is NOT going to help. You may be able to fix this by putting the JDK bin directory as the first entry in your system's PATH variable.

  • "Exception in thread "main" java.lang.NoClassDefFound: classname" error.

    Here's my code:
    public class Hello
    public static void main( String[] args )
    System.out.println( "Hello!" );
    it compiles but it wont run. it encounters this error: " Exception in thread "main" java.lang.NoClassDefFoundError: Hello"
    Since I am using jdk1.3, my path is "c:\windows;c:\windows\command;c:\progra~1\dell\resolu~1\common\bin;c:\jdk1.3\bin"
    another error I noticed in my computer were these while running Calculator.java:
    Calculator.java:11: cannot resolve symbol
    symbol: class Calc
    location: class Calculator
    Calc calculator;
    Calculator.java:36: cannot resolve symbol
    symbol: class Calc
    location: class Calculator
    calculator = new Calc();
    2 errors
    Yet my Calculator.java, Calculator.class, Calc.java, Calc.class, Calculator.html files are all in one folder.
    Since I am using jdk1.3, my path is "path=c:\windows;c:\windows\command;c:\progra~dell\resolu~1\common\bin;c:\jdk1.3\bin;"
    I would greatly appreciate your help.
    Thank you very much!=)

    hi!
    set the classpath to the relative path "."!
    in the command box type this:
    SET CLASSPATH=.;
    then it should work!
    visit: >> http://www.menzsoft.ch <<
    greets

  • The following Error:  Exception in thread "main" java.lang.NoClassDefFoundE

    Dear People,
    I would really kindly welocme any help on the following error problem:
    Exception in thread "main" java.lang.NoClassDefFoundError: CoreUpdate
    The program compiles successfully and there are no errors generated from that but I get the above error when I try to run it. I have scanned over all the previous replies that have been posted for this sort of error and have tried all the following solutions:
    1) Set classpath to point to the bin and lib directories of where the JDK1.3.1 is installed in.
    2) Have actually placed in my classpath the EXACT directory to which the tools.jar file is located (within the lib directory).
    So WHAT ELSE is there to do?? I am really frustrated with this problem and I have re-started my computer in order to boot the classpath into gear but still no joy!
    I am running Win2k so do I actually have to go into my autoexec.bat file and type the classpath in there aswell(to which I havent done) or can I just go through my computer on my desktop and then to environment variables and set it up in there (to which I have done already and nopthing seems to work)?
    PLEASE PLEASE PLEASE help!! I very frustated girl programmer!!!
    Any help would be very much appreciated!
    Regards
    Helen Pringle

    Sorry about that last email - this is the errors I get now after I have placed that '.' to my classpath!
    The program is trying to access a MySQL DB.
    java.lang.ClassNotFoundException: org.gyt.mm.mysql.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:124)
    at CoreUpdate.main(CoreUpdate.java:13)
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:477)
    at java.sql.DriverManager.getConnection(DriverManager.java:159)
    at CoreUpdate.main(CoreUpdate.java:24)
    Regards
    Helen

  • Exception in thread "main" java.lang.NullPointerException error JDeveloper 12c

    Hello,
    I am trying to call a java stored procedure in java application. I am using ORACLE database and JDeveloper.
    I am getting error "Exception in thread "main" java.lang.NullPointerException. I have no idea what have I been doing wrong.
    I have a table "Beer" and I want to select all the data out with a stored procedure which I call out of Java app.
    I have a java.class file Store_A.java which I have loaded into the ORACLE database with LOADJAVA :
        import java.sql.*;
        import java.io.*;
        public class Store_a {
          public static void apskatit ()
            throws SQLException
            { String sql =
              "SELECT * FROM Beer";
            try { Connection conn = DriverManager.getConnection("jdbc:default:connection:");
              PreparedStatement pstmt = conn.prepareStatement(sql);
              ResultSet rset = pstmt.executeQuery();
              rset.close();
              pstmt.close();
            catch (SQLException e) {System.err.println(e.getMessage());
    Then I have created a procedure which I plan to call out in java:
        CREATE OR REPLACE PACKAGE Store_a AS
        PROCEDURE apskatit;
        END Store_a;
        CREATE OR REPLACE PACKAGE BODY Store_a AS
        PROCEDURE apskatit AS LANGUAGE JAVA
        NAME 'Store_a.apskatit()';
        END Store_a;
    And I have a java file that I have created with JDeveloper 12c:
        import java.sql.Connection;
        import java.sql.DriverManager;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        public class Class1 {
             * @param args
            public static void main(String[] args) throws SQLException {
                Connection conn = null;
                try {
                    Class.forName("oracle.jdbc.driver.OracleDriver");
                    //Izveidojam savienojumu
                    conn = DriverManager.getConnection("jdbc.oracle.thin:@localhost:1521", "SYSTEM", "asdasd");
                    // Izveidojam callable statement
                    CallableStatement stmt = conn.prepareCall("CALL Store_a.apskatit()");
                    ResultSet resul = stmt.executeQuery();
                    while (resul.next()) {
                        System.out.println(resul.getInt(1) + "\t" + resul.getString(2));
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                } finally {
                    try {
                        conn.close();
                    } catch (SQLException e) {
                        e.printStackTrace();
    When I try to run the java file, I get this error "Exception in thread "main" java.lang.NullPointerException at client.Class1.main(Class1.java:29).
    So the line I get error in is "conn.close();"
    How to fix this?
    Thank you very much in advance.

    I am trying to call a java stored procedure in java application. I am using ORACLE database and JDeveloper.
    I am getting error "Exception in thread "main" java.lang.NullPointerException. I have no idea what have I been doing wrong.
    Maybe you haven't read it yet but I told you in your other thread what you were doing wrong and, step by step, how to address the problem.
    https://forums.oracle.com/thread/2611124
    I'm not going to repeat everything again just this one main piece of advice:
    Until you get you code working outside the database don't even bother trying to load it into the DB and create a Java stored procedure.
    You are trying to deal with too many different issues at the same time. Unless you solve your primary Java problem by fixing the code outside the DB you will have nothing but problems loading it into the DB.
    And just get rid of this line of code - you don't need it anymore and it hasn't been done like that for many years now:
    Class.forName("oracle.jdbc.driver.OracleDriver");

  • Exception in thread "main" java.lang.UnsatisfiedLinkError ERROR

    Hi All,
    I am trying to develop a Swing Application. I have compiled my codes in Windows like this:
    javac -d ../../classes *.javaThen I tried to run the program from <my dir>/classes/ folder...
    java com.fusion.ucmrtnd.Mainwhere Main.java contains the main() method.
    But I am getting the following error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: sun.awt.SunToolkit.getAppContext(Ljava/lang/Object;)Lsun/awt/AppContext;
            at sun.awt.SunToolkit.getAppContext(Native Method)
            at sun.awt.SunToolkit.targetToAppContext(Unknown Source)
            at sun.awt.windows.WComponentPeer.postEvent(Unknown Source)
            at sun.awt.windows.WComponentPeer.replaceSurfaceDataLater(Unknown Source)
            at sun.awt.windows.WWindowPeer.updateInsets(Native Method)
            at sun.awt.windows.WWindowPeer.initialize(Unknown Source)
            at sun.awt.windows.WFramePeer.initialize(Unknown Source)
            at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
            at sun.awt.windows.WCanvasPeer.<init>(Unknown Source)
            at sun.awt.windows.WPanelPeer.<init>(Unknown Source)
            at sun.awt.windows.WWindowPeer.<init>(Unknown Source)
            at sun.awt.windows.WFramePeer.<init>(Unknown Source)
            at sun.awt.windows.WToolkit.createFrame(Unknown Source)
            at java.awt.Frame.addNotify(Unknown Source)
            at javax.swing.SwingUtilities$SharedOwnerFrame.addNotify(Unknown Source)
            at java.awt.Dialog.addNotify(Unknown Source)
            at java.awt.Dialog.conditionalShow(Unknown Source)
            at java.awt.Dialog.show(Unknown Source)
            at java.awt.Component.show(Unknown Source)
            at java.awt.Component.setVisible(Unknown Source)
            at java.awt.Window.setVisible(Unknown Source)
            at java.awt.Dialog.setVisible(Unknown Source)
            at DisplayStrip.DisplayStripRun(DisplayStrip.java:32)
            at Main.main(Main.java:8)PS: I used NetBeans 6.5 IDE, where it's working fine. But when I am trying to deploy the codes in Windows, I am getting this error.
    Any help would be appreciated.
    TiA....

    maybe your rt.jar conflicting

  • Exception in thread "main" java.lang.ClassFormat Error

    I am running a java program in NeBeans and when I run the program I am getting the following error:
    Exception in thread "main" java.lang.ClassFormatError: Repetitive method name/signature in class file pluginex2/TtsoapcgiPortType_addLink_ResponseStruct_SOAPSerializer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at pluginex2.Ttsoapcgi_SerializerRegistry.getRegistry(Ttsoapcgi_SerializerRegistry.java:73)
    at pluginex2.Ttsoapcgi_Impl.<init>(Ttsoapcgi_Impl.java:25)
    at pluginex2.Main.main(Main.java:25)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 0 seconds)
    What should I do?Can anyone please help me out?
    Thanks,
    Sravanthi.

    The class files are automatically into the build/generated/wsclient/project-name file of my project.
    I copied those class files into my source folder to make my program work.When I searched my system I jus found two of these files in build/generated/wsclient/project-name folder and source folder of my project.
    I am running the program directly through NetBeans IDE.

  • "Exception in thread "main" java.lang.NumberFormatException"error..pls help

    Hi,
    I'm trying to run a program I've written but keeping getting this error:
    Exception in thread "main" java.lang.NumberFormatException: empty String
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:994)
    at java.lang.Double.parseDouble(Double.java:482)
    at data.newLineToRead(data.java:21)
    at data.data(data.java:34)
    at train.main(train.java:86)
    I'm not quite sure where I'm going wrong.I've included the data class and train class.Could someone pls help me.
    Thanks a lot.
    Data Class:
    import java.io.*;
    import java.util.*;
    public class data{
            private static parameter par;
            private static double[][] x=new double[par.n()][par.D()];
            public static double[] t=new double[par.n()];
            public static void newLineToRead(String LineToRead,int n){
            int d=0;
            String stringToRead=new String();
                    for(int i=0;i<=LineToRead.length();i++){
                            StringTokenizer str = new StringTokenizer (stringToRead,"/t");
                            String[] strtemp = new String[str.countTokens()];
                                    while (str.hasMoreTokens()){
                                    x[n][d++] = Double.parseDouble(str.nextToken());
                                    d++;
                                    System.out.println(x[n][d++]);
                            stringToRead=new String();
                    t[n]=Double.parseDouble(stringToRead);
                    x[n][par.d()]=1.0;
            public static void data() throws IOException{
            DataInputStream in=null;
                    try{
                            in=new DataInputStream(new FileInputStream(par.f()));
                            for(int n=0;n<par.n();n++){
                            String LineToRead=in.readLine();
                                    if(LineToRead.length()==0){
                                            System.out.println("Remove empty lines");
                                    else{
                                            newLineToRead(LineToRead,n);
                    }finally{if(in!=null){in.close();}}
            public static double x(int n,int d){return x[n][d];}
            public static double t(int n){return t[n];}
    }Train Class
    import java.io.*;
    import java.util.*;
    public class train{
             private static parameter       par;
             private static data            dat;
             private static model           mod;
             private static response        resp;
             private static void error(String msg){
                    System.out.println(msg);
                    System.exit(1);
             private static void check(){
                if(par.f().length()==0)
                    error("No filename of input vectors!");
                if(par.n()==0)
                    error("No number of input vectors!");
                if(par.d()==0)
                    error("No number of input variables!");
                if(par.d()>par.D())
                    error("Dimension is larger than 100!");
              private static void usage(){
                System.out.println("Non-default parameters==========================");
                System.out.println("-f filename of input vectors");
                System.out.println("-n number of input vectors");
                System.out.println("-d number of input variables");
                System.out.println("Default parameters==========================");
                System.out.println("-R regularisation constant (must be positive and the default value is 0.0)");
                System.out.println("-S epsilon criterion for stopping a learning process (default value is 0.001)");
                System.out.println("-C maximum learning cycle (default value is 10000)");
                      public static void main(String[] argv){
                            if(argv.length==0){
                                    System.out.println("Command line is <Java [-cp path] train parameters>");
                                    usage();
                                    System.exit(1);
                            if(argv.length==1 && argv[0].equals("help")==true){
                                    usage();
                                    System.exit(1);
                            par.nin(0); par.din(0); par.Rin(0.0); par.Cin(10000); par.Sin(0.001);
    for(int i=0;i<argv.length;i++){
                                            if(argv.equals("-f")==true){
    if((i+1)==argv.length)
    error("miss the para");
    par.fin(argv[i+1]);
    i++;
    else if(argv[i].equals("-d")==true){
    if((i+1)==argv.length)
    error("miss the para");
    par.din(Integer.parseInt(argv[i+1]));
    i++;
    else if(argv[i].equals("-n")==true){
    if((i+1)==argv.length)
    error("miss the para");
    par.nin(Integer.parseInt(argv[i+1]));
    i++;
    else if(argv[i].equals("-S")==true){
    if((i+1)==argv.length)
    error("miss the para");
    par.Sin(Integer.parseInt(argv[i+1]));
    i++;
    else if(argv[i].equals("-C")==true){
    if((i+1)==argv.length)
    error("miss the para");
    par.Cin(Integer.parseInt(argv[i+1]));
    i++;
    else if(argv[i].equals("-R")==true){
    if((i+1)==argv.length)
    error("miss the para");
    par.Rin(Double.parseDouble(argv[i+1]));
    i++;
    else error("Unkown token");
    check();
    try {
    dat.data();
    }catch(IOException e) { System.err.println(e.toString()); }
    try {
    mod.model();
    }catch(IOException e) { System.err.println(e.toString()); }
    try {
    resp.record();
    }catch(IOException e){ System.err.println(e.toString()); }

    String stringToRead=new String();
                    for(int i=0;i<=LineToRead.length();i++){
                            StringTokenizer str = new StringTokenizer (stringToRead,"/t");
                            String[] strtemp = new String[str.countTokens()];
                                    while (str.hasMoreTokens()){
                                    x[n][d++] = Double.parseDouble(str.nextToken());
                                    d++;
                                    System.out.println(x[n][d++]);
                            stringToRead=new String();
                    t[n]=Double.parseDouble(stringToRead);
                    x[n][par.d()]=1.0;
            }Not sure exactly what you are trying to do above but...
    You are setting your String to an empty String with "new String()" and then parsing that empty String. Eventually, you are trying to parse a double from that empty String:
    t[n]=Double.parseDouble(stringToRead);Also, I cannot think of a reason to ever use "new String()" when you could just use:
    String myString = "";

  • OUI is not openinig.   Exception in thread "main" java.lang.NoClassDefFound

    hi.
    while i'm trying to install oracle server, getting the below error
    Starting Oracle Universal Installer...
    Checking Temp space: must be greater than 80 MB. Actual 9277 MB Passed
    Checking swap space: must be greater than 150 MB. Actual 3529 MB Passed
    Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
    Some requirement checks failed. You must fulfill these requirements before
    continuing with the installation,
    Continue? (y/n) [n] y
    Ignoring required pre-requisite failures. Continuing...Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-09-27_02-55-33AM. Please wait ...[satish@rac1 database]$ Exception in thread "main" java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at java.awt.Toolkit$2.run(Toolkit.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

    hi Srini,
    thanks for your time.
    I am trying to install it on RHEL 5 on VMWare Player, and the db version is 11g.
    i think the problem is with the below error
    Exception in thread "main" java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at java.awt.Toolkit$2.run(Toolkit.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

  • Exception in thread "main" java.lang.NoClassDefFound

    C:\myjava>java JdbcCheckup
    Exception in thread "main" java.lang.NoClassDefFoundError: JdbcCheckup
    C:\myjava>java -cp %CLASSPATH%; . JdbcCheckup
    Exception in thread "main" java.lang.NoClassDefFoundError: c:\tomcat_4\common\li
    b\servlet/jar;
    C:\myjava>
    here is my classpath. There is 'c:\tomcat_4\common\lib\servlet/jar;' its listed as a .jar file?
    why cant i compile?
    CLASSPATH=c:\oracle\ora81\jdbc\lib\classes12.zip; c:\tomcat_4\common\lib\serv
    t.jar; c:\eclipse; c:\tomcat_4\examples\WEB-INF\classes;c:\oracle\ora81\jlib\b
    raphbean.jar;c:\oracle\ora81\jlib\LW_PfjBean.jar;c:\oracle\ora81\jlib\bigraphb
    n-nls.zip

    Either remove the erroneous spaces between your classpath elements, or do:
    java -cp "%CPASSPATH";." JdbcCheckup
    (notice the double-quotes)
    The way you did it, as soon as it saw the first space (after your classes12.zip entry), it thought that was the end of the classpath.

  • How to solve this problem"exception in thread "main" java.lang.noclassdeff"

    I am a tyro of java programming .
    i downloaded the j2sdk-1_4_2_09-windows-i586-p.exe from www.java.sun.com and installed it at the defaulted path C:\j2sdk1.4.2_09,
    then i wrote down my first java program as follow:
    public class hello
    public static void main (String args[])
    System.out.println("hello,����!");
    }and stored it at C:\Javasmp\ch01\hello.java.
    after that i opened dos commind window and compiled it :
    c:\javac C:\Javasmp\ch01\hello.java. and obtained file hello.class (C:\Javasmp\ch01\hello.class)
    but when running it (c:\java C:\Javasmp\ch01\hello) there was a mistake:
    exception in thread "main"java.lang.noclassdeffounderror:C:\Javasmp\ch01\hello
    i searched on the internet and found out the solution is set enviroment viriable ,so i set the "CLASSPATH" as".;C:\j2sdk1.4.2_09\lib;C:\j2sdk1.4.2_09\lib\tools.jar" ,"PATH" as"C:\j2sdk1.4.2_09\bin;C:\Windows\system32;c:\windows\system32\Wbem" and "JAVA_HOME" as "C:\j2sdk1.4.2_09\bin;C:\j2sdk1.4.2_09\jre\bin"
    afer that, i opened a new dos command window and run it again ,but the problem was still unsolved.
    in addition,my os is "windows xp"
    anyone can help me ,thank you!
    i am a student in China,it's a hard time for me to write down my question in english ,i doubt whether i express my question clearly.
    thank you for you reading.

    I have created a simple applet.
    import java.lang.*;
    import java.awt.*;
    public class jawtex3 extends java.applet.Applet
    public void init()
    add(new Button("One"));
    add(new Button("Two"));
    public Dimension preferredSize()
    return new Dimension(200, 100);
    public static void main(String [] args)
    Frame f = new Frame(" jawtex3");
    jawtex3 ex = new jawtex3();
    ex.init();
    f.add("Center", ex);
    f.pack();
    f.show();
    In this no compilation errors.
    I am getting runtime exception.as Exception in thread "main"java.lang.NoClassDefFound Error: jawtex
    reply me soon.
    thankyou.

  • HELP Needed with this error:   Exception in thread "main" java.lang.NoClass

    Folks,
    I am having a problem connecting to my MSDE SQL 2000 DB on a WindowsXP pro. environment. I am learning Java and writing a small test prgm to connect the the database. The code compiles ok, but when I try to execute it i keep getting this error:
    "Exception in thread "main" java.lang.NoClassDefFoundError: Test1"
    I am using the Microsoft jdbc driver and my CLASSPATH is setup correctly, I've also noticed that several people have complained about this error, but have not seen any solutions....can someone help ?
    Here is the one of the test programs that I am using:
    import java.sql.*;
    * Microsoft SQL Server JDBC test program
    public class Test1 {
    public Test1() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://LAPTOP01:1433","sa","sqladmin");
    if (connection != null) {
    System.out.println();
    System.out.println("Successfully connected");
    System.out.println();
    // Meta data
    DatabaseMetaData meta = connection.getMetaData();
    System.out.println("\nDriver Information");
    System.out.println("Driver Name: "
    + meta.getDriverName());
    System.out.println("Driver Version: "
    + meta.getDriverVersion());
    System.out.println("\nDatabase Information ");
    System.out.println("Database Name: "
    + meta.getDatabaseProductName());
    System.out.println("Database Version: "+
    meta.getDatabaseProductVersion());
    } // Test
    public static void main (String args[]) throws Exception {
    Test1 test = new Test1();

    I want to say that there was nothing wrong
    with my classpath config., I am still not sure why
    that didn't work, there is what I did to resolved
    this issue.You can say that all you like but if you are getting NoClassDefFound errors, that's because the class associated with the error is not in your classpath.
    (For future reference: you will find it easier to solve problems if you assume that the problem is your fault, instead of trying to blame something else. It almost always is your fault -- at least that's been my experience.)
    1. I had to set my DB connection protocol to TCP/IP
    (this was not the default), this was done by running
    the
    file "svrnetcn.exe" and then in the SQL Server Network
    Utility window, enable TCP/IP and set the port to
    1433.Irrelevant to the classpath problem.
    2. I then copied all three of the Microsoft JDBC
    driver files to the ..\jre\lib\ext dir of my jdk
    installed dir.The classpath always includes all jar files in this directory. That's why doing that fixed your problem. My bet is that you didn't have the jar file containing the driver in your classpath before, you just had the directory containing that jar file.
    3. Updated my OS path to located these files
    and....BINGO! (that simple)Unnecessary for solving classpath problems.
    4. Took a crash course on JDBC & basic Java and now I
    have created my database, all tables, scripts,
    stored procedures and can read/write and do all kinds
    of neat stuff.All's well that ends well. After a few months you'll wonder what all the fuss was about.

  • On starting WebLogic getting Error : Listening for transport dt_socket at address: 8453 Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m

    Hi,
    system i am using for Oracle SOA is :
    Windows 64 Bit
    i5 Processor
    6 GB RAM
    29 GB on C Drive is already free after installation of all SOA related products.
    I have installed wlserver_10.3 for SOA 11g Development purpose and followed exact installation sequence and procedure as mention in oracle documentation
    i created domain also and every thing look correct but after installation procedure there are "Additional actions required just after every thing installed" :
    setting memory limit
    starting weblogic server (Admin Server)
    starting weblogic managed server
    and so on
    now Problem is when i execute C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin startWebLogic.cmd
    as mention in oracle documentation i am getting following error message : (i have only included last error lines instead of complete console log)
    oConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1036\profiles\default\
    sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\syse
    xt_manifest_classpath;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sysext_ma
    nifest_classpath;C:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manif
    est_classpath  weblogic.Server
    Listening for transport dt_socket at address: 8453
    Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m
    Caused by: java.lang.ClassNotFoundException: vXmx512m
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: ++Xmx512m.  Program will exit.
    Now to resolve this what i already tried are :
    I change JAVA_HOME and PATH to jdk6 which came with web logic installer
    Location is at :
    JAVA_HOME : C:\Oracle\Middleware\jdk160_29
    PATH : C:\Oracle\Middleware\jdk160_29\bin
    The above dose not include any space between path
    I ran the startWebLogic.cmd and got same error
    After that I also added
    CLASSPATH : C:\Oracle\Middleware\jdk160_29\lib\tool.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\jdk160_29\bin
    WL_HOME:  C:\Oracle\Middleware\wlserver_10.3
    I ran the startWebLogic.cmd and got same error
    I also used earlier path which I used with eclipse when I was working on other java development.
    JAVA_HOME : C:\Program Files\Java\jdk1.7.0_21
    PATH : C:\Program Files\Java\jdk1.7.0_21\bin
    I ran the startWebLogic.cmd and got same error
    Then I also gave PATH: C:\Oracle\Middleware\wlserver_10.3\server\lib      (including the existing one using ; )
    I ran the startWebLogic.cmd and got same error
    Now may be there is a file called setSOADomainEnv.cmd in
    < C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\ setSOADomainEnv.cmd>
    That include some values for memory set :
    set JAVA_OPTIONS=%JAVA_OPTIONS%
    set DEFAULT_MEM_ARGS=-Xms512m –Xmx512m
    set PORT_MEM_ARGS=-Xms512m –Xmx768m
    if "%JAVA_VENDOR%" == "Oracle" goto OracleJVM
    set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=768m
    set PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=256m -XX:MaxPermSize=768m
    now as I change the red highlighted value to 512 value because I have less memory resource and I checked in installation documentation to change the above red highlighted value to 512 original is 1024 which is too high and it was crating problem and showing memory space problem so I change it to 512 and now I am not getting that memory space problem error but may be the above error is related with change value in setSOADomainEnv.cmd file or not
    Following are my domain, weblogic and soa home directory path and all these path are exactly what it suppose to be according to Oracle Installation Documentation:
    WebLogic :
    C:\Oracle\Middleware\wlserver_10.3
    C:\Oracle\Middleware\coherence_3.7
    C:\Oracle\Middleware\oepe_11.1.1.8.0
    SOA Oracle Home Directory :
    C:\Oracle\Middleware\Oracle_SOA1
    OSB Home Location :
    C:\Oracle\Middleware\Oracle_OSB1
    Domain name : soa_div_domain
    Domain Location :       C:\Oracle\Middleware\user_projects\domains
    Application Location :  C:\Oracle\Middleware\user_projects\applications
    Domain Location:        C:\Oracle\Middleware\user_projects\domains\soa_div_domain
    form here i am trying to start weblogic : C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\startWebLogic.cmd
    Please tell me any body want more details.
    Thanks.

    I think you are missing a character '-'
    USER_MEM_ARGS="Xms512m -Xmx512m -XX:MaxPermSize=128m"Add this character like follows
    "-Xms512m -Xmx512m -XX:MaxPermSize=128m"

  • Exception in thread "main" java.lang.Error: Unable to find named traits: org.puremvc.as3.multicore.p

    Hi all,
    i try  to  use  pfi with a  project that i did with  air  in flash builder.
    I make my swf with ant  task
        <target name="releasecompile" depends="init">
        <echo>
                  Ant Task :: releaseCompile
        </echo>
            <java jar="${MXMLC.JAR}" fork="true" failonerror="true">
               <arg value="-debug=false"/>
                <arg value="+flexlib=${SDK_HOME}frameworks"/>
                <arg value="+configname=air"/>
                <arg value="-file-specs=${MAIN_SOURCE_FILE}"/>
                <arg value="-output=${build}/${APP_ROOT_FILE}"/>
            <arg value="-external-library-path+=${APP_ROOT}/libs/PureMVC_AS3_MultiCore_1_0_5.swc" />
            </java>
        </target>
    i have a swf in result  and i play  pfi like this
    ./pfi -package -target ipa-ad-hoc -provisioning-profile /Users/stef/Desktop/PROJECT/PROJECT_Config-2.mobileprovision -storetype pkcs12 -keystore /Users/stef/Desktop/PROJECT/Certificats2.p12 -storepass mypass /Users/stef/Desktop/PROJECT/PROJECTConfig.ipa /Users/stef/Documents/Adobe\ Flash\ Builder\ 4/PROJECT/src/PROJECTConfigurateur-app.xml -C /Users/stef/Desktop/PROJECT/ PROJECTConfigurateur.swf  Default.png icons/Icon57.png icons/Icon29.png icons/Icon512.png
    Exception in thread "main" java.lang.Error: Unable to find named traits: org.puremvc.as3.multicore.patterns.facade::Facade
    at adobe.abc.Domain.resolveTypeName(Domain.java:195)
    at adobe.abc.Domain.resolveTypeName(Domain.java:112)
    at adobe.abc.GlobalOptimizer$InputAbc.resolveTypeName(GlobalOptimizer.java:274)
    at adobe.abc.GlobalOptimizer$InputAbc.readInstance(GlobalOptimizer.java:837)
    at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:388)
    at adobe.abc.GlobalOptimizer$InputAbc.readAbc(GlobalOptimizer.java:280)
    at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:160)
    at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcode(AOTCompiler.java:329)
    at com.adobe.air.ipa.AOTCompiler.GenerateMacBinary(AOTCompiler.java:600)
    at com.adobe.air.ipa.IPAOutputStream.compileRootSwf(IPAOutputStream.java:196)
    at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:366)
    at com.adobe.air.ADTPackager.createPackage(ADTPackager.java:65)
    at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:165)
    at com.adobe.air.ADTEntrypoint.parseArgsAndGo(ADTEntrypoint.java:132)
    at com.adobe.air.ipa.PFI.parseArgsAndGo(PFI.java:152)
    at com.adobe.air.ADTEntrypoint.run(ADTEntrypoint.java:68)
    at com.adobe.air.ipa.PFI.main(PFI.java:112)
    do you have some  ideas about this ?
    Regards
    Stef

    Ok,
        <target name="releasecompile" depends="init">
        <echo>
                  Ant Task :: releaseCompile
        </echo>
            <java jar="${MXMLC.JAR}" fork="true" failonerror="true">
               <arg value="-debug=false"/>
                <arg value="+flexlib=${SDK_HOME}frameworks"/>
                <arg value="+configname=air"/>
                <arg value="-file-specs=${MAIN_SOURCE_FILE}"/>
                <arg value="-output=${build}/${APP_ROOT_FILE}"/>
            <arg value="-external-library-path+=${APP_ROOT}/libs/PureMVC_AS3_MultiCore_1_0_5. swc" />
            </java>
        </target>
    I mistake  this line
      <arg value="-external-library-path+=${APP_ROOT}/libs/PureMVC_AS3_MultiCore_1_0_5. swc" />
    must be
    <arg value="-library-path+=${APP_ROOT}/libs/PureMVC_AS3_MultiCore_1_0_5.swc" />
    for  include the content in the swf.
    Regards
    Stef

Maybe you are looking for

  • Subnodes and content conversion in FTP-Adapter

    Hello experts, the scenaria is IDOC -> XI -> FTP and content conversion is used. The structure of the IDOC is like: <head></head> <pos>       <subnode></subnode> </pos> <pos>        <subnode></subnode> </pos> There can be 1 ore more positions. We map

  • Video/audio Stuttering on Macbook 13

    Hi All I have a mid 2007 Macbook 13 running OS X Lion 10.7.4.  all up to date.  Initially I had 4G's of ram ( I know it only reads 3 ) now I have it running on only 2. Problem is video/audio stuttering when running movies. mostly netflix and or conne

  • How to integrate CCMS with RWB component monitoring

    Hi, all. I am wondering if there is a way to forward errors from the component monitoring and CC monitoring in RWB to CCMS. For example, if a CC is down because somebody changed the CC user or password or disable the CC totally, RWB will show errors

  • I can not remember the answers to my security

    How do I reset my security questions & answers?

  • How complex does my log-on password need to be?

    I use 1Password to create very complex passwords for accessing  websites and various accounts, but I'm wondering how complex do I need to make the password that lets me log onto my computer? In other words, is it realistic to worry about a brute forc