Class not found exception when tried running .jar file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Class not found exception when tried running .jar file

TrishalaG
Project Structure
---src
    -----main class
    -----scripts
    -----utils
--resources
    ----config properties
--testng.xml
--build.xml

I created main class in my project which invokes test suite file " testng.xml ". using ant i created executable .jar file for scripts,utils and main class..when tried to run .jar file it throws class not found exception. Is there anything i m missing out.. is it required to add testng.xml file in .jar ???  

My goal is to make a shippable package with all dependencies, including executable .jar file, resources folder, testng.xml file so that i can ship package to any system and execute my test suite. how can i do it.


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Class not found exception when tried running .jar file

TrishalaG
"The error is No Class Def found..Could not find main class..Exception in thread main" is the error......  Can someone help.... 

On Thursday, August 22, 2013 11:32:26 AM UTC+5:30, Trishala wrote:
Project Structure
---src
    -----main class
    -----scripts
    -----utils
--resources
    ----config properties
--testng.xml
--build.xml

I created main class in my project which invokes test suite file " testng.xml ". using ant i created executable .jar file for scripts,utils and main class..when tried to run .jar file it throws class not found exception. Is there anything i m missing out.. is it required to add testng.xml file in .jar ???  

My goal is to make a shippable package with all dependencies, including executable .jar file, resources folder, testng.xml file so that i can ship package to any system and execute my test suite. how can i do it.


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Class not found exception when tried running .jar file

Krishnan Mahadevan
Trishala,
Are you sure you have created your executable jar properly ?



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Fri, Aug 23, 2013 at 9:34 AM, Trishala <[hidden email]> wrote:
"The error is No Class Def found..Could not find main class..Exception in thread main" is the error......  Can someone help.... 


On Thursday, August 22, 2013 11:32:26 AM UTC+5:30, Trishala wrote:
Project Structure
---src
    -----main class
    -----scripts
    -----utils
--resources
    ----config properties
--testng.xml
--build.xml

I created main class in my project which invokes test suite file " testng.xml ". using ant i created executable .jar file for scripts,utils and main class..when tried to run .jar file it throws class not found exception. Is there anything i m missing out.. is it required to add testng.xml file in .jar ???  

My goal is to make a shippable package with all dependencies, including executable .jar file, resources folder, testng.xml file so that i can ship package to any system and execute my test suite. how can i do it.


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.