You need to sign in to do that
Don't have an account?
Two attempts to build a .jar file
I have made two attempts at building a Java .jar file:
#1a) With this manifest file:
E:\EHT\src\META-INF>type MANIFEST.MF
Manifest-Version: 1.0
Class-Path: com com.CustomizedSoftwareSolutions com.CustomizedSoftware
Solutions.EHT lib
Created-By: 1.5.0_14 (Sun Microsystems Inc.)
Main-Class: com.CustomizedSoftwareSolutions.EHT.HTMLifyEHT
#1b)...and these .jar contents
E:\EHT\src\META-INF>cd ..
E:\EHT\src>jar tvf EHT.jar
0 Sat Sep 12 10:37:46 EDT 2009 META-INF/
187 Sat Sep 12 10:37:46 EDT 2009 META-INF/MANIFEST.MF
3255 Sat Sep 12 10:36:16 EDT 2009 com/CustomizedSoftwareSolutions/EHT/HTMLifyE
HT.CLASS
#1c)...I get these results:
E:\EHT\src>java -jar EHT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: HTMLifyEHT
In the second case, I avoided the minimalist approach, and threw in the kitchen sink to boot:
2a) With this manifest....
E:\EHT\src\META-INF>type MANIFEST.MF
Manifest-Version: 1.0
Class-Path: com com.CustomizedSoftwareSolutions com.CustomizedSoftware
Solutions.EHT org org.apache org.apache.axis org.apache.log4j javax j
avax.xml javax.xml.rpc
Created-By: 1.5.0_14 (Sun Microsystems Inc.)
Main-Class: HTMLifyEHT
#2b)...and jar contents too large to post in this thread (but verified to include my class, and everyone else's class)
E:\EHT\src\META-INF>cd ..
E:\EHT\src>jar tfv EHT.jar >jarout.txt
#2c)...I get the same result
E:\EHT\src>java -jar EHT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: HTMLifyEHT
Thanks in advance for your time and consideration.
It occurs to me that the problem may be aggravated by the fact that my class extends JApplet, and I am trying to run from the (local) command line, rather than via a served web-page (see pertinent code below):
/* (c) 2009 Customized Software Solutions */ /* All Rights Reserved */ /* @author: John Larew @version: 1.0 09/05/2009 */ package com.CustomizedSoftwareSolutions.EHT; import java.util.*; import javax.swing.*; import com.sforce.soap.enterprise.sobject.*; import com.sforce.soap.enterprise.*; import com.sforce.soap.enterprise.fault.*; import com.sforce.soap.enterprise.Error; import javax.xml.rpc.*; import org.apache.log4j.Level; import org.apache.log4j.Logger; import java.rmi.*; public class HTMLifyEHT extends JApplet { private static String message = "(c) 2009 Customized Software Solutions"; public static final org.apache.log4j.Level ON = org.apache.log4j.Level.ALL; public String html; private SoapBindingStub binding = null; private Account[] _accounts = null; public static void main(String[] args) { System.out.println("This is a main..."); System.out.println("...thats all folks"); } }
I'm not familiar with any runtime requirements for stand-alone JApplets, even though I might expect a different error if this was the case.
Thanks in advance for any thoughts/suggestions you may have.
Lest you think my previous attempts are insincere, after reviewing the above posts, I tried a third time with the following manifest file (which appears to me to be correct for this example):
Manifest-Version: 1.0
Class-Path: com.CustomizedSoftwareSolutions.EHT org.apache.axis javax.
xml.rpc org.apache.log4j com.sforce.soap.enterprise com.sforce.soap.e
nterprise.sobject com.sforce.soap.enterprise.fault
Created-By: 1.5.0_14 (Sun Microsystems Inc.)
Main-Class: HTMLifyEHT
However, this attempt resulted in the same error message.
I should also note that I include the JRE rt.jar in the classpath for the javac compile and java run-time commands.
Thanks again for any help you may be able to provide.