femi lami

+ Follow
since Dec 01, 2003
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by femi lami

The contents of the Manifest file I created is:

Manifest-Version: 1.0

Created-By: 1.6.0 (Sun Microsystems Inc.)

Name: voiceexpert/Symptoms.class

Java-Bean: True

This gave the error mesage: invalid header field name: Manifest-Version
13 years ago
I have removed the Main-Class header, yet the same error still persisted.
What do you think I can do to get over this problem?
13 years ago
I tried what you advised but still having the same problems.
Could you please explain what the following mean and how to actually follow these guidelines to jar my files?

section: *header +newline
nonempty-section: +header +newline
newline: CR LF | LF | CR (not followed by LF)
header: name : value
name: alphanum *headerchar
value: SPACE *otherchar newline *continuation
continuation: SPACE *otherchar newline
alphanum: {A-Z} | {a-z} | {0-9}
headerchar: alphanum | - | _
otherchar: any UTF-8 character except NUL, CR and LF
13 years ago
I have a package called voiceexpert which contains three classes: Disease, DiagnosingEngine and Symptoms which is a JavaBean. Symptoms makes use of Disease and DiagnosingEngine objects.

voiceexpert is stored in the directory: c:\diagapp3

I compiled Symptoms.java as below:
c:\diagapp3> javac -d . Symptoms.java

The class files for Disease.java, DiagnosingEngine.java and Symptoms.java are placed in the directory: voiceexpert.

I created a Manifest.txt file inside c:\diagapp3 containing the following:




I later created the jar file with the command:

jar cfm jjj.jar Manifest.txt *

But, I am having the error message: invalid header field

What can I do to remove this error?

Note: I created the Manifest.txt using utf-8 encoding. My code is to be used in a third-party application and that is why it does not contain a main method.
13 years ago
Thanks for your reply, but I think I need to explain better what I am trying to achieve.

My Java code (an expert system) embeds Jess and I need to create a "jar" file of the project. I have imported jess into my Java code using the statement "import jess.*;" and I have also included "jess.jar" in the classpath of the project. Now that I want to create a "jar" file of the application so that it will be runnable on another system having JVM, do I need to still make a jar file of the "jess.jar" file to be included in the project's jar file?

Also, my code makes use of ".clp" file in which the rules for the appliaction are stored. Do I need to include this file as part of the files needed to make the project's jar file.

Lastly, can ".java" file be inluded in the in the jar file or is it only their ".class" files that must be there?
13 years ago
My Java code makes use of an external jar file which has been included in my classpath but not in the same directory as my project. My program is working perfectly. Now, I want to create a jar file of the project. Do I need to copy the external jar file used by my program into my project directory, or by default it will be included since the classpath has already been set to recognize it?
13 years ago
Please,I am embeding Jess into my Java code and it is like the file containing my rules is not being loaded. Please, how can I make sure NetBeans laod this rules file?

I am also having the error below being generated by NetBeans:

Exception in thread "main" java.lang.ClassCastException: java.util.HashMap$KeyIterator
at expertvoice.DiagnosingEngine.execute(DiagnosingEngine.java:42)
at expertvoice.expertvoice.main(expertvoice.java:28)
Java Result: 1

How can I solve this problem?

My code is as below:

I am trying to embed Jess in my Java code developed using NetBeans IDE 6.5.
I inlcuded the statement import jess.*; in my Java code so as to make the library available. When I ran the program, it gave an error message that the file containing the rule in JessML (.CLP file) could not be opened. Please, how can I solve this problem. I already included jess.jar file in the classpath.
13 years ago
I have Java code as below:

package expertvoice;

* @author Oyelami
//import jess.*;
import jess.JessException;
//import java.util.Iterator;
public class expertvoice {

* @param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
Symptoms s=new Symptoms("sweating", "headache", "diarrhea");
DiagnosingEngine engine = new DiagnosingEngine("sweating", "headache", "diarrhea");
Disease diseaseobject=engine.execute();
String result=diseaseobject.diagnosis;

}catch (JessException e){}


But I am having the error below:

Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - exception jess.JessException is never thrown in body of corresponding try statement
at expertvoice.expertvoice.main(expertvoice.java:21)

Please, what can I do to remove this error?
13 years ago
Please, could anyone tell me how to use a library packaged as a jar file in my Java code using NetBeans?