Win a copy of Head First Android this week in the Android forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Configuring Asstfor Jar files

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Coleagues.

Please help me to get the Wizard For configuring a jar file that will make my jar file work without making the jar file an executive file .
I need this because my jar file when created under MEDOS invariably does not function even under MSDOS .though in a textedtor window it works.So the jar file needs congiguring assistant for portabilty as well.

SincereThanks
As
CRMK
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess that with "MSDOS" you mean the Windows command prompt? What exactly do you mean by "it does not function under MSDOS", and "in a text editor window it works"? What exactly are you trying to do? Do you get error messages? If yes, then copy and paste the exact error messages.

Remember that we don't know anything about your program and what you're trying to do, and we can't see what you are doing on your computer, so you'll have to explain it all exactly if you want people to help you.
 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper de Jong wrote:I guess that with "MSDOS" you mean the Windows command prompt? What exactly do you mean by "it does not function under MSDOS", and "in a text editor window it works"? What exactly are you trying to do? Do you get error messages? If yes, then copy and paste the exact error messages.

Remember that we don't know anything about your program and what you're trying to do, and we can't see what you are doing on your computer, so you'll have to explain it all exactly if you want people to help you.



Hello Colleague
Using a jar tool and creating a Jar file using cvf command etc in msdos mode does not display the output for theJar file using java - jar .jar in the same mode and it says header fielld incorrect or the file not able to open (either util.zip or so).Here the main requirement is to make a Jar file display its usual output as it would if the same is execiuted using a texteditor.Normally an assistant is deployed to make the jar file function by indicating a class path and a Virtual Machine launcher with approprite size etc so that the jar becones usefull using command like java -jar ....jar,though this does not mean make the jar file eventually an executable file since executable files and mere jar file have portablity limitations differently .Hence the desire to hava wizard for Jar files .

Thanks
As
CRMK
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to be able to run your JAR file with a command like: java -jar MyProgram.jar, then you have to make the JAR an executable JAR, with an appropriate manifest file (META-INF/MANIFEST.MF). How to do that exactly is explained in Oracle's Java Tutorials: Packaging Programs in JAR Files

Comal Rajagopalaratnam Muthukumar wrote:... it says header fielld incorrect or the file not able to open (either util.zip or so).


If you want help with that particular error, then copy and paste the exact error message that you get, instead of vaguely describing what error you got.

Comal Rajagopalaratnam Muthukumar wrote:... so that the jar becones usefull using command like java -jar ....jar,though this does not mean make the jar file eventually an executable file since executable files and mere jar file have portablity limitations differently .


If you want to be able to run the JAR file with java -jar ... then it needs to have a correct manifest file, as described in the tutorial that I mentioned above. Such a JAR file is called an "executable JAR". That does not mean the JAR file will be a native executable program for any particular operating system (such as an exe file for Windows), and there will be no portability limitations - it will work on any operating system for which there is a suitable JVM available.

Don't confuse "executable JAR" with "native executable program" for any specific operating system - these are not the same thing.
 
Comal Rajagopalaratnam Muthukumar
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
Your material about Jar Files were useful.Thanks a lot
As
CRMK
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic