Re: Jar file only works on my pc
On Feb 4, 11:02 am, stinkinric...@googlemail.com wrote:
....
I use textPad 4 to compile (so just javac) and command line to make
jar. I open the jar file using 7zip and all of the class files are
there (as in, the ShutTheBox.class and ShutTheBox$1-10.class (what are
these for!!))
Inner/anonymous classes.
..plus the gif files, plus a folder called META-INF with
the manifest file in it. It works fine in any directory on my pc.
The best way to prepare a jar is using the jar tool
provideed with the SDK. Some other tools will use
a less rigourous file structure, and offer non-standard
forms of compression.
Do you recon it's the class file? My mate can't get the applet version
onhttp://www.txfiles.co.uk/rich/ShutTheBox.htmlto work. can you?
Yes it works fine for me, using Java 1.6.
(or at least seems to - 'spinnable dice' appear etc.)
Did your 'mate' get some console output?
What was it?
Was this not originally a question about how to get
an *application* working?
..All
my other applets work fine. Is it the stupid $ signs?
I think I have the $'s because of my actionListener inner classes. Is
this a problem?
No - so long as they are all included.
...good practice etc?
'Neither good nor bad' - it depends on the overall
design whether it makes sense to have them.
I do *not* believe this is the cause of the problem,
unless you have not included them all.
One last thing..
'One person got the "can't find main class" message"'
...If at all possible, get a copy/paste of that message.
Andrew T.