The manifest file "could not find the main class."

The main class file is inside a folder in the created Jar file, but is not in a package. But when I double-click the Jar file, it says it could not find the main class. I am using Windows. I have tried each of the following lines in the manifest, but none are working:
Main-Class: Installer
Main-Class: setupFiles/programFile/Installer
Main-Class: setupFiles\programFile\Installer
Main-Class: setupFiles.programFile.InstallerThe main class is inside the setupFiles/programFile directory. Please Help!
Thanks in advance,
~ Tom

Hi Tom,
The main class file is inside a folder in the created
Jar file, but is not in a package. This is the problem. A JAR file is not an arbitrary ZIP file, where you can arrange directories as you like. The structure of a JAR file always has to follow the package structure. So your Installer class must be on the top level and not in directory setupFiles/programFile.
You might add non-class files in other directores and can access them as resources, but you have to put the class files into their "natural" directories.

Similar Messages

  • Executable JAR file: Could not find the main class.

    Hello,
    I have a problem with making an executable JAR file.
    I have written a JAVA program that consists of five different classes of which User.java is the main class and I have saved a text document with Main-Class: User and a blank line after that.
    If I try:
    jar cmf MainClass.txt User.jar User.class Beheerder.class Operator.class Manager.class MaakVisueelSchema.class
    it makes a executable jar file which actually works! :)
    But when the Operator class trys to open the MaakVisueelSchema class the screen stays blank.
    I can run MaakVisueelSchema with java MaakVisueelSchema.
    So I tried to make an executable JAR that consists only of MaakVisueelSchema, the same way as I did for User:
    Main-Class: MaakVisueelSchema
    jar cmf MainClass.txt MaakVisueelSchema.jar MaakVisueelSchema.class
    Then I get the error message:
    Could not find the main class. Program will exit.
    from the Java Virtual Machine Launcher.
    The big difference between MaakVisueelSchema and the other classes is that MaakVisueelSchema contains a PaintComponent method and an ComponentListener. Is it possible that one of those creates the error?
    Can anyone help me with this problem?
    Thanks in advance!
    Bye!

    Yes,
    I tried:
    jar xvf MaakVisueelSchema.jar
    and it returns:
    META-INF/
    META-INF/MANIFEST.MF
    MaakVisueelSchema.classN/G. You need to manually create a manifest file in a text editor, have it point to your main class, and enter it in your jar command as an argument.

  • The Manifest Designer could not import the certificate

    What I'm trying to accomplish here is to have the .appx file signed during build time so that the following command would work or even better I should not need it anymore
    set path=%path%;"C:\Program Files (x86)\Windows Kits\8.1\bin\x64"
    SignTool.exe sign /a /f certificate.pfx /fd SHA256 /v /p MySecretPassword TestApp.appx
    I opened package.windows.appmanifest file (located in TestApp_root\TestApp\bld\Release\platforms\windows directory) in the editor view, chose Packaging tab and clicked Choose certificate... From there I chose Select from File... from the Configure Certificate
    drop down menu and selected the .pfx we purchased from Symantec few weeks ago. After that I typed in password and password confirmation as requested.
    I ended up getting an error message "The Manifest Designer could not import the certificate", The certificate you selected is not valid for signing because it's either expired or has another issue.
    I checked that the certificate is listed in certmgr.msc Trusted Root Certificate Authorities > Certificates view and it's issued to our Company name.
    In the Manifest Designer Publisher display name matches our Company name, but Publisher is set to CN=$username$
    I tried to change that to CN=Company Name, OU=Company Name that was mentioned in the certificate, but still no luck.
    Certificate also matches the listed requirements: http://stackoverflow.com/questions/22288410/choosing-a-certificate-for-a-windows-store-application-via-the-package-appxmanif
    How to proceed from here?

    Hi terodev,
    I found a similar discussion on the forum:
    https://social.msdn.microsoft.com/forums/windowsapps/en-us/d858d189-6d14-4c8d-809d-d6c841dd8866/using-domain-certificate-for-app-signing
    Could you take a look and give a try to see if it helps?
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • JAR  file:      could not find the main class.

    I have been working with Java satisfactorily for about two years.
    Installed a bigger hard disk.
    Installed Windows XP.
    Downloaded java.
    Downloaded java jdk 1.6.0_07
    Downloaded java3d 1.5.2
    Downloaded Eclipse Ganymede.
    A new project, a new class with an existing and working java file. It did function in eclipse.
    Generated a jar file with:
    Export \ JAR FILE \ select files and the destination for the Jar file .....
    ... next...next filled the field Main Class
    This generates the jar files, which have worked before.
    And now the error: could not find the main class.
    Thand you for your help.

    Executing a jar file means it will not read from the CLASSPATH environment variable. I learnt this the hard way a few weeks ago and I had to resort to different measures to work around it.
    Your problem does sound weird, but check that the last line in your manifest file is a new line. If it's not, the manifest is not read and parsed correctly.
    To test, do this: remove everything from the manifest that you don't need, except the Manifest-Version and Main-Class attributes. Make sure the last line is a new line, and see if it works.
    Cheers

  • Execute jar file: "could not find the main class" program will terminate

    Hey,
    I am new to Java. I have started to make a small java program which supposed to help me at my studies to lean the Dominic Memory System. I have used the latest version of Netbeans 5.5.1 to build my program in. I have two problems which I cannot figure out how to solve, please help me.
    The first problem is that the java script I have made works when I compile it in Netbeans, but when I create a Jar file it does not work. I receive a pop up message in windows ?could not find the main class program will terminate? when I execute the jar file.
    The second problem I have is that I need to compare the strings generated by the "numbers" and "TIP" and if the numbers is not identical the numbers in the ?Center? JPanel should be highlighted as red.
    If anyone would like to clean up the code I would be pleased. I have copied quite a lot from anyone because of my one lack of knowledge.
    * GoListener.java
    * Created on 12. september 2007, 21:48
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package grandmaster;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Vector;
    import java.util.StringTokenizer;
    import java.awt.Color;
    * @author Computer
    public class GoListener implements ActionListener {
    private JTextField viewer;
    private JTextField TIP;
    private JTextField freq;
    private JTextField max_num;
    private Vector numbers;
    public GoListener(JTextField j,JTextField k, JTextField m, JTextField f, Vector n) {
    freq = f;
    max_num = m;
    viewer = j;
    numbers = n;
    TIP = k;
    public void actionPerformed(ActionEvent e){
    int time = Integer.valueOf(max_num.getText());
    int f = Integer.valueOf(freq.getText());
    if (e.getActionCommand() == "GO") {
    for (int i = 0; i< time;++i) {
    int number=0;
    number = (int)Math.floor(100*Math.random());
    while(number>51){
    number = (int)Math.floor(100*Math.random());
    if(number<=9){
    viewer.setText(" "+"0" + String.valueOf(number) + " ");
    } else{
    viewer.setText(" " + String.valueOf(number) + " ");
    viewer.paintImmediately(viewer.getBounds());
    numbers.add(number);
    try {
    Thread.sleep(f*1000);
    } catch (Exception exp) {
    viewer.setText(" XX ");
    viewer.paintImmediately(viewer.getBounds());
    if (e.getActionCommand() == "VIEW") {
    try {
    //int numb = Integer.valueOf( TIP.getText() ).intValue();
    StringTokenizer tokenizer = new StringTokenizer(TIP.getText(), " ");
    String[] split = null;
    int tokenCount = tokenizer.countTokens();
    if (tokenCount > 0) {
    split = new String[tokenCount];
    for (int current = 0; current < tokenCount; current++) {
    split[current] = tokenizer.nextToken();
    viewer.setText(" " + String.valueOf(numbers) + " ");
    // k=numbers(1);
    /*while(c<i){
    String.valueOf(k).equals(split[1]);
    c++;
    TIP.setText(" " + split[2] + " ");
    } catch (Exception exp) {
    try {
    //string testit = numb.toString();
    //String str = "" + numb;
    //viewer.setText(str);
    //viewer.setText(numbers.toString());
    numbers.clear();
    } catch (Exception exp) {
    * Main.java
    * Created on 12. september 2007, 21:07
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package grandmaster;
    import java.util.Vector;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.JButton;
    import java.awt.*;
    import grandmaster.GoListener;
    * @author Computer
    public class Main extends JFrame {
    private JTextField viewer;
    public JTextField TIP;
    // private TextInputPanel TIP;
    private Vector numbers;
    /** Creates a new instance of Main */
    public Main() {
    numbers = new Vector();
    JPanel p = new JPanel(new GridLayout(0,4));
    JButton go = new JButton();
    JButton view_num = new JButton();
    go.setText("Go!");
    go.setVisible(true);
    go.setActionCommand("GO");
    view_num.setText("VIEW");
    view_num.setVisible(true);
    view_num.setActionCommand("VIEW");
    JTextField max_num = new JTextField();
    max_num.setText("5");
    JTextField freq = new JTextField();
    freq.setText("1");
    viewer = new JTextField();
    viewer.setText("XX");
    TIP = new JTextField("");
    p.add(go);
    p.add(max_num);
    p.add(freq);
    p.add(view_num);
    getContentPane().add(p,BorderLayout.NORTH);
    getContentPane().add(viewer,BorderLayout.CENTER);
    getContentPane().add(TIP,BorderLayout.SOUTH);
    setSize(200,200);
    GoListener g = new GoListener(viewer,TIP,max_num, freq, numbers);
    go.addActionListener(g);
    view_num.addActionListener(g);
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    Main window = new Main();
    window.setVisible(true);
    }

    NetBeans questions should be posted to the NB site. It has mailing lists and associated forums.
    This tutorial from the NB site addresses running programs outside of NB
    http://www.netbeans.org/kb/articles/javase-deploy.html
    When you compare objects, use ".equals()" and reserve == for comparing values.

  • Error when opening a new file: "Could not find the user documents directory"

    Why can't I create a new file and I get this error everytime: "Could not find the user documents directory"?

    Hi Team,
    Please check this forum thread with similar issue.
    Create New gives an error "Could not find the user document directory"
    Regards,
    Devendra

  • Running JAR files (Could not find the main class error)

    Hi all,
    I'm having a bit of a problem with my app. I created an application with the current Netbeans edition, containing multiple .class files, and a few .jar libraries that are needed too.
    Now I'm having problems with running the .jar that the Netbeans creates, so I figured I'd make a one on my own.
    Okay, this is what I have going on:
    C:\MyApp\ <--- root for the application
    C:\MyApp\src\ <--- this is where the .class files are
    C:\MyApp\lib\ <--- here are the .jar libraries which are needed
    C:\MyApp\jar.exe
    C:\MyApp\Manifest.txt
    Now I have a couple questions.
    1. Is it ok that the .class files all have a "package MyPackage; " thing in the beginning?
    2. How should I proceed on making the Manifest.txt file correctly? I have tried various different outputs and read a few topics here from how it should be done, but I just can't nail it. Currently my Manifest looks like:
    Main-Class: MyPackage/Myapp
    Class-Path: lib/xxx.jar lib/xxx2.jar lib/xxx3.jar
    Any help would be appreciated! Thanks.

    Oh, almost forgot:
    3. The right way to create a jar? I used this:
    C:\MyApp\jar cmf Manifest.txt MyJar.jar src\*.class
    And system is Windows XP.

  • Could not find the main class ! exception.

    hi,
    I create one java project. for this I am using netbeans 5.
    I try to run the project jar file stff.jar. When run using "java -jar stff.jar " , it throws error "could not find the main class. program will exit".
    I am extracting this jar file, in manifest, main class is set.
    i.e, in manifest, Main-Class: ems.emsFrame.
    ems is my folder ,inside it main class kept.
    here, emsFrame is my main class where " public static void main (String args[])" is located.
    I am also, set the class path for that class folder(ems) and run.
    The same error ("could not find the main class. program will exit") occured.
    Why this error occured.
    also,I am uninstall the jdk and reinstall .
    whats my problem.
    bye

    yes sir.
    In projects, inside it, in Libraries ,the SNMPInquisitor.jar is located.
    inside that jar, snmp package is located.
    but, when build and run, there is no problem sir.
    Only when i try to run the stff.jar file (java -jar stff.jar), that time only the exception thrown.
    when I double click that jar, it show, "could not find the main class. program will exit". But, I am adding the main class in manifest. when i open manifest.mf, it show, Main-Class: ems.emsFrame.
    but, when i run jar thro' cmd window, it shows,
    Exception in thread "main" java.lang.NoClassDefFoundError: snmp/SNMPGetException
    at ems.emsFrame.<init>(emsFrame.java:1163)
    at ems.emsFrame.<clinit>(emsFrame.java:1155).
    i am still trying it.

  • After Saving File get Message "Could not find the included template"

    I have a strange issue going on and it's becoming very, very annoying.  When I edit a file on our web server (it's a virtual machine running Windows Server 2008) and then try to view it in my browser, I get the error message "Could not find the included template".  If I refresh the page (sometimes upwards of 40 times) my page with whatever changes I made will finally load.  I checked with our system administrator and he's not aware of what could be causing this. 
    It happens on whatever the most recent file I was working on.  If it's a ColdFusion file, I get the "Could not find the included template" error.  If it's a change to my stylesheet, the styles will not load.  Again, in both instances it takes hitting F5 upwards of 40 times until the page displays correctly. 
    Has anybody else ever encountered such an issue?  It's happening on two separate virtual servers (both Win 2008), one has CF9 installed and the other CF10.  It get's frustrating having to referesh before the page or stylesheet get picked up.  Any help or suggestions are appreciated!
    Thanks.
    Brian

    azuro28 wrote:
    > I'm new to ColdFusion and after I edit a cfm
    (template.cfm) file using vim, I
    > got the following error:
    > Could not find the included template template.cfm
    >
    > page.cfm contains:
    > <cfinclude template="template.cfm">
    >
    That means that the file 'template.cfm' is not where
    ColdFusion needs it
    to be so that it can include it. Which is generally in the
    same folder
    at page.cfm with that syntax.

  • Java Access Bridge 1.1 Could not find the main class

    When I try to load Java Access Bridge 1.1 I receive the following error:
    Could not find the main class. Program will exit.
    Does anyone know why?

    you must check with the classpath
    please see that you have not repeated %classpath%
    at the end of the class path like you do in win98.
    similiarly with %path%
    in win2000 it is automatically taken care off.

  • 11.1.1.4:Could not find the item selected to match the value of type Number

    Hi,
    I have a taskflow with an input parameter.
    The input parameter value is to be assigned to a list item as the default selected value.
    I have mapped the pageFlow scope parameter to set value to the list item using input page parameters defined in task flow.
    but When i Run the task flow the value does not get assigned to the drop down list and jdevloper console screen shows up the following message
    "Could not find the item selected to match the value 2 by type: oracle.jbo.domain.Number in LOV."
    But If I click the Lov to check the values it shows that value is present in the list.
    The same configurations works if the list of values is for a column with type as java.lang.String.
    Is it somethng different that is to be done for a Number field to assign value from a taskflow parameter?
    Edited by: user3067156 on Jun 25, 2011 3:34 PM

    Hi Jobinesh,
    I am assigning the default value in the task flow using input page parameters ...
    <view id="VIEW1">
    <page>/title.jsff</page>
    <input-page-parameter>
    <from-value>#{pageFlowScope.pInputTyp_Id}</from-value>
    <to-value>#{bindings.pTyp_Id1.attributeValue}</to-value>
    </input-page-parameter>
    </view id>
    It does not assign the value, if Bind variable(pTyp_Id1) NDtype and task flow input parameter(pInputTyp) class type, both are set to use type oracle.jbo.domain.Number.
    If I change both to use java.lang.String and additionally also change the VO defination the accept the bind variable of type string, it assigns the value correctly.
    Usecase:
    I have a a task flow for which has its first page a search page.
    The Search page is created using operation execute with params and dragging the query parameters on the page.
    The Query parameters are to be filled using a select one choice option and the list is bound to the master values.
    This task flow can be used inside a standalone page as a region to provide a search page
    The same task flow can be called from within another taskflow which will provide the default values for the drop down lists ..
    Since the search page is a jsff fragment i dont have a page on load handler to provide default values..
    So assiging the values using input page parameters defined in task flow view tag.
    For testing I am passing the taskflow input parameters by calling the task flow from a jspx page a region . When I configure this task flow a region in a page its asks for providing the values for the parameters
    And the same gets configured in my testpage def as
    <executables>
    <variableIterator id="variables"/>
    <taskFlow id="Flow1" taskFlowId="/WEB-INF/Flow1.xml#Flow1"
    activation="deferred"
    xmlns="http://xmlns.oracle.com/adf/controller/binding">
    <parameters>
    <parameter id="pTyp_Id" value="1207"/>
    </parameters>
    </taskFlow>
    </executables>
    Edited by: user3067156 on Jun 27, 2011 1:50 PM

  • Error: "Could not find the main class: Files\NetBeans"

    I am working on a WorldWind mapping application but I think this issue is more of a straight Java question. I was attempting to add a web service reference by means of the NetBeans IDE. The reference compiled as it should have but then the application would not run. I deleted the reference, commented out all the code that used the web reference, basically restored all the code to how it was before trying to add the web service. The applicaiton still will not run with the message that it can't find the main class. I do, however, get a clean build. What should I do to fix this?
    Here is the error: "Could not find the main class: Files\NetBeans"
    thanks!

    nigel25840 wrote:
    I am working on a WorldWind mapping application but I think this issue is more of a straight Java question. I was attempting to add a web service reference by means of the NetBeans IDE. The reference compiled as it should have but then the application would not run. I deleted the reference, commented out all the code that used the web reference, basically restored all the code to how it was before trying to add the web service. The applicaiton still will not run with the message that it can't find the main class. I do, however, get a clean build. What should I do to fix this?
    Here is the error: "Could not find the main class: Files\NetBeans"
    thanks!Sounds like something (a .cmd file or .bat file, perhaps) is set up to launch NetBeans with a command line like this:
    java -classpath ... c:\Program Files\NetBeans ...
    So since the path has embedded space(s) in it, it thinks you are wanting to run a class named "Files\NetBeans", which does not exist.
    You need someone there who knows what they are doing to look into it for you.

  • Could not find the main class (with every jar)

    This isn't a developer question. I get the error Could not find the main class with every jar I try to open (for example the jar downloaded from https://gjar.dev.java.net/ gives the same problems - and I don't think there is something wrong with that JAR). It isn't a problem with the jar or MANIFEST because the same jar works fine on my laptop. So there is something wrong with my JRE installation, but what?
    I tried to remove and reinstall the JRE 6 Update 18 but that didn't work. When I run the JAR with command line java -jar "file.jar" it works fine, but if I dubbelclick on it I get the error message (and it's irritating me).
    I'm a bit desperate so I hope that someone here can help me ;)
    Thanks in advanced

    hai T.B.M ... Sorry to post here... I know that i posted my question in wrong thread..but i dont have another solution to contact with you.. I had seen your answers which are really excellent and helped to do my project..
    Now i am having very less time to complete my project and i am very new to JMF.. I am not getting output in JMF video capture ..please check the code and guide me where i gone wrong.......please pardon me once again to post here.. Heres my code
    import javax.media.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.event.*;
    import javax.media.protocol.*;
    import java.io.*;
    import javax.media.control.StreamWriterControl;
    public class webcam implements ActionListener,ControllerListener
    boolean eomReached = false;
    boolean realized = false;
    JFrame f;
    BorderLayout bd1;
    CaptureDeviceInfo device;
    MediaLocator m1;
    Player player;
    Component videoScreen;
    JButton b1,b2;
    Processor processor;
    DataSource ds=null;
    DataSink fileWriter=null;
    JLabel status=new JLabel("");
    public webcam()
    try
    JFrame f=new JFrame();
    JPanel p =new JPanel();
    JPanel p1=new JPanel();
    device=CaptureDeviceManager.getDevice("vfw:Microsoft WDM Image Capture (Win32):0");
    m1=device.getLocator();
    System.out.println("1");
    processor.configure();
    processor = Manager.createProcessor(m1);
    processor.setContentDescriptor(new
    FileTypeDescriptor(FileTypeDescriptor.MSVIDEO));
    ds=processor.getDataOutput();
    player.addControllerListener(this);
    MediaLocator dest = new MediaLocator("file://foo.avi");
    fileWriter = Manager.createDataSink(ds, dest);
    fileWriter.open();
    ds.connect();
    ds.start();
    player=Manager.createPlayer(m1);
    player.addControllerListener(this);
    blockingRealize();
    videoScreen=player.getVisualComponent();
    b1=new JButton("START");
    b2=new JButton("STOP");
    bd1=new BorderLayout();
    p.setLayout(bd1);
    p1.add(b1);
    p1.add(b2);
    p.add("South",p1);
    p.add("East",videoScreen);
    f.getContentPane().add(p);
    f.setVisible(true);
    f.setSize(500,500);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    b1.addActionListener(this);
    b2.addActionListener(this);
    catch(Exception e){}
    public void actionPerformed(ActionEvent e)
    if(e.getSource()==b1)
    try{
    processor.start();
    player.start();
    fileWriter.start();
    catch(Exception e1){}
    if(e.getSource()==b2)
    try{
    player.stop();
    processor.stop();
    processor.close();
    fileWriter.close();
    catch(Exception e2){}
    public static void main(String args[])
    webcam obj=new webcam();
    public synchronized void blockingRealize() {
    player.realize();
    while (!realized) {
    try {
    wait();
    } catch (java.lang.InterruptedException e) {
    status.setText("Interrupted while waiting on realize...exiting.");
    System.exit(1);
    public synchronized void controllerUpdate (ControllerEvent event) {
    System.out.println("myPlayer generated "+event.toString());
    if (event instanceof RealizeCompleteEvent) {
    realized = true;
    notify();
    } else if (event instanceof EndOfMediaEvent) {
    eomReached = true;
    }

  • Could not find the main class : HelloWorldApp program will exit

    please help me
    i downloaded and installed jdk-6u13-windows-i586-p(1) from sun.java.com
    in my computer --> Advanced --> environment variables --> i had set
    user variable :
    variable value
    java_home C:\Program Files\Java\jdk1.6.0_13\bin
    System variable:
    path : C:\Program Files\Java\jdk1.6.0_13\bin
    after that i wrote a program
    * The HelloWorldApp class implements an application that
    * simply prints "Hello World!" to standard output.
    class HelloWorldApp {
    public static void main(String[] args) {
    System.out.println("Hello World!"); // Display the string.
    i saved in c:\ mywork
    i compiled it with
    javac HelloWorldApp.java and then
    java HelloWorldApp
    output / result also came
    but iam unable to create jar file . when it is created it is showing
    could not find the main class : HelloWorldApp program will exit
    i created jar file by following way
    i created
    manifest.txt
    Min-Class : HelloWorldApp and then
    start -->run--> cmd-->
    c:\mywork> jar cfm test.jar manifest.txt HelloWorldApp.class
    c:\ java -jar test.jar
    but it displays a message
    " could not find the main class : HelloWorldApp program will exit "
    please please please help me please 1000's of please help me

    Peter__Lawrey wrote:
    You have to specify the manifest with a special option (I think its was -M)
    Otherwise the jar will create one (even if you provide it)No, the text file passed as a parameter will be incorporated in the manifest file generated by the JAR tool.
    @OP: This will work:
    JarTest.java
    public class JarTest {
      public static void main(String[] args) {
        System.out.println("JarTest works!");
    }manifest.txt
    Main-Class: JarTest+(note there is an extra new line in the manifest.txt!)+
    Now execute these commands:
    javac JarTest.java
    jar cfm MyJar.jar manifest.txt JarTest.class
    java -jar MyJar.jar And on my machine, the string "JarTest works!" is displayed on the screen.
    And if you look in the MANIFEST.MF file inside your jar file (you can use almost any zip-utility for this), you will see the following:
    Manifest-Version: 1.0
    Created-By: 1.6.0_0 (Sun Microsystems Inc.)
    Main-Class: JarTestOr something similar.

  • Could not find the main class. Program will exit!

    I have created many Executable Jar files before, and this one I did the same. When I run the jar file, (Clicking on it) I get the "Could not find the main class. Program will exit!" error message. When I run the jar file through DOS I get this Stack trace:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/ControllerListener
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
    Any Ideas? I did a search on google, and looks like others have had this problem but found no answer.
    US101

    There could be several reasons for getting this "Could not find main class" error message. From your stack trace it looks like the class javax/media/ControllerListener is not in your class path. Make sure your manifest file has a line like this:
    Class-Path: pathToTheJarFileWithControllerListenerClass.jar otherJars.jar
    This error message is also generated whenever any static initialization errors out giving the misleading error message implying that there is something wrong with the main class. Prior to starting your main class, static initialization of any static variables takes place. In my case, I was initializing a resource bundle, and forgot to include the property file in my building of the jar file. Well this failed of course and the generic error message appeared. It took many long hours to figure out it didn't have anything to do with the manifest file or the main class itself.
    HTH,
    John Bender

Maybe you are looking for

  • IPC 7.0 executing the report CFG_AP_INITIALISE_DB

    Dear Gurus   I have configured my IPC 7.0 on 2004s platform and I have done all the steps sepcified in the IPC 7 configuration document( I have not created the RFC as we are using 2004s platform) made entries in the CRMCONSUM and CRMRFCPAR tables for

  • Problems saving responses in PDF forms

    Hi all - I have created a few forms for my organization, but I've been getting a lot of feedback about problems with one of the forms.  It's set up just like the other ones (that don't have problems) - 22 drop down menus, 6 text boxes. Often, when on

  • Credit Memo posted against Service PO

    Hello Experts, Our client wants Credit memo posted against Service Order PO's should credit the Service Entry sheet. This credit memo should reflect in PO history as well. Is there any such configuration? or how to meet this requiement... Please sugg

  • Variable in path

    How can I use a variable in the path? (I know this is not called the path but I can't think of what it's called). For instance: instead of: this.symbol1.symbol2._height = 800; I want var my_var = "this.symbol1.symbol2"; my_var._height = 800;

  • Modify the error message in the substitution status section

    Hi, we have requirement to customize the error message(if any) displayed while assigning the alternative supervisor in the Manage Substitution rules section. The error message is displayed in the hyperlink substitution status. After we click on the h