• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Jar files creation

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

I'm just starting java development and I need to create a jar file to deploy it to another user. I have the following folder's struture:
c:\rhiegen\downloads\projects\server
and my .java, .class are inside ...\server. They are:
Servidor.java
Servidor.class
Servidor.txt which is my manifest file with the following content
Main-Class: Servidor.Main
Then I issued the following command in the hope of creating my jar file:

jar -cfmv Servidor.jar *.* *.class from inside ...\server folder.
It creates Servidor.jar but when I click it I doesn't execute itself like an .exe file and shows the following error message:
invalid or corrupt jarfile: c:\rhiegen\downloads\projects\server\Servidor.jar.

How can I create an self executing jar file so that I can send it to anyone even if he has not java installed in your computer?

Thanks in advance,


Rhiegen
[originally posted on jforum.net by rhiegen]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rhiegen,

JForum's site is about the project "JForum", not about general discussion about java .

Are you Brazilian? if so, you can go to http://www.guj.com.br/forum and post your question there ( there is already many questions about jar files, and many answers ).

If you are not brazilian, you can use the Java Forums Discussion from java.net, at http://forum.java.sun.com/

Rafael
[originally posted on jforum.net by Rafael Steil]
 
I guess everyone has an angle. Fine, what do you want? Just know that you cannot have this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic