?
Solved

java -jar

Posted on 2004-10-04
8
Medium Priority
?
389 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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month15 days, 1 hour left to enroll

840 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