?
Solved

java -jar

Posted on 2004-10-04
8
Medium Priority
?
386 Views
Last Modified: 2013-11-23
I have a jar file called dumbster.jar

This jar file has several classes and a manifest file.
A class with this jar file, SimpleSmtpServer.class , is defined as such:
SimpleSmtpServer implements Runnable
 public void run() {
...

I was having a problem with the manifest file, so I added the following:
Main-Class: SimpleSmtpServer

Now I receive this error:
Exception in thread "main" java.lang.NoClassDefFoundError: SimpleSmtpServer

Now what?
0
Comment
Question by:Paullkha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 6

Expert Comment

by:expertmb
ID: 12217334
Main-Class: SimpleSmtpServer

does this class contains main() method in it
0
 
LVL 6

Expert Comment

by:expertmb
ID: 12217379
>>Exception in thread "main" java.lang.NoClassDefFoundError: SimpleSmtpServer
put complete package name
Main-Class: com.abc.def.ghi.SimpleSmtpServer
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 12217783
I believe your jar is meant to act as an applet library.
;JOOP!
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 15

Expert Comment

by:babuno5
ID: 12238972
Hello
Main-Class:
this usually contains the name of the Class which contains the main Function

"main" java.lang.NoClassDefFoundError: SimpleSmtpServer
Usually this error comes when the Class does not contain the main class or
when the classpath is having some problems.
try putting the name of main class
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 12246096
... and an Apllet doesn't contain a main ... because the browser it will run in has the main().
Try to run this jar in an appletviewer !
;JOOP!
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 12246098
I meant   Applet   not Apllet.
;JOOP!
0
 
LVL 2

Author Comment

by:Paullkha
ID: 12248274
 public void run() {
that is all it has , no main


 I will try the Applet - not sure of all of this...
0
 
LVL 15

Accepted Solution

by:
babuno5 earned 500 total points
ID: 12249922
Hello,
well do u have a applet or a program containing main
well if applet then it can only be executed by a browser or appletviewer
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question