Java Virtual Machine "Could not find main method"  what do i do?

Hi I'm very new to java and for my class we are to make an applet and make a class. I figured out how to do it but the Java Virtual Machine gives me an error when I go to run the applet."Could not find the main method. Program Will exit!" . I am using Jbuilder8 personal to compile the code. Using j2sdk1.4.0_03. Could someone tell me how to fix this? Or what I'm doing wrong?
Here is my code.
package assignment5;
  Program: Program 5.2
  Author: Will W.
  Date: 02/20/03
  Description: Create a student class that holds the
  student name, student ID, phone and number of units
  completed. Create methods and a applet to input data
  Dispay the student name, student ID, phone, units
  completed in a text area.
import java.applet.*;
import java.awt.event.*;
import java.awt.*;
public class Assignment5Applet extends Applet implements ActionListener
     //Create Components
     //TextFields
     TextField txtName = new TextField(25);
     TextField txtId  = new TextField(15);
     TextField txtPhone = new TextField(15);
     TextField txtUnits = new TextField(4);
     //TextArea
     TextArea txaList = new TextArea(20,40);
     //Button
     Button btnAdd = new Button("Go");
     //Labels mostly debugging purposes.
     Label lblOutput = new Label();
     Label lblNumberProcessed = new Label();
     Label lblError = new Label();
     public void init()
          //Create the interface for the applet
          Panel pnlLayout = new Panel(new GridLayout(5, 2));
          pnlLayout.add(new Label("Name:"));
          pnlLayout.add(txtName);
          pnlLayout.add(new Label("Student Id:"));
          pnlLayout.add(txtId);
          pnlLayout.add(new Label("Phone #:"));
          pnlLayout.add(txtPhone);
          pnlLayout.add(new Label("Num Units:"));
          pnlLayout.add(txtUnits);
          add(pnlLayout);
          add(btnAdd);
          add(txaList);
          txtName.requestFocus();
          btnAdd.addActionListener(this);
          txtName.addActionListener(this);
          txtId.addActionListener(this);
          txtPhone.addActionListener(this);
          txtUnits.addActionListener(this);
     public void actionPerformed(ActionEvent evt)
                //Variables to hold the data in the textboxes
          String strName;
          String strId;
          String strPhone;
          String strUnits;
          try
               //Get the data
               strName = txtName.getText();
               strId = txtId.getText();
               strPhone = txtPhone.getText();
               strUnits = txtUnits.getText();
                        //Instantiate a student object
                        Student aStudent = new Student(strName, strId, strPhone, strUnits);
                        //Use get student to get the output
                     txaList.append("Output:" + aStudent.getStudent());
               lblOutput.setText("");
          catch(NumberFormatException e)
               lblOutput.setText("Error");
}The my student class
package assignment5;
  * Program: Student.java
  * Author: Will W.
  * Date: 02/20/03
  * Descrip:
  * Student Class for Assignment5Applet.java
  * Contains one constructor and 5 other methods
  * for the class
public class Student
        //Class Variables
        private String  strName;
        private String strId;
        private String strPhone;
        private String strUnits;
        private String strOutput;
        //Constructor
        public Student(String strNewName, String strNewId, String strNewPhone, String strNewUnits)
          setName(strNewName);
          setId(strNewId);
          setPhone(strNewPhone);
          setUnits(strNewUnits);
        //Methods
        public void setName(String strNewName)
                //Assign new value to private variable
                strName = strNewName;
        public void setId(String strNewId)
                strId = strNewId;
        public void setPhone(String strNewPhone)
                strPhone = strNewPhone;
        public void setUnits(String strNewUnits)
                strUnits = strNewUnits;
        public String getStudent()
                //Put the output together
                strOutput = strName + "\n" + strId + "\n" + strPhone + "\n" + strUnits;
                return strOutput;
}Everythings seems to compile correctly without errors it's just when I execute to the running program that the Java Virtual Machine throws me that error saying it can't find the main method.

Java Virtual Machine "Could not find main method" what do i do?
Ok Ok OK I got the solution for you ,this is what you do you put your hands inbetweenj you leggs and run around in a circle can scream me nuts me nuts me nuts are on fire,then come back and tell use if the problem is solved or not
Good luck hehehehe:P

Similar Messages

  • Jar file could not find main class.. I cant see why?

    I have read loads of tutorials on this and it should be very straight forward but i STILL cant make a working jar file of my program.. please see if you can see anything wrong with what im doing..
    my program is one .java file that compiles perfectly, and is runnable both through eclipse and by using the command prompt.. i made a jar file using both eclipse and the command prompt, and neither worked.. every time i run it by double clicking it i get the error "could not find main class, program will exit". here is the contents of my jar:
    CorePackage\IPEmailer.class
    CorePackage\IPEmailer$1.class
    CorePackage\IPEmailer$SMTPAuthenticator.class
    META-INF\MANIFEST.MF
    the MANIFEST.MF file contains:
    Manifest-Version: 1.0
    Class-path: .
    Created-By: 1.6.0_02 (Sun Microsystems Inc.)
    Main-Class: CorePackage.IPEmailer
    (yes there is a blank line at the end)
    the class mentioned in 'Main-Class' has a main method that looks like this:
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        new IPEmailer();
    }the program uses 2 external jar files:
    activation.jar
    mail.jar
    and reads a file called:
    ipemailer.ini
    and writes a file called:
    ip.txt
    the program has no GUI and is intended to run 'silently' in the background
    please help me understand what is wrong with this

    package CorePackage;
    import javax.mail.*;
    import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;
    import javax.mail.internet.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    public class IPEmailer implements Runnable{
          * @param args
         String recipientsinput[]={""};
         String subject;
         String body;
         String server;
         String user;
         String pass;
         String from;
         String urlString = "http://www.whatismyip.org";
         String currentIP;
         String ipFromFile;
         boolean webFailed;
         long interval = 900000; //15 mins
         long oldInterval;
         Thread t = new Thread(this);
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              new IPEmailer();
         public IPEmailer(){
                         ..........etccould the problem be that the class is a thread? i cant see why it would be, but ive never made a jar where the main class also 'implements runnable'

  • Java.lang.RuntimeException: Could not find the OffLine WLST class

    Installation of OIM On weblogic.
    oracle/oim/xellerate/setup/setup.xml:443: The following error occurred while executing this line:
    /oracle/oim/xellerate/setup/weblogic-setup.xml:196: java.lang.RuntimeException: Could not find the OffLine WLST class
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.Main.runBuild(Main.java:668)
    at org.apache.tools.ant.Main.startAnt(Main.java:187)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Tried to run this command ./wlst.sh
    shows
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/oracle/weblogic/server/server/bin:/home/oracle/bea/modules/org.apache.ant_1.6.5/bin:/oracle/jdk/jre/bin:/oracle/jdk/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/oracle/jdk/bin
    Your environment has been set.
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/oracle/weblogic/server/common/eval/pointbase/lib/pbembedded57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbtools57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbclient57.jar
    Initializing WebLogic Scripting Tool (WLST) ...
    Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class

    try Problem invoking WLST - Could not find the OffLine WLST class the last post on this thread, he claims to solve the problem...

  • OIM Installn :java.lang.RuntimeException: Could not find OffLine WLST class

    Installation of OIM On weblogic.
    oracle/oim/xellerate/setup/setup.xml:443: The following error occurred while executing this line:
    /oracle/oim/xellerate/setup/weblogic-setup.xml:196: java.lang.RuntimeException: Could not find the OffLine WLST class
         at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:341)
         at org.apache.tools.ant.Target.performTasks(Target.java:369)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
         at org.apache.tools.ant.Main.runBuild(Main.java:668)
         at org.apache.tools.ant.Main.startAnt(Main.java:187)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    Tried to run this command ./wlst.sh
    shows
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/oracle/weblogic/server/server/bin:/home/oracle/bea/modules/org.apache.ant_1.6.5/bin:/oracle/jdk/jre/bin:/oracle/jdk/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/home/oracle/bin:/oracle/jdk/bin
    Your environment has been set.
    CLASSPATH=/home/oracle/bea/patch_wls1030/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/oracle/bea/patch_cie660/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/jdk/lib/tools.jar:/oracle/weblogic/server/server/lib/weblogic_sp.jar:/oracle/weblogic/server/server/lib/weblogic.jar:/home/oracle/bea/modules/features/weblogic.server.modules_10.3.0.0.jar:/oracle/weblogic/server/server/lib/webservices.jar:/home/oracle/bea/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/home/oracle/bea/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar::/oracle/weblogic/server/common/eval/pointbase/lib/pbembedded57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbtools57.jar:/oracle/weblogic/server/common/eval/pointbase/lib/pbclient57.jar
    Initializing WebLogic Scripting Tool (WLST) ...
    Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class
    Edited by: user10213645 on Mar 9, 2010 3:37 PM

    There is an existing Bug 8431390 - WLST NOT WORKING IF WE USE NON-DEFAULT INSTALLATION (WL_HOME OUTSIDE BEA_HOME)
    As per this bug, the issue can be reproduced as follows:
    Steps to reproduce:
    1. Install WLS 10.3GA (essex) kit in a non-default fashion (WL_HOME outside BEA_HOME)
    2. Go to ur $WL_HOME/common/bin directory and execute wlst.cmd
    3. It exits with the following exception:
    java.lang.RuntimeException:could not find the OffLine WLST class
    Hope this helps.
    For more details, refer: http://idm-oracle.blogspot.com/2010/03/javalangruntimeexception-could-not-find.html

  • Could not find main class program will exit error while installing Oracle Client 32 bit on windows 7 32 bit OS?

    Hi Experts,
    When I am installing Oracle client 32 bit software on Windows 7 32 bit I am getting error as "could not find main class program will exit"
    I have tried installing latest Java software 7 also JDK 1.6.0_34 still I am getting the same problem below is my " oraparam.ini " details
    [Oracle]
    DISTRIBUTION=TRUE
    SOURCE=../stage/products.xml
    LICENSE_LOCATION=
    BOOTSTRAP_COMPS="oracle.swd.oui:11.1.0.6.0,oracle.swd.oui.core:11.1.0.6.0,oracle.jdk:1.5.0.1.1"
    JRE_SCRATCH_LOC=jdk/jre
    JRE_MEMORY_OPTIONS=" -mx96m"
    DEFAULT_HOME_LOCATION=product\11.1.0\client
    DEFAULT_HOME_NAME=OraClient11g_home
    NO_BROWSE=/net
    NLS_ENABLED=TRUE
    BOOTSTRAP=TRUE
    EXT_JLIB=../stage/ext/jlib
    OUI_VERSION=11.1.0.6.0
    ## JRE_VERSION is only for Windows. This is to copy accessbridge dlls
    JRE_VERSION=1.4.2
    ACCESS_DIR=../install/access
    #SHOW_HOSTNAME=ALWAYS_SHOW shows the hostname panel always
    #SHOW_HOSTNAME=NEVER_SHOW does not the hostname panel
    #SHOW_HOSTNAME=CONDITION_SHOW shows the hostname panel on condition
    SHOW_HOSTNAME=NEVER_SHOW
    #THIN_JDBC_FILENAME is optional and defaults to classes12.jar
    #The value specified for this should be packaged with OUI, and should
    #be relative to <OUI expanded stagedir>/jlib/
    THIN_JDBC_FILENAME=classes12.jar
    #RUN_OUICA specifies the batch script name that needs to be run
    #The script is ouica.bat for win32, and ouica.sh for solaris.
    #If the value is not specified, then the OUICA script is not run
    RUN_OUICA=ouica.bat
    CLUSTERWARE={"oracle.crs","10.1.0.2.0"}
    SILENT_VARIABLE_VALIDATION=TRUE
    [Generic Prereqs]
    MIN_DISPLAY_COLORS=256
    [IMAGES]
    FILE1=images/billboards.gif
    LICENSE_LOCATION=license.txt

    Duplicates of the other two times you asked this question:
    https://forums.oracle.com/thread/2559093
    https://forums.oracle.com/thread/2558027
    (and this time, your question does not appear to have anything to do with this particular forum space, either)
    Duplicate is locked.
    Do not EVER multi--post.   That is extremely bad forum etiquette.

  • JAR: - Could not find main class

    I'm sorry, I know this issue has been posted before but I am a bit confused with my situation.
    After making a jar on my computer, I run it, and the program loads and runs perfectly.
    However, when I try the jar on someone else's computer, it doesn't work, and gives the "could not find main class" message. The other computer has JRE but not JDK, so I don't know if that makes a difference.
    Anyways, my main class file is located in a package called hw2, and the whole project is located in a folder called HW2. So my class file is located in something like C:\School\HW2\hw2\Main.class.
    My Manifest.txt file is located in the \School\HW2 directory and has the following with a new line at the end:
    Main-Class: hw2.Main
    At the command prompt, I go to my C:\School\HW2 directory and I type the following to create the jar:
    jar cvmf Manifest.txt test.jar hw2\*.class
    My jar file has the following contents:
    META-INF/
    META-INF/MANIFEST.MF
    hw2/Bank.class
    hw2/GUIInterface.class
    hw2/Main.class
    Did I write the manifest.txt file correctly? Am I in the right directory when creating the jar file? Am I executing the jar command wrong? How come it works on my computer but not on someone else's?

    Are you certain you're executing the jar in the same way on both machines?
    For example, are you sure you're not executing the unjarred class files when you run on your local machine?

  • Getting the error " [java] Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class " while building the O2A 2.1.0 PIP

    Getting the error " [java] Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class " while building the O2A 2.1.0 PIP. I am using the Design Studio 4.3.2 for building the O2A 2.1.0 PIP. Please let me know how to resolve this issue. Here I am enclosing the log file .

    We have basically the same issue when we try to create the interpreter using the embedded method..
    I was able to use the interpreter embedded in a java client as long as the weblogic jars were located in a weblogic install if I tried to use them from a maven repository no luck at all...
    All of this worked easily in 9.2 now in 10.3 it seems more error prone and less documented.
    I have seen close to a 100 posts on issues related to this so is there a document which outlines specifics....
    We / I have used weblogic now for almost 10 years and moving from 8.1 to 9.2 was painful and we expected the move from 9.2 to 10.3 not to be soo bad but its proving to be as painful if not more painful than moving to 9.2. We seem to spend a good bit of our time working around issues in the next new release that were not in the previous one..
    Any help would be appreciated I think we will open a support case but even that is more painful...
    Any help would be greatly appreciated..
    PS: We confirmed that all jars in the startweblogic classpath were in the startup. The server we have the embedded wlst instance is a managed server and we are using the component in a war... Are there any restrictions which we are unaware of.
    Error we get is
    1 [ERROR] com.tfn.autex.order.weblogic.QueueMaintenanceUtility.addQueue():217 Error Adding Queue wowsers JNDI Name wowsers Exception: Invocation Target exception while getting the WLSTOffLineScript path

  • Virtual Machine could not be started because the hypervisor is not running

    Hi
    I have installed Windows Server 2012 Standard Edition with a GUI. Default configuration, nothing special.
    Whenever I want to turn on any machine inside of Hyper-V, the following error message appears:
    "Virtual Machine could not be started because the hypervisor is not running"
    Whenever this happens, I run the following command:
    bcdedit /set hypervisorlaunchtype Auto
    and reboot the Server. After a reboot, all Virtual Machines can be started without Problems. However, as soon as I shut down the Server instead of rebooting it, the Problem happens again and I need to enter the command again and reboot.
    Now my question is how to solve this Problem. I never had this Issue with Windows Server 2008 R2, maybe there are some differences regarding the Hypervisor in Server 2012. How can I make sure the Hypervisor is always on, even after a Shutdown? Thanks in
    Advance

    Hi,
    Please check whether you have event log with ID 3112.
    Hyper-V requires hardware support, including: an x64 CPU; VT (Intel) or AMD-V (AMD) hardware extensions; No eXecute (NX)/eXecute Disable (XD) and full BIOS support for hardware virtualization.
    Check if the computer meets the hardware requirements, use the appropriate utility for your CPU manufacturer.
    If the computer meets the requirements for Microsoft virtualization software, see the video titled
    Hypervisor is not running error: How to fix
    , which demonstrates how to change the system BIOS on a computer to enable support for virtualization. Make sure DEP and CPU virtualization is enabled in BIOS. (http://go.microsoft.com/fwlink/?LinkId=163578
    Also, check that
    Boot Configuration Data (BCD) store is set to start the hypervisor, and then restart your physical computer.
    The BCD store contains boot configuration parameters and controls how the operating system is started in Windows Vista and Windows Server 2008 operating systems. These parameters were previously in the Boot.ini file (in BIOS-based operating
    systems) or in the nonvolatile RAM (NVRAM) entries (in Extensible Firmware Interface-based operating systems).
    You can use the Bcdedit.exe command-line tool to update BCD store with the correct launch options as referenced in the error, and then restart the server. Bcdedit.exe is located in the \Windows\System32 directory by default.
    For more information please refer to following MS articles:
    Event ID 3112 — Hypervisor Operation
    http://technet.microsoft.com/en-us/library/dd581879(v=ws.10).aspx
    You receive the error message "virtual machine could not start because the hypervisor is not running" in Windows Server 2008 or Windows Server 2008 R2
    http://support.microsoft.com/kb/2490458
    Troubleshooting Event ID 3112 "The virtual machine could not be started because the hypervisor is not running."
    http://social.technet.microsoft.com/wiki/contents/articles/194.hyper-v-troubleshooting-event-id-3112-the-virtual-machine-could-not-be-started-because-the-hypervisor-is-not-running.aspx
    Lawrence
    TechNet Community Support

  • Java.lang.AssertionError: Can not find generic method public abstract

    I just downloaded the JDev 11g and trying to test the JEE web app. Below is my install:
    JDeveloper 11g
    JEE Web Project
    EJB 3.0
    Steps taken:
    1. Created an entity bean from a table.
    2. Created a session facade
    3. Create sample Java client to use the facade (Right-click on the session facade, and choose New sample Java Client from the context menu)
    4. Run the session facade
    5. Run the Java client
    I got the following error.
    java.lang.AssertionError: Can not find generic method public abstract java.util.List<com.oracle.orm.model.ejb.persistence.Hosttags> queryHosttagsFindAll() in EJB Object
    I checked the methods in the beans and interfaces, they are all there. Any idea?
    Thanks.

    I have a customer that has this problem.
    We wrote me that:
    we got a java.lang.NoSuchMethodException while the method exist even in the generated (by WLS) stub.
    when we change the interface by putting a "list" instead of list <> then it works.
    hope it can help, but should be great know why.
    Regards
    Marco
    글 수정: user10649412

  • How to Fix: Error (10698) The virtual machine () could not be live migrated to the virtual machine host () using this cluster configuration.

    I am unable to live migrate via SCVMM 2012 R2 to one Host in our 5 node cluster.  The job fails with the errors below.
    Error (10698)
    The virtual machine () could not be live migrated to the virtual machine host () using this cluster configuration.
    Recommended Action
    Check the cluster configuration and then try the operation again.
    Information (11037)
    There currently are no network adapters with network optimization available on host.
    The host properties indicate network optimization is available as indicated in the screen shot below.
    Any guidance on things to check is appreciated.
    Thanks,
    Glenn

    Here is a snippet of the cluster log when from the current VM owner node of the failed migration:
    00000e50.000025c0::2014/02/03-13:16:07.495 INFO  [RHS] Resource Virtual Machine Configuration VMNameHere called SetResourceLockedMode. LockedModeEnabled0, LockedModeReason0.
    00000b6c.00001a9c::2014/02/03-13:16:07.495 INFO  [RCM] HandleMonitorReply: LOCKEDMODE for 'Virtual Machine Configuration VMNameHere', gen(0) result 0/0.
    00000e50.000025c0::2014/02/03-13:16:07.495 INFO  [RHS] Resource Virtual Machine VMNameHere called SetResourceLockedMode. LockedModeEnabled0, LockedModeReason0.
    00000b6c.00001a9c::2014/02/03-13:16:07.495 INFO  [RCM] HandleMonitorReply: LOCKEDMODE for 'Virtual Machine VMNameHere', gen(0) result 0/0.
    00000b6c.00001a9c::2014/02/03-13:16:07.495 INFO  [RCM] HandleMonitorReply: INMEMORY_NODELOCAL_PROPERTIES for 'Virtual Machine VMNameHere', gen(0) result 0/0.
    00000b6c.000020ec::2014/02/03-13:16:07.495 INFO  [GEM] Node 3: Sending 1 messages as a batched GEM message
    00000e50.000025c0::2014/02/03-13:16:07.495 INFO  [RES] Virtual Machine Configuration <Virtual Machine Configuration VMNameHere>: Current state 'MigrationSrcWaitForOffline', event 'MigrationSrcCompleted', result 0x8007274d
    00000e50.000025c0::2014/02/03-13:16:07.495 INFO  [RES] Virtual Machine Configuration <Virtual Machine Configuration VMNameHere>: State change 'MigrationSrcWaitForOffline' -> 'Online'
    00000e50.000025c0::2014/02/03-13:16:07.495 INFO  [RES] Virtual Machine <Virtual Machine VMNameHere>: Current state 'MigrationSrcOfflinePending', event 'MigrationSrcCompleted', result 0x8007274d
    00000e50.000025c0::2014/02/03-13:16:07.495 INFO  [RES] Virtual Machine <Virtual Machine VMNameHere>: State change 'MigrationSrcOfflinePending' -> 'Online'
    00000e50.00002080::2014/02/03-13:16:07.510 ERR   [RES] Virtual Machine <Virtual Machine VMNameHere>: Live migration of 'Virtual Machine VMNameHere' failed.
    Virtual machine migration operation for 'VMNameHere' failed at migration source 'SourceHostNameHere'. (Virtual machine ID 6901D5F8-B759-4557-8A28-E36173A14443)
    The Virtual Machine Management Service failed to establish a connection for a Virtual Machine migration with host 'DestinationHostNameHere': No connection could be made because the tar
    00000e50.00002080::2014/02/03-13:16:07.510 ERR   [RHS] Resource Virtual Machine VMNameHere has cancelled offline with error code 10061.
    00000b6c.000020ec::2014/02/03-13:16:07.510 INFO  [RCM] HandleMonitorReply: OFFLINERESOURCE for 'Virtual Machine VMNameHere', gen(0) result 0/10061.
    00000b6c.000020ec::2014/02/03-13:16:07.510 INFO  [RCM] Res Virtual Machine VMNameHere: OfflinePending -> Online( StateUnknown )
    00000b6c.000020ec::2014/02/03-13:16:07.510 INFO  [RCM] TransitionToState(Virtual Machine VMNameHere) OfflinePending-->Online.
    00000b6c.00001a9c::2014/02/03-13:16:07.510 INFO  [GEM] Node 3: Sending 1 messages as a batched GEM message
    00000b6c.000020ec::2014/02/03-13:16:07.510 INFO  [RCM] rcm::QueuedMovesHolder::VetoOffline: (VMNameHere with flags 0)
    00000b6c.000020ec::2014/02/03-13:16:07.510 INFO  [RCM] rcm::QueuedMovesHolder::RemoveGroup: (VMNameHere) GroupBeingMoved: false AllowMoveCancel: true NotifyMoveFailure: true
    00000b6c.000020ec::2014/02/03-13:16:07.510 INFO  [RCM] VMNameHere: Removed Flags 4 from StatusInformation. New StatusInformation 0
    00000b6c.000020ec::2014/02/03-13:16:07.510 INFO  [RCM] rcm::RcmGroup::CancelClusterGroupOperation: (VMNameHere)
    00000b6c.00001a9c::2014/02/03-13:16:07.510 INFO  [GEM] Node 3: Sending 1 messages as a batched GEM message
    00000b6c.000021a8::2014/02/03-13:16:07.510 INFO  [GUM] Node 3: executing request locally, gumId:3951, my action: /dm/update, # of updates: 1
    00000b6c.000021a8::2014/02/03-13:16:07.510 INFO  [GEM] Node 3: Sending 1 messages as a batched GEM message
    00000b6c.00001a9c::2014/02/03-13:16:07.510 INFO  [GEM] Node 3: Sending 1 messages as a batched GEM message
    00000b6c.000022a0::2014/02/03-13:16:07.510 INFO  [RCM] moved 0 tasks from staging set to task set.  TaskSetSize=0
    00000b6c.000022a0::2014/02/03-13:16:07.510 INFO  [RCM] rcm::RcmPriorityManager::StartGroups: [RCM] done, executed 0 tasks
    00000b6c.00000dd8::2014/02/03-13:16:07.510 INFO  [RCM] ignored non-local state Online for group VMNameHere
    00000b6c.000021a8::2014/02/03-13:16:07.526 INFO  [GUM] Node 3: executing request locally, gumId:3952, my action: /dm/update, # of updates: 1
    00000b6c.000021a8::2014/02/03-13:16:07.526 INFO  [GEM] Node 3: Sending 1 messages as a batched GEM message
    00000b6c.000018e4::2014/02/03-13:16:07.526 INFO  [RCM] HandleMonitorReply: INMEMORY_NODELOCAL_PROPERTIES for 'Virtual Machine VMNameHere', gen(0) result 0/0.
    No entry is made on the cluster log of the destination node. 
    To me this means the nodes cannot talk to each other, but I don’t know why.  
    They are on the same domain.  Their server names resolve properly and they can ping eachother both by name and IP.

  • Virtual machine could not be started because hypervisor is not running

    I am having trouble starting a VM.  I am suspecting that it might be due to my hardware.  I have a Dell Optiplex 755 A09.  Processor is Intel Duo Core E4500 @2.2Ghz Hyperthreading = No and 2 mb cache.  I had this computer given to me, but would like to run Hypervisor on it if possible.  Can the processor be upgraded, if so, what would I have to purchase in order to make hypervisor work? 

    I m using HP Prolient BL460C Blade Server with Intel Xeon(R) E 5450 @3.00 GHz.
    and facing problem with the error "the
    virtual machine could not be started because the hypervisor is not running"
    I tried following in BIOS:
        - No-Execute Memory Protection - Enabled
        - Intel Virtualization Technology - Enabled
    but I get Blue Screen, after that I came through link below to change the registry setting mentioned by Rajiv as above, and thx to him I did not face  Blue Screen after that...(Dont really know what Blue Screen has to do with Hibernate/sleep mode)
    http://www.computers.nepalesemap.com/index.php?topic=1554.0
    I shutdown and cold-booted the server properly.
    But still I am still at the same point "the
    virtual machine could not be started because the hypervisor is not running"
    Some
    more suggestions ?
    Warm
    Regards

  • Java Virtual Machine. Could not find main class

    I am trying to install Oracle Data Access Components ODAC 11g 11.1.0.6.21
    on windows 2008. I get the dreaded could not find the main class. Program will ext.
    I have seen all the post, tried installing every conceivable Java version, removed all java version.
    Nothing works. Does anyone have THE solution for this on-going error?
    Thanks

    I fixed my problem by installed Oracle 11g ODAC and Oracle Developer Tools for Visual Studio 11.1.0.7.20

  • Could not find main class!

    I tried some code I got from a book I recently bought it compiled ok but when I tried to run it in JPadPro I got the Java Virtual Machine Launcher warning saying 'Could not find the main class. Program will exit!' As far as I can see there is a main method so I am not to sure what the actual problem is. I pasted the code below hopefully someone can help, Dave.
    * Copyright (c) 2000 David Flanagan.  All rights reserved.
    * This code is from the book Java Examples in a Nutshell, 2nd Edition.
    * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied.
    * You may study, use, and modify it for any non-commercial purpose.
    * You may distribute it non-commercially as long as you retain this notice.
    * For a commercial use license, or to purchase the book (recommended),
    * visit http://www.davidflanagan.com/javaexamples2.
    package com.davidflanagan.examples.datatransfer;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.datatransfer.*;
    * This program demonstrates how to add simple copy-and-paste capabilities
    * to an application.
    public class SimpleCutAndPaste extends Frame implements ClipboardOwner
        /** The main method creates a frame and pops it up. */
        public static void main(String[] args) {
         Frame f = new SimpleCutAndPaste();
         f.addWindowListener(new WindowAdapter() {
              public void windowClosing(WindowEvent e) { System.exit(0); }
         f.pack();
         f.setVisible(true);
        /** The text field that holds the text that is cut or pasted */
        TextField field;
         * The constructor builds a very simple test GUI, and registers this object
         * as the ActionListener for the buttons
        public SimpleCutAndPaste() {
         super("SimpleCutAndPaste");  // Window title
         this.setFont(new Font("SansSerif", Font.PLAIN, 18)); // Use a big font
         // Set up the Cut button
         Button copy = new Button("Copy");                      
         copy.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) { copy(); }
         this.add(copy, "West");
         // Set up the Paste button
         Button paste = new Button("Paste");
         paste.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) { paste(); }
         this.add(paste, "East");
         // Set up the text field that they both operate on
         field = new TextField();
         this.add(field, "North");
         * This method takes the current contents of the text field, creates a
         * StringSelection object to represent that string, and puts the
         * StringSelection onto the clipboard
        public void copy() {
         // Get the currently displayed value
         String s = field.getText();                 
         // Create a StringSelection object to represent the text.
         // StringSelection is a pre-defined class that implements
         // Transferable and ClipboardOwner for us.
         StringSelection ss = new StringSelection(s);
         // Now set the StringSelection object as the contents of the clipboard
         // Also specify that we're the clipboard owner
         this.getToolkit().getSystemClipboard().setContents(ss, this);
         // Highlight the text to indicate it is on the clipboard.
         field.selectAll();
         * Get the contents of the clipboard, and, if we understand the type,
         * display the contents.  This method understands strings and file lists.
        public void paste() {
         // Get the clipboard
         Clipboard c = this.getToolkit().getSystemClipboard();
         // Get the contents of the clipboard, as a Transferable object
         Transferable t = c.getContents(this);
         // Find out what kind of data is on the clipboard
         try {
             if (t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
              // If it is a string, then get and display the string
              String s = (String) t.getTransferData(DataFlavor.stringFlavor);
              field.setText(s);
             else if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
              // If it is a list of File objects, get the list and display
              // the name of the first file on the list
              java.util.List files = (java.util.List)
                  t.getTransferData(DataFlavor.javaFileListFlavor);
              java.io.File file = (java.io.File)files.get(0);
              field.setText(file.getName());
         // If anything goes wrong with the transfer, just beep and do nothing.
         catch (Exception e) { this.getToolkit().beep(); }
         * This method implements the ClipboardOwner interface.  It is called when
         * something else is placed on the clipboard.
        public void lostOwnership(Clipboard c, Transferable t) {
         // Un-highlight the text field, since we don't "own" the clipboard
         // anymore, and the text is no longer available to be pasted.
         field.select(0,0);
    }

    Oh, no wonder I have such low "reading for comprehension" scores - that was a "package" statement, not an "import".
    Thing is, your class would compile with this package statement there - but, the interpreter wouldn't be able to find it, 'cause the compiled class would be in a package called com.davidflanagan.examples.datatransfer accoding to the class file, but your interpreter would be looking for the class in the default package (if that makes sense). If executed on the command line you would likely see something like:
    Exception in thread "main" java.lang.NoClassDefFoundError: SimpleCutAndPaste (wrong name: com/davidflanagan/examples/datatransfer/SimpleCutAndPaste)
    [pre]
    Lee                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Could not find main class. Program will now exit. *SIGH*.....

    At first I thought it was just my own programs that I created with netbeans that had this problem; however, even the demo programs under the sdk folder give me this problem when i try to run them. Virtual Machine Loader will just come up with pop up saying "Could not find the main class. Program will not exit"
    I am a fairly competent programmer, not new to java. But I am new to guis in java, and using netbeans to create them. The program I am creating gives me this error with javaw and with java it will tell me NoClassDef for grouplayout. I checked the manifest file it looks alright:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 10.0-b19 (Sun Microsystems Inc.)
    Main-Class: desktopapplication2.DesktopApplication2
    Class-Path: lib/appframework-1.0.3.jar lib/swing-worker-1.1.jar lib/swing-layout-1.0.1.jar lib/ant-swing.jar lib/SwingSet2.jar lib/swing-layout-1.0.3.jar
    X-COMMENT: Main-Class will be added automatically by build
    }(brackets not included)
    I am sort of lost.... Do I need to install ant separately?
    I feel like there may be some classpath issues?
    I have java 1.6 update 4 and netbeans 6.0
    I am completely lost I have been working on fixing this for the past 2 or 3 days now, and reading up all the information.
    Note: This is just a standard desktop application.
    Also I just thought of something. If I have install the development kit do I also need to install the framework or whatever for 6.0 separately? Meaning installing the latest version of jvm. Sorry if this isn't clear i forgot what it is called.
    Sorry if this sounds like a beginner question or something, but I am going crazy. If i am having this much trouble running my own program i really hope distributing files won't be this much of a nightmare....

    Please become familar with resources at the NetBeans site. There are tutorials and FAQs that cover usage of NB, and how to do things like you're asking.
    See my reply in this thread for more information
    http://forum.java.sun.com/thread.jspa?threadID=5270931&tstart=0

  • Could not find Main Class while executing JAR

    Hello all,
    I am having a simple Jar file that contains one java class that merely displays a window. I am using NetBeans IDE to create the JAR file. When i execute this JAR file by double clicking on the file, it works fine on the machine. However, if i try to execute this same file on any other windows computer, it gives an error "Could not find the main class. Program will exit."
    In other words, the JAR file is only working on the computer that has NetBeans and JDK installed on. Not on any other machine. Although the other machines have the JAVA Virtual Machine installed.
    I would appreciated any help on this topic.

    I had the same problem (i.e. Message-Box with "Could not find the main class. Program will exit.")
    After insuring that the manifest contained a Main-Class: argument and that the argument pointed to the right class, I started the jar via java -jar myjar.jar and read the stacktrace, which is much better than the popup-window.
    In my case the error was, that the Main-Class could not be loaded due to another referenced class, which was not on the classpath. (i.e. it was not in the same jar-File and the manifest didn't include a Class-Path: argument.)
    After adding the correct Class-Path: argument in the manifest, the problem went away.
    I now have the following setup:
    myjar.jar and somethirdparty.jar in the same directory.
    myjar.jar contains a manifest which includes the lines
    Class-Path: somethirdparty.jar
    Main-Class: my.package.and.MainClassafter the normal Manifest-header.

Maybe you are looking for