Paul Clapham wrote:I don't see any attached image.
But don't try to fix that by attaching an image, just copy and paste the error message for us to read.
As for why your code doesn't use the console, that would be because you ran it using java.exe instead of javaw.exe (or vice versa -- I don't remember which has a console because I haven't ever written a console app in Java).
justin smythhe wrote:I put the image instead to save the typing.
Bear Bibeault wrote:
justin smythhe wrote:I put the image instead to save the typing.
Translation: I'm not going to do any work to make my question easier to answer by the volunteers at this site.
Not a winning strategy.
justin smythhe wrote:I don't know how typing the error would be better than posting the image.
Paul Clapham wrote:
Anyway the error message says you haven't built your jar correctly. It doesn't have a Main-Class attribute in the manifest (as the message says) and therefore it isn't an executable jar. So java.exe versus javaw.exe doesn't come into the picture.
Paul Clapham wrote:Looks like you've got hold of the right tutorial. Carry on then, let us know how it goes.
If you have an application bundled in a JAR file, you need some way to indicate which class within the JAR file is your application's entry point. You provide this information with the Main-Class header in the manifest, which has the general form:
Main-Class: classname
The value classname is the name of the class that is your application's entry point.
Recall that the entry point is a class having a method with signature public static void main(String[] args).
justin smythhe wrote:When I run the jar, i get an error - Could not find the main class: com.doIT.TestJar
Add a manifest file to project in Eclipse - Tutorial
btw, i unzipped this jar to see the contents. It has a manifest folder with manifest file and also my eclipse settings and other folders.
How, do I get this thing to work ?
Paul Clapham wrote:
justin smythhe wrote:When I run the jar, i get an error - Could not find the main class: com.doIT.TestJar
Add a manifest file to project in Eclipse - Tutorial
btw, i unzipped this jar to see the contents. It has a manifest folder with manifest file and also my eclipse settings and other folders.
How, do I get this thing to work ?
Doesn't the error message suggest anything to you?
It says it couldn't find your main class. So is that class in the jar? (Hint: the error message says it isn't.) There should be a folder named "com" at the root of the jar, and it should contain a folder named "doIT", which in turn should contain your TestJar.class.
BalaMurali dhar wrote:where is your code? what type of error you are getting?
justin smythhe wrote:Please tell me why the code needs to be posted for this issue.
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|