• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

to understand which *.MF to use

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am learning to build.xml a project with eclipse ide.
below is the MANIFEST.MF that I am creating.
The build shows that the manifest is being written in the dir structure below.
The dir META-INF (sibling to the src) contains this MANIFEST.MF









the following MANIFEST.MF is in the jar file too.
it is in the bin dir of the jar file.




I am attempting to run the dist.jar.
below is the error. Why does my project never find the Main of my app?
Thanks.




a look inside my dist.jar note that the dir "build.classes.model.Main" is the Main I would like to have found.

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The contents of your JAR file are incorrect - it looks like you included every file in your project! Instead, you want to include only the files in build/classes, or perhaps only the files in bin. That is why it cannot find your main class.

The fact that you have duplicate files in multiple locations means you have let your directory structure get out of control. My recommendation is to study Maven, at least just enough to understand the directory structure that Maven forces on you, and then adopt that same structure.

Also, if you post your build.xml, we might be able to help you clean it up.
 
Steve Howerton
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
I will have to study the link you supplied and try to understand a better structure for the build and how to jar it up properly.
I am using a temporary computer to I will return soon and supply the work I have done concerning the build.xml Thanks again.
 
Steve Howerton
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not studied the Maven link provided yet.

I have the build.xml. I have two other *.xml that I am using to test and output various new things
I am learning while trying not to corrupt the build.xml. I will add a properties sheet too. The build is doing most of the dir work. I am still studing the link provided however any feed back on my build.xml would be great.















 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is at line 66 of the build.xml:



The basedir property here is for the root directory where the class files are located, bot the base directory of the project! The ${basedir} property is the project root, you probably want to use ${classes.dir.location} instead.
 
Steve Howerton
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I will look into that
 
Evacuate the building! Here, take this tiny ad with you:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!