Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems creating a jar

 
Kevin Florish
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Am running Windows XP SP3

Have tried to create an executable jar file to run my database file against. The code works fine in Eclipse 3.4.1.

Manifest.mf contents
=============
Manifest-Version: 1.0
Main-Class: suncertify.client.ContractorApplicationStartup

Jar Creation
========
jar -cfvm code.jar Manifest.mf -C bin .

This seems to work fine and creates the jar file and shows all the classes and manifest in the output.

Jar Execution
=========

javaw -jar code.jar alone

This just gives me a beep and does nothing.

Is there anyway I can debug the jar to see the problem or can anyone spot a glaring error that I cannot see.

Thanks Kevin.


 
Alecsandru Cocarla
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
instead of

javaw -jar code.jar alone

you should use

java -jar...
 
Kevin Florish
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Alec

I was using the example from Monkhouse book, should have checked the errata

Now I get a "Failed to Main-Class manifest attribute from code.jar" error when running

java -jar code.jar alone

Manifest File is called Manifest.mf and contains:



This along with my bin directory were in my SCJD base directory and I created the jar from the SCJD directory as follows:



All the files were displayed ok including the following 2 entries:




Ah I needed to add a blank line to the end of the manifest file :O

Thanks Kevin.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic