required libraries in a jar file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • drsmooth
    New Member
    • Oct 2007
    • 112

    #1

    required libraries in a jar file

    i have been working on a program to generate and play chords through midi. to do this i got jfugue an awesome jar external library...i included it through jcreator and it worked great...however when i make it into a jar file it no longer works...i had this problem in another of my programs and i strongly believe ive narrowed it down to the fact the libraries i import in jcreator are not being included or not being found when i run the jar file...any help on how to fix this problem?

    thanks alot ,
    ken
  • BigDaddyLH
    Recognized Expert Top Contributor
    • Dec 2007
    • 1216

    #2
    Originally posted by drsmooth
    i have been working on a program to generate and play chords through midi. to do this i got jfugue an awesome jar external library...i included it through jcreator and it worked great...however when i make it into a jar file it no longer works...i had this problem in another of my programs and i strongly believe ive narrowed it down to the fact the libraries i import in jcreator are not being included or not being found when i run the jar file...any help on how to fix this problem?

    thanks alot ,
    ken
    I don't know from jcreator, but your jar file has a class-path entry in its manifest, which tells your jar where to look for library jars and what jars to look for. This Sun tutorial explains how to do it:

    This deployment Java tutorial describes development and deployment of applets, Java Web Start applications, rich Internet applications, and JAR related tools

    Comment

    • drsmooth
      New Member
      • Oct 2007
      • 112

      #3
      is there a way that the jar library could be included in my executable jar that im making? i kinda wanted this all to fit in one jar file

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by drsmooth
        is there a way that the jar library could be included in my executable jar that im making? i kinda wanted this all to fit in one jar file
        Did you read the tutorial in the link above?

        Comment

        • drsmooth
          New Member
          • Oct 2007
          • 112

          #5
          yes but im not sure i understood how it is goin to work...should i extract the library jar into my executable jar? or shud i jus add it to the jar as a jar itself?

          Comment

          • drsmooth
            New Member
            • Oct 2007
            • 112

            #6
            okay, perhaps a part i overlooked...i figured it out thank you very much. turns out it was as simple as adding a line to the manifest.txt


            thanks alot,
            ken

            Comment

            • r035198x
              MVP
              • Sep 2006
              • 13225

              #7
              Originally posted by drsmooth
              okay, perhaps a part i overlooked...i figured it out thank you very much. turns out it was as simple as adding a line to the manifest.txt


              thanks alot,
              ken
              That's good news. I was starting to get worried ...

              Comment

              Working...