Home » Developer & Programmer » JDeveloper, Java & XML » shared memeory problem while using XML with oracle
shared memeory problem while using XML with oracle [message #91514] Wed, 16 October 2002 03:06 Go to next message
reena
Messages: 29
Registered: November 2001
Junior Member
Hi,
I am using XML with oarcle applications.
I have oracle ver 8.1.7 ,"Oracle XDK PL/SQL 9.2.0.2.0"

I pass a xml string ,parse it and travse through the document using XMLDOM.At the end freedocument and free parser.

The whole package workes fine upto 5000 records and then start giving shared memeory error
i.e. "ORA-04031: unable to allocate 4176 bytes of shared memory "
and
"ORA-29532: Java call terminated by uncaught Java exception:java.lang.ArrayIndexOutOfBoundsException: -2047 < 0"
We have suffieint shared memory and required java_pool_size.But still problem exist
What I think it is becoz freeparser and freedocument are not freeing the memory.
Can anyone pls, help on it.

it's urgent

Thanks,
Reena.
Re: shared memeory problem while using XML with oracle [message #91517 is a reply to message #91514] Wed, 16 October 2002 04:50 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
i beleive, it is bug.
Using the latest 9i XML Parser should resolve the issue.
Re: shared memeory problem while using XML with oracle [message #91525 is a reply to message #91514] Wed, 16 October 2002 20:20 Go to previous messageGo to next message
reena
Messages: 29
Registered: November 2001
Junior Member
I am already using latest oracle 9i XML parser, but still the problem exists
SOLUTION :-Re: Exception in thread "main" java.lang.NoClassDefFoundError [message #91529 is a reply to message #91514] Mon, 21 October 2002 12:36 Go to previous messageGo to next message
Girish
Messages: 16
Registered: September 1998
Junior Member
Hi All,
I was facing this problem and here is the step by step Information of ratifying this ERROR.
1) Check your CLASSPATH.
2) It should use two Important files/path in it (tools.jar , "." and rt.jar).CLASSPATH should look like this.
CLASSPATH=.;c:javalibtools.jar;c:xyzrt.jar
(Path should be according to your installation of javaSDK)
3) After having this change make sure that you should RESTART the Machine.
I hope your problem is resolved.
-Girish
Re: SOLUTION :-Re: Exception in thread "main" java.lang.NoClassDefFoundError [message #91610 is a reply to message #91529] Mon, 09 December 2002 02:24 Go to previous messageGo to next message
BishnuPriya
Messages: 1
Registered: December 2002
Junior Member
SORRY, I used the classpath according to you, but then also it giving error that "classpath not recognising as an internal or external command", but it's compiling the program.
HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #91630 is a reply to message #91610] Mon, 16 December 2002 07:03 Go to previous messageGo to next message
claude comtois
Messages: 2
Registered: December 2002
Junior Member
I have the same error and it seems that no one out there knows how to fix it.

Can anyone fix this problem!!!! I have been looking everywhere and no one has given an accurate way to fix the "Exception in thread "main" java.lang.NoClassDefFoundError:" ERROR. I have installed the JDK 1.3.1 version in a folder under my C:JDK 1.3.1 folder. I compile using "javac tryAgain.java" and run the program using "java tryAgain" here is my code:

import java.awt.*;
import javax.swing.*;

public class tryAnother extends JFrame
{

public static void main( String args[[]] )
{
System.out.println("hello");
}
}

This should work fantastically. I am running windows 2000. Why in the world does the compiler return the error Exception in thread "main" java.lang.NoClassDefFoundError: tryAgain. The name of my file is the same as the class name. My coding is by the book.

Does anyone know how to fix this error???????

E-mail me at comt00006@yahoo.com

Claude Comtois
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #91657 is a reply to message #91630] Mon, 30 December 2002 05:00 Go to previous messageGo to next message
Anil
Messages: 80
Registered: September 2001
Member
Hi

This is purely a problem with classpath.
just unset ur class path, i mean
echo %classpath% should be %classpath%
and try. It might work. else try experimenting
with just the classpath variable. This will solve this problem
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #91780 is a reply to message #91630] Wed, 12 February 2003 23:31 Go to previous messageGo to next message
Ivan
Messages: 180
Registered: June 2000
Senior Member
Hi,

I'm getting the same problem as you got. I'm running it on XP and installed 1.4 version of _03.
I really don't how it can be fixed.
Sorry.

Ivan.
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #91789 is a reply to message #91630] Wed, 19 February 2003 03:22 Go to previous messageGo to next message
Trupti
Messages: 5
Registered: February 2003
Junior Member
Hi!
The problem is due to the class path..
please check it...
The classpath should be
set classpath=.;(path of the classes)
(if defined for the first time)
then set classpath=%classpath%;(path of the classes)
(this is for the next time)
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #91823 is a reply to message #91630] Fri, 07 March 2003 10:32 Go to previous messageGo to next message
Mike
Messages: 417
Registered: September 1998
Senior Member
Anyone found a solution to this? I got the same problem, running XP. I have a "classes" directory in my c:windowsjavaclasses, so I set the classpath to that (when I enter "echo classpath", i get a reply of c:windowsjavaclasses), but when I rerun my java HelloApplet.java, I still get the same error.

TIA
Mike
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #91974 is a reply to message #91630] Wed, 07 January 2004 18:18 Go to previous messageGo to next message
Deepa Umakanth
Messages: 1
Registered: January 2004
Junior Member
I compile my program but unable to run it using "java (name of the fine)" .it says

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

wat does that mean,,plese reply to
dhinall@rediffmail.com
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92017 is a reply to message #91630] Sat, 31 January 2004 04:32 Go to previous messageGo to next message
siva krishna
Messages: 1
Registered: January 2004
Junior Member
This problem is due to the wrong naming of the filename.In java,if we use the public keyword before class keyword ,we must make sure that the class name and file name are same to run the program.So to solve the above problem,better change the filename to tryAnother.java.Then compile it using javac tryAnother.java and run the above program using java tryAnother.pls reply me if it works or not.

Thanks and regards,
Shiva
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92132 is a reply to message #91974] Mon, 22 March 2004 11:02 Go to previous messageGo to next message
vaca
Messages: 1
Registered: March 2004
Junior Member
I have the same error:

Exception in thread "main" java.lang.NoClassDefFoundError:

when I tried to run a Java client.

Did you sole the problem? Did you find a solution?

Please, help!
HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92133 is a reply to message #91630] Mon, 22 March 2004 16:41 Go to previous messageGo to next message
Adrian
Messages: 16
Registered: May 2002
Junior Member
I too have the same error.

I have been looking everywhere and no one has given an accurate way to fix the "Exception in thread "main" java.lang.NoClassDefFoundError:" ERROR. I have read these reply's about setting class paths. i am unsure how to do this.

I have installed the JDK 1.3.1 version in a folder under my C:JDK 1.3.1 folder. I compile using "javac question1.java" and run the program using "java question1.java" here is my code:

import java.io.*;

class question1{
public static void main( String[[]]args ) throws IOException
{BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter the first integer.> ");
int n1 = Integer.parseInt(stdin.readLine());
System.out.print("Enter the second integer.> ");
int n2 = Integer.parseInt(stdin.readLine());

int sum = n1 + n2;

System.out.println("The sum is: " +sum);
}
}
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92137 is a reply to message #92133] Tue, 23 March 2004 01:10 Go to previous messageGo to next message
Dominic Oyeniran
Messages: 1
Registered: March 2004
Junior Member
There are two things you need to do,
1. go to the environment settings on your computer, create CLASSPATH variable and set the CLASSPATH variable to the location of your jsdk(version)tools.jar and and rt.jar e.g.
C:jsdk1.3.1_03libtools.jar;C:jsdk1.3.1_03jrtlibrt.jar

2. You have to include .; in front of these variable.
i.e. Your CLASSPATH is now:- .;C:jsdk1.3.1_03libtools.jar;C:jsdk1.3.1_03jrtlibrt.jar
This ask the java command to look at your question1.java in the current running directory if you run java question1 at the command prompt for example c:java question1

Hope this help, kindly mail me to let me know.

Dominic
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92138 is a reply to message #92133] Tue, 23 March 2004 09:43 Go to previous messageGo to next message
Shawn Hu
Messages: 1
Registered: March 2004
Junior Member
It might be easier to use the -classpath option listed below:

javac -classpath .;C:j2sdk1.4.2_04libtools.jar question1.java

then

java -classpath .;C:j2sdk1.4.2_04libtools.jar question1
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92139 is a reply to message #92138] Tue, 23 March 2004 13:16 Go to previous messageGo to next message
Adrian
Messages: 16
Registered: May 2002
Junior Member
Hi Shawn,
Thanks for the reply although it still isnt working.
Lets go over the steps..

I have installed JDK version 1.4.1_07 in a directory called JDK hence the path is C:JDK.
When browsing this directory i have the following sub-directories...
bin, demo, include, jre, and lib.
Under the lib directory is the file tools.jar
Under jrelib directory is the file rt.jar.

Now i am at the environment variable section.
There are two sections you can set the classpath
Do you set the class path "User Variables for Administrators" or the bottom part of the screen which is "System Variables".
I wasnt too sure but i chose "System Variables".
Anyway i clicked the new button and it comes up with "Variable name" and "Variable Value".
Under "Variable name i enetered the following... CLASSPATH
Under "Variable Value" i enetered the following...
.;C:jdklibtools.jar;C:jdkjrelibrt.jar.

I restarted my PC and now i do the following.
Copied the file question1.java file to c:jdkbin.
Open a command prompt and go to that directory.
i type... javac question1.java and it compiles successfully.
I then tupe... java question1.java and it returns the error message that i have always been getting.

I have just started learning Java as a something to do in my spare time alhtough i cant get past this error message. Am i doing something wrong?

Thanks again
Adrian
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92140 is a reply to message #92137] Tue, 23 March 2004 13:17 Go to previous messageGo to next message
Adrian
Messages: 16
Registered: May 2002
Junior Member
Hi Dom,
Thanks for the reply although it still isnt working.
Lets go over the steps..

I have installed JDK version 1.4.1_07 in a directory called JDK hence the path is C:JDK.
When browsing this directory i have the following sub-directories...
bin, demo, include, jre, and lib.
Under the lib directory is the file tools.jar
Under jrelib directory is the file rt.jar.

Now i am at the environment variable section.
There are two sections you can set the classpath
Do you set the class path "User Variables for Administrators" or the bottom part of the screen which is "System Variables".
I wasnt too sure but i chose "System Variables".
Anyway i clicked the new button and it comes up with "Variable name" and "Variable Value".
Under "Variable name i enetered the following... CLASSPATH
Under "Variable Value" i enetered the following...
.;C:jdklibtools.jar;C:jdkjrelibrt.jar.

I restarted my PC and now i do the following.
Copied the file question1.java file to c:jdkbin.
Open a command prompt and go to that directory.
i type... javac question1.java and it compiles successfully.
I then tupe... java question1.java and it returns the error message that i have always been getting.

I have just started learning Java as a something to do in my spare time alhtough i cant get past this error message. Am i doing something wrong?

Thanks again
Adrian
The solution I found to the error: Exception in thread "main" java.lang.NoClassDefFoundError [message #92144 is a reply to message #91630] Wed, 24 March 2004 23:39 Go to previous messageGo to next message
Mounir Mhamdi
Messages: 1
Registered: March 2004
Junior Member
Claude,

I had the same error (Exception in thread "main" java.lang.NoClassDefFoundError) generated when I run java command to execute a simple Java application that simply prints "Hello World".
I am having JDK 1.4 installed over XP in a folder called "Java" in C: drive.
In case you have same OS, the solution I found is that no need for CLASSPATH variable, (what I did is that I delete it) but you need just to modify you PATH system variable by adding the path to your "bin" folder;meaning: add to the right side of the PATH varibale something lik: ;C:xyzbin.Where xyz is the path specific to your installation. To check that you have done it correctly, open a DOS window and type JAVAC. You should get the response of the JAVAC compiler and not a system error.A frequent mistake is that people keeps testing with the same DOS window while making variable changes.You should open a new DOS window once you made a change to be sure about the results of your tests. For XP, no need for restarting the machine at every system variable change.Moreover, make sure that your class name is the same as your file name where your java class is defined.
After doing this I guess you will be able to run you application without this Exception in thread "main" java.lang.NoClassDefFoundError.
Hope this helps.

Mounir Mhamdi
Re: The solution I found to the error: Exception in thread "main" java.lang.NoClassDefFoundError [message #92147 is a reply to message #92144] Thu, 25 March 2004 13:01 Go to previous messageGo to next message
Adrian
Messages: 16
Registered: May 2002
Junior Member
Hi Mounir,
Thanks for the information about how to get the bin directory commands working from any directory in a dos prompt. Although i too am getting the same error (in thread "main" java.lang.NOClassDefFoundError" even though i have followed your steps.
Lets go over the steps..

I have installed JDK version 1.4.1_07 in a directory called JDK hence the path is C:JDK.
When browsing this directory i have the following sub-directories...
bin, demo, include, jre, and lib.
Under the lib directory is the file tools.jar
Under jrelib directory is the file rt.jar.

Now i am at the environment variable section.
There are two sections you can set the classpath
Do you set the class path "User Variables for Administrators" or the bottom part of the screen which is "System Variables".
I wasnt too sure but i chose "System Variables".
Anyway i clicked the new button and it comes up with "Variable name" and "Variable Value".
Under "Variable name i enetered the following... CLASSPATH
Under "Variable Value" i enetered the following...
.;C:jdklibtools.jar;C:jdkjrelibrt.jar.

I restarted my PC and now i do the following.
Copied the file question1.java file to c:jdkbin.
Open a command prompt and go to that directory.
(with your steps i dont need to go to the bin directory anymore but lets just do it this way for now)
i type... javac question1.java and it compiles successfully.
I then type... java question1.java and it returns the error message that i have always been getting.

I have just started learning Java as a something to do in my spare time alhtough i cant get past this error message. Am i doing something wrong?
My code is the following...

import java.io.*;

class question1{
public static void main( String[[]]args) throws IOException
{BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter the first integer.> ");
int n1 = Integer.parseInt(stdin.readLine());
System.out.print("Enter the second integer.> ");
int n2 = Integer.parseInt(stdin.readLine());

int sum = n1 + n2;

System.out.println("The sum is: " +sum);
}
}

Thanks again
Adrian
Re: The solution I found to the error: Exception in thread "main" java.lang.NoClassDefFoundError [message #92148 is a reply to message #92144] Thu, 25 March 2004 13:33 Go to previous messageGo to next message
Alan
Messages: 68
Registered: October 1999
Member
i can't get mine to work and i dont understand the explinations given. can anybody explain to me how to fix it in non technical terms.
HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92154 is a reply to message #91630] Fri, 26 March 2004 23:10 Go to previous messageGo to next message
Janek
Messages: 1
Registered: March 2004
Junior Member
I am TOO having problems with this error!!! :(

This has made me depressed. I created a few java programs at university campus (using unix OS) which work FINE. However, when I try to run the programs over a remote network on my windowsXP at home they come up with Exception in thread "main" java.lang.NoClassDefFoundError:

I have read through the solutions posted but I HAVE NO IDEA what to do. What is the actually reasoning behind the error? Is it because of windowsXP or is it because of being on remote host?

Thanks for you time :)
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92158 is a reply to message #91630] Mon, 29 March 2004 02:49 Go to previous messageGo to next message
Bachir
Messages: 2
Registered: March 2004
Junior Member
Hi Claude!

When you compile, you said you proceed as follows:
< I compile using "javac tryAgain.java" and run the program using "java tryAgain" >

This is not enough for Java to run your class. You need to set a classpath.

Compile as you always did but run the class this way:

"java -classpath . tryAgain"

To inform Java that the class _tryAgain_ you are trying to run is in the current directory.

I hope it helps...

Read little more here: http://www.weblogic.com/docs51/admindocs/classpath.html
Exception in thread "main" java.lang.NoClassDefFoundError [message #92159 is a reply to message #92158] Mon, 29 March 2004 03:02 Go to previous messageGo to next message
Bachir
Messages: 2
Registered: March 2004
Junior Member
Dear All!

You can read little more here:

http://mindprod.com/jgloss/classpath.html
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError (answer) [message #92163 is a reply to message #91630] Tue, 30 March 2004 06:07 Go to previous messageGo to next message
Velurajesh Shkandlar
Messages: 1
Registered: March 2004
Junior Member
This is how it's done:

SET CLASSPATH=N:myDir;C:j2sdk1.4.2lib

Where:
N = the drive the files reside on
myDir = the directory, or structure to the directory your java files and compiled classes are.
C = drive the java sdk is installed to
j2sdk1.4.2lib = directory where the java libraries are

TIP: when compiling use file names, when running use class names:

javac *.java
java HelloWorld
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError (answer) [message #92170 is a reply to message #92163] Wed, 31 March 2004 13:38 Go to previous messageGo to next message
Mona
Messages: 9
Registered: December 2001
Junior Member
I have same problem how to solve
Exception in thread "main" java.lang.NoClassDefFoundError: CotTranslation
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError (answer) [message #92171 is a reply to message #92163] Wed, 31 March 2004 17:07 Go to previous messageGo to next message
Adrian
Messages: 16
Registered: May 2002
Junior Member
Although i too am getting the same error (in thread "main" java.lang.NOClassDefFoundError"
Lets go over the steps..

I have installed JDK version 1.4.1_07 in a directory called JDK hence the path is C:JDK.
When browsing this directory i have the following sub-directories...
bin, demo, include, jre, and lib.
Under the lib directory is the file tools.jar
Under jrelib directory is the file rt.jar.

Now i am at the environment variable section.
There are two sections you can set the classpath
Do you set the class path "User Variables for Administrators" or the bottom part of the screen which is "System Variables".
I wasnt too sure but i chose "System Variables".
Anyway i clicked the new button and it comes up with "Variable name" and "Variable Value".
Under "Variable name i enetered the following... CLASSPATH
Under "Variable Value" i enetered the following...
.;C:jdklibtools.jar;C:jdkjrelibrt.jar.

I restarted my PC and now i do the following.
Copied the file question1.java file to c:jdkbin.
Open a command prompt and go to that directory.
(with your steps i dont need to go to the bin directory anymore but lets just do it this way for now)
i type... javac question1.java and it compiles successfully.
I then type... java question1.java and it returns the error message that i have always been getting.

I have just started learning Java as a something to do in my spare time alhtough i cant get past this error message. Am i doing something wrong?
My code is the following...

import java.io.*;

class question1{
public static void main( String[[]]args) throws IOException
{BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter the first integer.> ");
int n1 = Integer.parseInt(stdin.readLine());
System.out.print("Enter the second integer.> ");
int n2 = Integer.parseInt(stdin.readLine());

int sum = n1 + n2;

System.out.println("The sum is: " +sum);
}
}

I dont really understand what you were saying about the Set classpath. Can you please explain in step detail where and what i need to do.
Thanks again
Adrian
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92200 is a reply to message #92158] Thu, 15 April 2004 10:48 Go to previous messageGo to next message
Abdourahmane Senghor
Messages: 1
Registered: April 2004
Junior Member
This is the solution
thanks
java lang exception [message #92205 is a reply to message #91630] Fri, 16 April 2004 22:56 Go to previous messageGo to next message
khaled
Messages: 4
Registered: August 2001
Junior Member
plz
can u help me to fix java lang exception, or to break digichat firewall
best regards
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError (answer) [message #92216 is a reply to message #92171] Fri, 23 April 2004 01:04 Go to previous messageGo to next message
rajrajeswar
Messages: 1
Registered: April 2004
Junior Member
compile with javac filename with java extension

run it by: java classname no extension nothing...get the desired answer

thus

javac question1.java

java question1
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92218 is a reply to message #91630] Fri, 23 April 2004 07:07 Go to previous messageGo to next message
Anthony
Messages: 48
Registered: September 2000
Member
To fix this problem you have to place the directory where your application is locate in the path. If you are running Xp go to control panel and then go into systems, at systems click on the advance tap then click on the Environment Variable. From here you can add your application's directory to the path(along with the other defined paths), also add the path for java and javac example.
java javac path=c:j2sdk1.4.2_04bin;
your applicatin path=c:MyAppDir;
That it :)
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92219 is a reply to message #91630] Fri, 23 April 2004 07:11 Go to previous messageGo to next message
Anthony
Messages: 48
Registered: September 2000
Member
To fix this problem you have to place the directory where your application is locate in the path. If you are running Xp go to control panel and then go into systems, at systems click on the advance tap then click on the Environment Variable. From here you can add your application's directory to the path(along with the other defined paths), also add the path for java and javac (The programs used to conpile your java application). After doing this you will not have to type out the paths for these compilers or for your application just type javac myapp.java and java myapp at the command promp.

Examples for putting directorys into the path:
java javac path=c:j2sdk1.4.2_04bin;
your applicatin path=c:MyAppDir;
That it :)
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError (answer) [message #92256 is a reply to message #92170] Thu, 06 May 2004 21:48 Go to previous messageGo to next message
Watcher
Messages: 1
Registered: May 2004
Junior Member
Simply, just try this:

javac someJavaFile.java
java -classpath . someJavaFile

it works!
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError(Another Question) [message #92264 is a reply to message #92163] Tue, 11 May 2004 22:06 Go to previous messageGo to next message
sai krishna
Messages: 8
Registered: July 2001
Junior Member
Hi every 1,
Initially i was getting the java.lang.NoClassDefFoundError

Then i changed my classpath...and every thing is working fine.
Thanks to you all.

But,
When i say javac *.java

It says,

>javac *.java
ListOfNumbersWOHandler.java:7: class ListOfNumbers is public, should be declared in a file named ListOfNumbers.java
public class ListOfNumbers {
^
testBR.java:9: class BookRegistration is public, should be declared in a file named BookRegistration.java
public class BookRegistration
^
2 errors

I don't understand, what is wrong if the class is public ??

But if i individually compile each of the files in the directory...
it is working fine...

I am curious to know why this error had come...
Regards,
SK.
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError (answer) [message #92274 is a reply to message #92163] Fri, 14 May 2004 01:58 Go to previous messageGo to next message
Matt
Messages: 43
Registered: September 1999
Member
OH GOD THANKS, I don't care if you are even reading this anymore claude, but, damn, thanks for your help.
Exception in thread "main" java.lang.NoClassDefFoundError [message #92275 is a reply to message #92148] Fri, 14 May 2004 06:54 Go to previous messageGo to next message
BIndi
Messages: 4
Registered: March 2003
Junior Member
import java.io.*;
import java.lang.*;
public class k extends Thread {
public static void main (String[[]] args) throws IOException, InterruptedException {
String[[]] cmdArray = {"c:\wtk20\bin\emulator","-classpath audiodemo.jar", "-Xdescriptor:audiodemo.jad"};
Process proc = Runtime.getRuntime().exec("a.bat");
System.out.println("hello");
Thread.currentThread().join();
}
}

the above is my code n i m trying to run it but i m not able to do it successfully can u please send me the solution
my file is oc c:
and my jdk is as under C:j2sdk1.4.2_01bin
i have made a batch file on c:/
which is as underPATH=c;j2sdk1.4.2_01bin
set CLASSPATH=c;bindi
can u please reply as soon as possible
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92279 is a reply to message #92219] Sun, 16 May 2004 21:29 Go to previous messageGo to next message
sai krishna
Messages: 8
Registered: July 2001
Junior Member
my classpath and other variables are perfectly set..but i am still getting this error...
Any one plz help me.

Thanks in advance.

Regards,
TSK.
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError (answer) [message #92291 is a reply to message #92163] Wed, 19 May 2004 12:24 Go to previous messageGo to next message
PARAG M. DEORUKHKAR
Messages: 1
Registered: May 2004
Junior Member
Or you can use -cp option while executing your Claaa file. e.g java -cp <your folder path where class file is present> <classname> this will avoid making frequent changes to your environment setting if you are running from diff. folders.
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError (answer) [message #92294 is a reply to message #92256] Thu, 20 May 2004 07:45 Go to previous messageGo to next message
AL
Messages: 24
Registered: October 2000
Junior Member
Wonderful mate this helped loads. Any idea why this worked when other methods such as setting classpaths etc. didn't? Using Eclipse it spits out errors about my packages being incorrect (alpha.src.alpha.common.utils.jars) even though it compiles using ant with a build.xml file...

Weird.

But thanks again this solved problem and impressed my boss who was also suffering :D

Al.
Re: HELP: Exception in thread "main" java.lang.NoClassDefFoundError [message #92297 is a reply to message #92279] Thu, 20 May 2004 12:31 Go to previous messageGo to previous message
Taz
Messages: 1
Registered: May 2004
Junior Member
Did u ever get this fixed. I'm still getting this error in xp
Previous Topic: XMLDB
Next Topic: Urgent help
Goto Forum:
  


Current Time: Mon Nov 25 18:03:46 CST 2024