Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #4360

Re: Creating Archive Files in Eclipse with images.

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!s41g2000prb.googlegroups.com!not-for-mail
From Sanny <softtanks22@hotmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Creating Archive Files in Eclipse with images.
Date Fri, 20 May 2011 07:17:25 -0700 (PDT)
Organization http://groups.google.com
Lines 79
Message-ID <ec72fd63-eafc-47d9-8a30-7fe0f1219c81@s41g2000prb.googlegroups.com> (permalink)
References <97d85e5c-e75b-41d0-a967-02cdbf7b4913@q14g2000prh.googlegroups.com> <ir0jak$685$1@dont-email.me> <66251df5-1f5e-4cf7-9c86-3dac2a82b311@z13g2000prk.googlegroups.com> <ir3kkp$obm$1@dont-email.me> <bcdea7dc-328c-41c7-aa15-bd14f9b53a96@18g2000prd.googlegroups.com> <ir5ii9$vt9$1@news.albasani.net> <791a4586-8051-4373-89c5-97cca40f31fb@18g2000prd.googlegroups.com> <ir5pe1$fnc$1@news.albasani.net>
NNTP-Posting-Host 122.168.18.254
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1305901045 24968 127.0.0.1 (20 May 2011 14:17:25 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Fri, 20 May 2011 14:17:25 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info s41g2000prb.googlegroups.com; posting-host=122.168.18.254; posting-account=TwCTWQgAAAC7hf6GV7aTGIk6mVGkiZ5c
User-Agent G2/1.0
X-HTTP-UserAgent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FDM),gzip(gfe)
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4360

Show key headers only | View raw


> > I removed all unwanted files.
>
> No, you didn't.  Apparently you are trying to include some unwanted files more
> than once.

I am using Export-> Java -> JAR File

Then I get a Window:

On One Side: FightGame
This is my package name

On Other Side

[.] .ClassPath
[.] .project

I uncheck above two files as you suggested.

When I Click [.] FightGame

I get a few more classes under it
1. (default package)
2. library classes
3. Meta-Inf

I removed the Meta-Inf files this time.

When I click (default package)On right window I get

[.] HelloWorld.java

I tried removing HelloWorld.java

But then It do not allow me to choose the Main Class: HelloWorld.
And It do not allow me to create a Jar when I disable: HelloWorld.java

Now when I Create Jar

I get below errors.

JAR export finished with warnings. See details for additional
information.
  Problem writing /FightGame/HelloWorld.java to JAR: duplicate entry:
HelloWorld.java
  Problem writing /FightGame/META-INF/MANIFEST.MF to JAR: duplicate
entry: META-INF/MANIFEST.MF


> One does not normally include source in a JAR, or at least not in the
> deployment JAR.  Why do you wish to do so?

I dont want to put HelloWorld.java But It do not allow me to choose
"Main Class" when I disable HelloWorld.java from the list.

> > I wanted some way to include all images and docs needed by the applet
> > into a single .jar file.
>
> It's not by including the "src" directory, it's by copying resources into the
> build directory, which Eclipse does automatically.  When resrources are in the
> designated source folders, Eclipse builds them into the JAR.

What is the Build directory? In my workspace I cant find any "Build"
folder, Do I need to create it?

> Questions should be phrased as interrogatives.
>
> AFAIK it's enough to put the resource in the "src" folder tree, and Eclipse
> copies it.  I would have to check the Eclipse documentation for the details.

I added to "src" folder too But It is not Copying to the .jar.

Bye
Sanny

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Creating Archive Files in Eclipse with images. Sanny <softtanks22@hotmail.com> - 2011-05-18 05:16 -0700
  Re: Creating Archive Files in Eclipse with images. markspace <-@.> - 2011-05-18 06:58 -0700
    Re: Creating Archive Files in Eclipse with images. Sanny <softtanks22@hotmail.com> - 2011-05-19 10:20 -0700
      Re: Creating Archive Files in Eclipse with images. markspace <-@.> - 2011-05-19 10:39 -0700
        Re: Creating Archive Files in Eclipse with images. Sanny <softtanks22@hotmail.com> - 2011-05-20 02:20 -0700
          Re: Creating Archive Files in Eclipse with images. Lew <noone@lewscanon.com> - 2011-05-20 07:16 -0400
            Re: Creating Archive Files in Eclipse with images. Sanny <softtanks22@hotmail.com> - 2011-05-20 05:20 -0700
              Re: Creating Archive Files in Eclipse with images. Lew <noone@lewscanon.com> - 2011-05-20 09:13 -0400
                Re: Creating Archive Files in Eclipse with images. Sanny <softtanks22@hotmail.com> - 2011-05-20 07:17 -0700
                Re: Creating Archive Files in Eclipse with images. Lew <noone@lewscanon.com> - 2011-05-20 12:18 -0400
      Re: Creating Archive Files in Eclipse with images. Jeff Higgins <jeff@invalid.invalid> - 2011-05-19 14:03 -0400
      Re: Creating Archive Files in Eclipse with images. markspace <-@.> - 2011-05-19 11:10 -0700

csiph-web