Could Not Find Main Class Program Will Exit Java Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack could not find the main class program will exit java virtual machine launcher Overflow the company Business Learn more about hiring developers or posting ads with us could not find the main class program will exit eclipse Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a
Could Not Find The Main Class Program Will Exit Oracle Installation
community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Could not find the main class, program will exit up vote 20 down vote favorite
Could Not Find The Main Class Program Will Exit Jar File
4 I made an executable jar with the command prompt in Windows 7 using the jar cvfm MyJarName.jar manifest.txt *.class which created the .jar file. But when I attempt to open it, I get a pop-up window that says Could not find the main class:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack
Could Not Find The Main Class Program Will Exit Minecraft
Overflow the company Business Learn more about hiring developers or posting ads with us could not find main class program will exit executable jar Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community could not find the main class program will exit in command prompt of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Running JAR file could not find main class. Program will exit up vote 1 down vote http://stackoverflow.com/questions/7617807/could-not-find-the-main-class-program-will-exit favorite I've been looking around the google for this very common problem but found no answer. When i build and clean my project through NetBeans, I only have this content in my manifest.mf Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build I was expecting of something like what others have: Manifest-Version: 1.0 Created-By: 1.7.0_06 (Oracle Corporation) Main-Class: dpsr.DPSR ..but I don't have it. I already have followed setting up http://stackoverflow.com/questions/26351365/running-jar-file-could-not-find-main-class-program-will-exit my main class on the properties. and here's my main class by the way: package dpsr; import javax.swing.UIManager; public class DPSR { public static void main(String[] args) { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); } catch(Exception e){ System.out.println("Nimbus isn't available"); } new frmLogin().setVisible(true); } } ..when I run the command in the machine java -jar dpsr.jar it only says Could not find the main class: ... Program will exit. I do not want to continue my project unless I resolve this. I need this so that other computers can use my project. java netbeans jar share|improve this question edited Feb 3 at 12:47 R O M A N I A 12k116575 asked Oct 14 '14 at 1:34 Jerson Calinawan 6114 possible duplicate of .jar error - could not find or load main class –Gutblender Oct 14 '14 at 1:38 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote Follow these instructions. Right click on Project, select [Properties]. Select [Run] node on the left. In the [Main Class] test field, use the browse button to select the main class you want as the launching class. Press OK Clean an Build you project. Open the files window and look in YourProject/dist/yourproject.jar/META-INF/MANIFEST.MF. You should see the Main-Class has been added/changed share
This Site Careers Other all forums Forum: Beginning Java Error: Could not find the main class. Program will exit. Niraj Chaudhary Greenhorn Posts: 5 posted 5 years ago Hi, I have a java application that is started from an executable. When I try https://coderanch.com/t/526005/java/java/Error-find-main-class-Program to run that, This error pops up "Title: Java Virtual Machine Launcher" saying "Could not find the main class. Program will exit." This error is coming when the application is tried to run on some machines (that's what http://community.microfocus.com/borland/test/silk_test/w/knowledge_base/11890.why-do-i-get-the-java-virtual-machine-error-could-not-find-main-class-program-will-exit-when-invoking-java-application-from-silktest.aspx I think), and not for all the users. Following are the steps that have been suggested, but the error still persists: 1.Uninstall any older/ multiple versions of java from the Windows machine and keep only the latest could not one. 2.Point the environment variable "CLASSPATH" to the directory where "java" is present, and also to the main class of my application. 3.Try installing the tool on a different machine (in the same network domain). I have seen many posts in this and other forums on this topic, and the solutions suggested above have been taken from them, but the solution for my problem here is not there. It may be a trivial mistake or could not find something else, but please help me out, as I am only a beginner in trying to solve such problems. Also, if you can please tell me how do I get this error, on my machine, that would be great? Something to understand the steps causing the problem. I don't get the error pop-up on my system. Thank you so very much in advance! Campbell Ritchie Sheriff Posts: 50290 81 posted 5 years ago Welcome to the Ranch Any suggestions about setting a CLASSPATH are likely to be unhelpful. In fact a system CLASSPATH can do more harm than good. The sort of error you quote suggests you have nothing wrong with the Java™ installation, but there is a problem with your own file. You are not clear about what you are running. Are you running a .jar or a .exe? If a .jar, what is in its manifest file? Please print that out. What is the fully-qualified name of the class with the main mathod in? Niraj Chaudhary Greenhorn Posts: 5 posted 5 years ago I am trying to run a ".exe". And the main class called from the exe is present in a .zip file. The contents of the zip are shown below. The main class is "pkgLib.ProgABDriver". ... pkgLib/ pkgLib/ReadExRule.class pkgLib/checkLic.class pkgLib/envVarTokenizer.class pkgLib/LOC.class pkgLib/clearHistory.class pkgLib/StatusListener.class pkgLib/repErr.class pkgLib/ProgABDriver$1.class pkgLib/RTInit.class pkgLib/ProgABDriver.class pkgLib/
"could not find main class. program will exit" when invoking Java application from SilkTest? Why do I get the Java Virtual Machine error "could not find main class. program will exit" when invoking Java application from SilkTest? Silk Test Master the automation of complex technologies for your most critical applications. Join group Get this RSS feed Home Forum Blog Wikis Files Members Useful Links Product Information Product Documentation Knowledge Base Feature Requests Table of Contents Knowledge Base 'Error Message - Please contact Support' when testing against the Insuranceweb demo site 'Failed to get Locator' error in SilkTest Workbench 'FindItem' does not work for the Open Agent 'Hooking wizard: I/O error' when starting SilkTest "Cannot obtain keyboard focus." error when calling TypeKeys against a JComboBox "Control::SetActive not supported" error message when launching a JDialog "Debug Assertion Failed!" error when trying to call a Dll in Silk4NET "License Check Failed - Agent is running in SCTM mode" error occurs when running a test in SilkTest Workbench "Maximum attribute value length" setting in Silk4J not being retained "The Character Set of the database is not UTF8" error when creating new SilkTest Workbench Oracle database [SilkTest] How should I interpret 4Test tags containing ".." , such as "../Foo" or "Bar/.." or "/[DialogBox]Foo/[PushButton]Bar/.." ‘An object map lookup for the identifier “object name” is not possible because the parent object was not retrieved from the Object Map’ “Invalid Path” error when creating a new SilkTest project on a Windows 7 machine “WebBrowser does not define a tag for Microsoft Windows XP, Internet Explorer 7” A DSN-less method of reading CSV files in Workbench and Silk4Net A SilkTest Test Suite cann