Results 1 to 5 of 5
  1. #1
    nirasiva is offline Member
    Join Date
    May 2011
    Location
    chennai
    Posts
    29
    Rep Power
    0

    Default how to bind the class into a .jar

    Hello Sir My java class have no main function,i create a .class file...now i want to create a jar file how can i create a jar file?

  2. #2
    samanyu is offline Member
    Join Date
    Jun 2011
    Location
    Tsukuba, Japan
    Posts
    63
    Rep Power
    0

    Default

    You might find this helpful.
    Q&A : How do I create a .JAR file?
    Cheers.

  3. #3
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Cool

    Quote Originally Posted by nirasiva View Post
    Hello Sir My java class have no main function,i create a .class file...now i want to create a jar file how can i create a jar file?
    If there is no main function, how are you gonna make the jar file run if you want to? Because the manifest file inside it will need an entry point.

    Anyways, if you simply want to make it go here : Creating a JAR File

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,573
    Rep Power
    12

    Default

    You can put any files you like into a jar file: .class files, image files, anything. And the .class files don't have to define classes with any static main() method. There are details in Oracle's Tutorial in the Packaging Programs in JAR Files section.

    (Of course to run a program using the java executable you have to name a class which has a static main() method that can act as the program's starting point, but that is another matter.)

  5. #5
    nirasiva is offline Member
    Join Date
    May 2011
    Location
    chennai
    Posts
    29
    Rep Power
    0

Similar Threads

  1. Replies: 26
    Last Post: 05-13-2011, 04:54 PM
  2. How to bind soap header using jax-rpc
    By jadeite100 in forum XML
    Replies: 0
    Last Post: 12-05-2010, 07:17 PM
  3. How to bind Spring MVC with my local service
    By Alexey Slepov in forum Web Frameworks
    Replies: 1
    Last Post: 03-25-2010, 12:48 PM
  4. Replies: 4
    Last Post: 12-19-2009, 11:16 AM
  5. bind slider to column in DB
    By nicromonicon in forum New To Java
    Replies: 0
    Last Post: 01-12-2009, 05:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •