Solved

Problem running jar file

Posted on 2011-03-06
9
410 Views
Last Modified: 2012-05-11
I am trying to run milk-1-0.jar file from this website. I have jre installed and set my classpath using: set CLASSPATH=C:\Users\chudy\Desktop\Work\wekafiles\milk\milk-1-0.jar . When I am trying to run the file from a command line using java milk.classifiers.DD -t data.arff according to this file http://www.cs.waikato.ac.nz/~ml/milk/README I am getting following error message:

Exception in thread "main" java.lang.NoClassDefFoundError: milk/classifiers/DD
Caused by: java.lang.ClassNotFoundException: milk.classifiers.DD
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: milk.classifiers.DD.  Program will exit.

How to run it?
0
Comment
Question by:chudyksg
  • 7
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 35046323
Please run the following and attach the file listing.txt
jar tv milk-1-0.jar >listing.txt

Open in new window

0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 35046365
Just checked: that jar file is not intended to be used like that: you need to unjar it and place the root folder in your classpath
0
 

Author Comment

by:chudyksg
ID: 35046371
I try to run it but nothing is happening. It just creates and empty txt file
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 86

Expert Comment

by:CEHJ
ID: 35046377
How are you trying to run it?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35046441
If you run the app without arguments, it will tell you what arguments you need
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35046650
I explained the problem clearly. The software runs for me
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35063212
Accept http:#35046365 please
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35068070
:)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

830 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