f



Help needed on java.lang.NoClassDefFoundError

Hi all,
I have added my classes to a project.I am using JBuilder.On
compilation I do not get any errors for the classes I have added.But
when I run the project I get java.lang.NoClassDefFoundError for the
classes I have
added.I tried setting the environment variable CLASS_PATH for that
specific class.But it did not work.Please let me know if you know
anything about this.

Regards,
Abhijit.
0
9/30/2004 1:44:20 PM
comp.lang.java.help 13340 articles. 0 followers. Post Follow

1 Replies
949 Views

Similar Articles

[PageSpeed] 6

On 30 Sep 2004 06:44:20 -0700, Abhijit Gadekar <abhijitgadekar@yahoo.com>  
wrote:

> Hi all,
> I have added my classes to a project.I am using JBuilder.On
> compilation I do not get any errors for the classes I have added.But
> when I run the project I get java.lang.NoClassDefFoundError for the
> classes I have
> added.I tried setting the environment variable CLASS_PATH for that
> specific class.But it did not work.Please let me know if you know
> anything about this.


While i can only guess what you actually mean, i guess you have a problem
with your CLASSPATH (no underscore). Set it to the directory that contains
the root of your package tree (if your class my.package.MyClass is saved as
C:\somedir\my\package\MyClass.class, set CLASSPATH to C:\somedir\).

Also, NoClassDefFoundError's are often thrown if you try to run a java  
program
and type java MainType.class instead of java MainType.

-- 

Whom the gods wish to destroy they first call promising.
0
terra (469)
9/30/2004 2:14:18 PM
Reply:

Similar Artilces:

java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Hi, I'm trying to use the httpclient within Jython (see http://jakarta.apache.org/commons/httpclient/ for more information on the httpclient). My Jython version is: Jython 2.1 on java1.4.2_04 (JIT: null) My Java version is: java version "1.4.2_04" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode) My CLASSPATH includes: jdom.jar xerces.jar jython.jar jt400.jar log4j-1.2.8.jar commons-httpclient-2.0.jar When I just try to perform the import statements from example code I get the error pasted below....

Error occurred during intialization of VM java/lang/NoClassDefFoundError: java/lang/Object
Good day to all, I have installed the j2se/netbeans binary bundle on red hat 9. I can run everything perfectly as root but when I try to compile with any other user I get: Error occurred during intialization of VM java/lang/NoClassDefFoundError: java/lang/Object When I saw this it seemed like a permissions problem but I checked the permissions and everything seemed fine. All users have execute permissions of javac and java. I have read other threads dealing with the same or similar problem but have not reached any solution yet. I would appreciate if anyone that has run into this type of problem and has solved it if he/she could give me a hand or if anyone could just point out what I should be looking for in this type of problem. Thanks in advance... gek ...

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
I downloaded jdk-6u7-solaris-sparcv9.tar.Z and installed it by these commands: # zcat jdk-6u7-solaris-sparc.tar.Z | tar -xf - # pkgadd -d . SUNWj6rtx SUNWj6dvx SUNWj6dmx # /usr/jdk/instances/jdk1.6.0/bin/sparcv9/java -version Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object # ls /usr/jdk/instances/ jdk1.5.0 jdk1.6.0 # uname -a SunOS sun1 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500 Please help to fix the error. Thanks. TsanChung wrote: > I downloaded jdk-6u7-solaris-sparcv9.tar.Z and installed it by these > commands: > # zcat jdk-6u7-solaris-sparc.tar.Z | tar -xf - > # pkgadd -d . SUNWj6rtx SUNWj6dvx SUNWj6dmx > > # /usr/jdk/instances/jdk1.6.0/bin/sparcv9/java -version > Error occurred during initialization of VM > java/lang/NoClassDefFoundError: java/lang/Object It's missing or can't find rt.jar, right? How does the Solaris version find it's runtime files? Can you show us where rt.jar is? On Aug 20, 6:24=A0pm, Mark Space <marksp...@sbc.global.net> wrote: > TsanChung wrote: > > I downloaded jdk-6u7-solaris-sparcv9.tar.Z and installed it by these > > commands: > > # zcat jdk-6u7-solaris-sparc.tar.Z | tar -xf - > > # pkgadd -d . SUNWj6rtx SUNWj6dvx SUNWj6dmx > > > # /usr/jdk/instances/jdk1.6.0/bin/sparcv9/java -version > > Error occurred during initialization of VM > > java/lang/NoClassDefFoundError: java/lang/Object > > It'...

Help Help, I am intermediate in Java...need help in follow case
There is two java classes second class is for execute ant file. First Class does the most. first create a plain class which accepts two java.io.File object in constructor as input and output and a method which performs replacement. - the replacement must take into account the file ending of the input file: + for .java, .cpp, .c and .css remove the FIRST occurrence of "/ * ... */" + for .xml, .xhtml, .html and .xsl remove the FIRST occurrence of "<!-- ... -->" has any body have an example class to do it? Thanks a lot...if you can help...I create a class but is n...

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object (ant/tomcat/spring)
Hi, I've been trying to get Spring working with ant and tomcat. Ant was building just fine, but I came in today and tried to build it and got this: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object ?!?! Makes no sense to me. There _is_ an older version of java installed on my machine; but JAVA_HOME and ANT_HOME are set to the correct paths, and <which java>and <java -version> produce the correct version. Any help would greatly alleviate my frustration! Thanks in advance... Courtney ...

java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException
Hi, I am new to DB2. I am getting this error while loading the DB2Driver. I don't have any idea about where i might have gone wrong. please help me. Below is the stack trace. Stack Trace: java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv(Native Method) at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:245) at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:130) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) Thanks in advance, Ganesh Majji ganesh.m@gmail.com wrote: > I am new to DB2. I am getting this error while loading the DB2Driver. I > don't have any idea about where i might have gone wrong. please help > me. Unfortunately my crystal bowl stays dark because you didn't mentioned your operating system and which DB2 version you're using. For Windows, *nix and OS/2 please ensure that your application is using the db2java.zip from SQLLIB\java. Check if there are multiple db2jdbc.dll on your system, remove any extra db2jdbc.dll files on the system. Ensure that you can connect to DB2 with the DB2 workstation tools from your machine. sorry for not mentioning the system details. Operation System is SunOS (Solaris) and DB2 SDK 8.2.2 Thank you very much for the kind response, Ganesh Bernd Hohmann wrote: > ganesh.m@gmail...

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object (ant/tomcat/spring)
Hi, I've been trying to get Spring working with ant and tomcat. Ant was building just fine, but I came in today and tried to build it and got this: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object ?!?! Makes no sense to me. There _is_ an older version of java installed on my machine; but JAVA_HOME and ANT_HOME are set to the correct paths, and <which java>and <java -version> produce the correct version. Any help would greatly alleviate my frustration! Thanks in advance... Courtney ...

help needed diagnosing/debugging java.lang.OutOfMemoryError
What the subject says... An application in development for use on an OpenVMS system is tossing up this error. I've increased the page file quota for APACHE$WWW to 1M and there is still this error. The logs produced by this Java stuff do not tell much. Is there some way to get a dump or more logging? PS. I don't do Java (unless it's in my coffee mug) and thus, I'm not the one developing the app. -- VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG All your spirit rack abuses, come to haunt you back by day. All your Byzantine excuses, given time...

java.lang.NoClassDefFoundError: javax/help/HelpSetException with HTTPS/SSL
I am getting the following error with a Java Applet being served out by IIS over HTTPS/SSL using a Verisign certificate: java.lang.NoClassDefFoundError: javax/help/HelpSetException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590) at java.lang.Class.getConstructor0(Class.java:1762) at java.lang.Class.newInstance0(Class.java:276) at java.lang.Class.newInstance(Class.java:259) at sun.applet.AppletPanel.createApplet(AppletPanel.java:567) ...

Help Help Help Help Help
please,help us . we have a seious problem, we are designing a radio controlled car that is guided by the PC, to send the data wireless between the PC and the Car and vice versa. we use 2 transmitter/reciever circuits from 2 seperate radio controlled car each running with a different frequency (27 MHz & 40 MHz)and modify the functionality of each to do the disered work. but on mounting a transmitter(40MHz) and reciever(27MHz) on the car, and attach another transmitter(27MHz) and reciever(40MHz) to the PC; we found that on sending signals from the car to the PC on the transmitter & rec...

java.lang.StringIndexOutOfBoundsException: String index out of range: 23 at java.lang.String.charAt(String.java:460)
Hi All I am having the torque3.1.jar and postgresql-7.4. I have compiled the new jdbc driver called as postgresql.jar and have placed it in the lib directory from where the ant scripts catch the jars. Whenever i try to access through torque gestList = BaseGestlistPeer.doSelect(new Criteria()); this error arises java.lang.StringIndexOutOfBoundsException: String index out of range: 23 at java.lang.String.charAt(String.java:460) at org.postgresql.jdbc2.ResultSet.toTimestamp(ResultSet.java:1653) at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java...

HELP!! java.lang.OutOfMemoryError
Hi all, in a java-application i've got the following problem: In a JPanel with several JTextFields i start a sql-query to a address table. This query will be started on the CaretUpdate-Event, because i want to get the result when ever i change the field-contents. This query runs on 8 fields in a very good performance (e.g. on name, city,street,phonenumber ...), but if i change the entry for the areacode the performance is really terrible (about 20 sec) and after 4 or 5 queries i get the java.lang.OutOfMemoryError!!?? The resultset contains as max. 7000 records, but i think that&#...

java.lang.Set with elements of type java.lang.Set
Roughly I do something along the lines of: Set set = new HashSet(); Set elem = new HashSet(); set.add(elem); // now we change the elem and add it again to the set elem.add(some object here); set.add(elem); I found out the hard way that 'set' may now contain 'elem' either once or twice, the reason being that 'elem.add()' changes the hashCode of elem such that it is not noticed that it is in 'set' already on the 2nd 'set.add()'. Question: What I would actually want is an IdentityHashSet() set = new IdentityHashSet() but this does not...

java.lang.NullPointerException..help me!
Hy guys, I'm developing a Jsf application and i have a question. My application allow user to upload a file and show to user number of columns and rows,thanks to a javabean called MyBean.java. My error is message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'com.devsphere.articles.jsfupload.MyBean'.. class com.devsphere.articles.jsfupload.MyBean : java.lang.NullPo...

help!help!help!help!
I am a student.I am going to make a simulation of a robot (FANUC Robot M-16iB) under the matlab\simulink environment . It is a normal 6DOF robot.I want to realize any angle and any speed (under the max speed) and any position and orientation control. As I just starting to do this new field,I have no experience about it. Can you give me some simulation demo or examples for 6DOF robot? I am very eager to get these.Please write back to me as soon as possible,thank you! Sincerely, Connie&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288; zhanglijuan920@sohu.c...

Help:java.lang.OutOfMemoryError
Hai guys, I want to declare a huge two dimension array with rows=99939263 cols=1606 when I tried to declare an array as follows double arr[][]; arr=new double[rows][cols]; I am getting java.lang.OutOfMemoryError So anyone tell me to handle this problem. Is there any solution other than two dimension array? Regards ackumar > So anyone tell me to handle this problem. It depends what the problem is that you're trying to solve. The quickest solution to your problem, as stated, is to run the JVM with more memory. Add the -mXms 256m option to your java run command to increase ...

to use import java.lang.* or import java.lang.Math or none at all?
Hi guys, i knew that by default all java.lang classes will be imported by the compiler during compilation. but, to make it easier for the computer, should i specify which class i really will be using? does this action will boost the performance during compilation and runtime or not a matter at all? the answer to this post will definitely affect my programming style in the future when i'm considering "to import or not to import"... hmm,,, thanks in advance. JPractitioner wrote: > i knew that by default all java.lang classes will be imported by the > compiler during compilation. but, to make it easier for the computer, > should i specify which class i really will be using? does this action > will boost the performance during compilation and runtime or not a > matter at all? Whether and how you import classes has exactly zero effect at runtime. Imports (with or without wildcards) are only a kind of abbreviation provided by the compiler to save us the effort of typing in fully-qualified type names every time. In theory explicit importing should make compilation faster -- by a very tiny amount. I've never heard anyone claim that they've even managed to measure a difference let alone found a case where it made a practical difference. So the question comes down to how to write your code for maximum clarity. One school of thought asserts that you should always import each class explicitly (rather than by a wildcard). There's a fai...

java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
Hi, Can anyone help me for this exception which I am getting whil trying to conenct to MYSQL server thru TOMCAT. Thanks Maneesh org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver', cause: java.lang.NoClassDefFoundError: org/aspectj/lang/Signature at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:730) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) at foo.DBTest.init(DBTest.java:23) at org.apache.jsp.test_jsp._jspService(test_jsp.java:51) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache...

NEWBIE: Exception: java.lang.NoClassDefFoundError: DisplayApp/java/
Dear Readers, the last time I saw people asking this question was in 2000 and 2001 and no one has concluded it as to how they resolved the issue. I wrote my sample program using Eclipse. that compiled and ran to display the results at the bottom. wanted to familiarize with the tool. so wrote the program and compiled the program. when i compiled at command line, the program compiled fine. when i try to ran it: it gave the Exception: java.lang.NoClassDefFoundError: DisplayApp/java/ error. eclipse had a bunch of jar files from the c:\jsdk1.4.2._05 lib files under it. so i changed the classpath in the environmental variable to have all the jar files as displayed on the eclipse editor. ENV: WINXP. Java: C:\>echo %classpath% ..;C:\TOMCAT4129\common\lib\servlet.jar;C:\j2sdk1.4.2_05\lib\dt.jar;C:\j2sdk1.4.2_05\lib\tools.jar;C:\j2sdk1.4.2_05\jre\lib\jce.jar;C:\j2sdk1.4.2_05\jre\lib\jsse.jar;C:\j2sdk1.4.2_05\jre\lib\plugin.jar;C:\j2sdk1.4.2_05\jre\lib\rt.jar;C:\j2sdk1.4.2_05\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_05\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_05\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_05\jre\lib\ext\localedata.jar;C:\ j2sdk1.4.2_05\jre\lib\ext\sunjce_provider.jar >java -classpath %CLASSPATH% DisplayApp.java Exception in thread "main" java.lang.NoClassDefFoundError: DisplayApp/java >javac -classpath %CLASSPATH% DisplayApp.java Compiled well. >java -classpath %CLASSPATH% DisplayApp.java Exception in thread "main" java.lang.NoClassDefFo...

Please Help!!Daughter needs help with java code
Hello everyone, I apologize for taking up anyone's time with such a newbie question. However, my daughter is tearing her hair out over this code. I myself don't know anything about programming however, being the father that I am, I am hoping that someone can respond to my plea for help and provide her with a solution. Below is her code. Thank you all and God Bless!! Problem: Print out all the 4 number combinations using only the following numbers: 6, 9,0,3,1 The code is giving her only 5 combinations at the moment. This is where she needs help. //Source code// import java.mat...

java.lang.OutOfMemoryError
Hi, i wrote a java program, that create a rdf file parsing a file tree. On the last step the shockwaves and gifs are checked and the byte sizes are written in the rdf file as nodes. The 1. Problem: A java.lang.OutOfMemoryError is throwm. Sometimes on the 45 shockwave, sometimes on the 53 shockwave... code: for(int i = 0; i < objects.getLength(); i++){ String xValue = "concat(./dir/text(), ./objects/object/param[@name = 'movie']/@value)"; // XPath Ausdruck anwenden XObject xO = XPathAPI.eval(objects.item(i), xV...

Help creating java.lang.String
Hallo NewsGroup, I have this Java to create a blank string of defined size. Is there a nicer way of doing this? Thank you Michelle private String makeString(int sizeOfString) { StringBuffer sb=new StringBuffer(""); for (int i=0;i<sizeOfString;i++) sb.append(" "); return sb.toString()); } Miss. Michelle Heigardt wrote: > Hallo NewsGroup, I have this Java to create a blank string of defined > size. Is there a nicer way of doing this? > > Thank you > Michelle > > > private String makeString(int sizeOfString) > { > StringBuffer sb=new StringBuffer(""); > for (int i=0;i<sizeOfString;i++) > sb.append(" "); > return sb.toString()); > } Question is: Why would you want to make a String filled with white-spaces? If it's for format purposes, "\t" (tab) works fine, usually. -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat "Miss. Michelle Heigardt" <michelleheigardt@hotmail.com> wrote in message news:87d7e814.0412260921.3499b875@posting.google.com... > Hallo NewsGroup, I have this Java to create a blank string of defined > size. Is there a nicer way of doing this? > > Thank you > Michelle > > > private String makeString(int sizeOfString) > { > StringBuffer sb=new StringBuffer(""); > for (int i=0;i<sizeOfStrin...

CheckBox in Column of JTable: Exception: java.lang.String cannot be cast to java.lang.Boolean
Hello, I have discovered a hidden error. My project was working for awhile, but then I started to get the below error. My error comes from the fact that I'm using a checkbox in a jtable, and I'm using the below "getColumnClass". Thank you, compile: run: Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at javax.swing.JTable$BooleanRenderer.getTableCellRendererComponent(JTable.java:5412) at javax.swing.JTable.prepareRenderer(JTable.java:5735) at javax.swing.plaf.basic.BasicTableU...

Help me, problem with java.lang.reflect.Field
Hi, I have a class like this class A{ public String abc; } And i got another class use class A { A a = new A(); Field[] fields = a.getClass().getDeclaredFields(); } The problem is that i can got the name of class A's fields but i cant got the actual object to deal with. Because i dont know the name of the class A's field, so i cant use a.a = "asd". I want to set value for class A dynamically, Please help me, thanks On 25 Jan 2007 00:36:42 -0800, Nicky wrote: > The problem is that i can got the name of class A's fields but i > cant got the actual object to deal ...

Web resources about - Help needed on java.lang.NoClassDefFoundError - comp.lang.java.help

Facebook Stack Overflow
Stack Exchange log in - careers - chat - meta - about - faq Questions Tags Users Badges Unanswered Ask Question Top Questions active 5 featured ...

SDK for Android M (preview) is available now
Android-er For Android development, from beginner to beginner. Thursday, May 28, 2015 SDK for Android M (preview) is available now Android SDK ...

Post New Query
Post New Query in core java, spring, hibernate, jquery, maven, windows OS and many more.

Developer Testing
About Us [ On The Cover! ] [ About Us ] Agitation [ Tests Vs Specifications ] [ Agitator is Not a Test Generator ] [ Violent Agreement ] ...

DocJar: Search Open Source Java API
Search Java source code, javadoc, jar files.

Sun GlassFish Enterprise Server v2.1 - Error report
HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this ...

Issues - mockito - simpler & better mocking - Google Project Hosting
My favorites ▼ - Sign in mockito simpler & better mocking Project Home Downloads Wiki Issues Source New issue Search Search within: All issues ...

Clojure - Google Groups
Welcome to the Clojure mailing list. Please note that posts by new members are moderated to prevent spam.

Samsung + Material Support Library Leave it to Samsung to Samsung it up.…
Samsung + Material Support Library Leave it to Samsung to Samsung it up. Various Samsung phones are including older versions of the android support… ...

TorqueBox 2.10 comes with new leadership and JDK workarounds
A new version, new leadership, new support and a workaround for a bug in JDK 7's InvokeDynamic are the latest developments for the project that ...

Resources last updated: 3/9/2016 10:35:14 PM