Contents |
Share to Twitter Share to Facebook Labels: error and exception 33 comments : Anonymous said... thank you! Apparently my compiler compliance level was set too high. Half of the problem is solved when you are able to reproduce it. http://gsbook.org/not-find/jar-file-error-could-not-find-main-class.php
Post Reply Bookmark Topic Watch Topic New Topic Similar Threads Executable jar Failed to load Main-Class manifest attribute Axis2-1.4 help Reading a EAR file how to make executable jar file Manifest.MF You should be able to do this in Netbeans during creation of your jar file. This post has been edited by Achri: 27 February 2012 - 01:12 PM Was This Post Helpful? 0 Back to top MultiQuote Quote + Reply #5 g00se D.I.C Lover Reputation: share|improve this answer answered Mar 8 '12 at 6:41 scaevity 1,46682546 1 Ahha, there is a version clash, your eclipse is using a higher version, then the one on the check this link right here now
The compilation wasn't the issue but the running of the main file in a child directory, is. June 23, 2015 at 6:50 AM jaison said... No idea how it's coming up with that. As in eclipse the standard JDK is set to 7, and there seems no possibility to change that in an already created project, I created a new project with lower minimu-JRE-level,
lol I've now started distributing it out to the rest of the office anyone want their own 30 minute timer??? Magento 2 GitHub version different to installed version How to respond to a ridiculous request from a senior colleague? Also of note was the fact that my application install was doing a silent install of the JRE, which (silently, of course!) does not associate .jar files correctly. Could Not Find Main Class Program Will Exit Executable Jar Is scroll within a card good or bad? (In desktop) What to do when using your private key from another computer?
So I checked it and I actually had not selected the main class at the end of the .JAR wizard. Could Not Find Main Class Jar Executable through refactoring) ? Rob Spoor Sheriff Posts: 20771 68 I like... C:\JarFile>C:\Oracle\Middleware1013\jdk160_18\bin\jar -tf PushupTimer.jar META-INF/ META-INF/MANIFEST.MF myTimer.class timeClock.class C:\JarFile>C:\Oracle\Middleware1013\jdk160_18\bin\jar -xf PushupTimer.jar META-INF/MANIFEST.MF Manifest-Version: 1.0 Created-By: 1.6.0_18 (Sun Microsystems Inc.) Main-Class: myTimer any ideas?
Not the answer you're looking for? Could Not Find The Main Class Program Will Exit Java Virtual Machine Launcher However, it appears my issue may be slightly different from existing posts. And hence your code is catching SQL Exception!!! Could large but sparsely populated country control its borders? "Shields at 10% one more hit and..." What?
It wasn't until I tried running the .jar from the command line using java -jar MyProgram.jar that it actually showed me the root of the problem. I am running Fedora (Linux). Could Not Find Or Load Main Class Jar Command Line Hopefully this will work. Could Not Find Or Load Main Class While Executing Jar File At the command prompt, try running ftype | find "jarfile" On my 64-bit Windows 7 computer, that shows jarfile="C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %* You can also change it with ftype:
You were right, I got more details in the console. check my blog That I can make it as a JRE5+ application for example? What is the proper usage of "identically zero"? Were defendants at the Nuremberg trial allowed to deny the holocaust? Jar Cannot Find Main Class
I manually navigated my way with the Windows console to the folder and created the exact same .JAR file using console commands, and still doesn't work. 4. Still failed. Main class defined in the manifest.mf file and that's why I suggest reading about How Classpath works in Java (see the link in the first paragraph). this content It happens most of the time. –nIcE cOw Mar 8 '12 at 6:43 any way to fix it besides just using the older version in eclipse? –scaevity Mar 8
EDIT: The manifest.mf file is like this Manifest-Version: 1.0 Class-Path: . Eclipse Runnable Jar Could Not Find Main Class share|improve this answer answered Apr 13 '12 at 23:20 hgrey 1,04559 I checked for that manifest and it's good, the correct main class is specified. –ApertureT3CH Apr 13 '12 This may sound not very clear, If anyone has this error, I can help you out.
Is scroll within a card good or bad? (In desktop) Validate Random Die Tippers How should night time be determined and logged in a fast westbound plane? Not the answer you're looking for? so I made a second class that has Swing on it and creates a window... Java Jar Could Not Find The Main Class Bingo!!, our program ran successfully because, without any hint about where to find class files, Java is by default looking into the current directory, denoted by . (dot) and able to
Thank you so, so much for the thorough explanation. Do you happen to have any clues on this situation? Generation of manifest.mf is supported by popular java build tools like Ant or Maven. have a peek at these guys java eclipse swing jar executable-jar share|improve this question edited Mar 8 '12 at 6:10 asked Mar 8 '12 at 4:32 scaevity 1,46682546 What is the fully qualified name of
I completely forgot about the "right click" and "Run As" Java Application! Explain it to me like I'm a physics grad: Greenhouse Effect How should night time be determined and logged in a fast westbound plane? Server is the main class, contains main() method but somehow Eclipse is not able to find it. Not sure what is wrong, can you please help?
This is the source of error :- public boolean userEnterCondition(char[] pass) { Connection con; PreparedStatement preparedStatement; ResultSet resultSet; String query = "Select * from users"; String password = null; try { com.jni.JniJavaSidePgm July 13, 2015 at 8:51 AM Anonymous said... share|improve this answer edited Oct 15 '15 at 7:22 sumit 66112 answered Aug 14 '12 at 13:14 count0 1,7111322 add a comment| up vote 0 down vote Right click on the import java.sql.*;import java.io.*;import java.util.*;import java.lang.*;class scrolldemo{ public static void main(String args[])throws IOException,ClassNotFoundException { Scanner sr=new Scanner(System.in); Connection con=null; Statement stmt=null; ResultSet rs=null; int ch; //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); try { //con=DriverManager.getConnection("jdbc:odbc:developer"); con=DriverManager.getConnection("jdbc:ucanaccess://C:\\Users\\User\\Desktop\\db.accdb"); stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); rs=stmt.executeQuery("select
No one any where else was able to get that across July 19, 2015 at 12:41 PM Anonymous said... Crazy 8s Code Golf Would presence of MANPADS ground the entire airline industry? That would cause the error you mentioned. –Jordan Miner Mar 25 '11 at 4:40 1 Based on "It seems that somehow Java is getting the idea that my main class The solution is exactly same, every bit of discussion applies to that case as well.