Anyway, I think I have partly figured out why I was getting that problem, in Eclipse it seems to jar the entire project folder.
So I created another project folder called "test" and moved the 3 files into that folder and was able to jar it like that... but still cant make an "executable jar file" :(

A little off topic:
I basically want to send a friend of mine the test project I was working on so that he (who does not have any java/programming experience) can double click my jar file and launch the program and test it out.

First on Eclipse. When you selected file->export->Java->Runnable Jar File->... the resulting dialog gave you a choice (on the left hand side) to select what resources you wanted to include.

I wouldn't recommend using some random zip tool (including whatever Microsoft build into their file browser) when what you are making is a jar file. The links explain what the jar executable does and how to use it: and building your own jar file will give you more insight into what Eclipse does for you. (the options you have, which - as you've seen - may not be clear from its dialogs)

For your friend to be able to doubleclick-n-run (that wasn't off topic btw) a couple of conditions have to be met. First you must have jarred up all the resources your application needs. And not just what you think it needs. You can test this by copying the jar file somewhere else on your computer, renaming it and seeing for yourself what happens.

Secondly your friend's computer must have some sort of desktop manager that interprets jar files as something that should be run when double clicked. Windows (out of the box and provided the Java runtime is installed!) does, others may not.

Anyway, I think I have partly figured out why I was getting that problem, in Eclipse it seems to jar the entire project folder.
So I created another project folder called "test" and moved the 3 files into that folder and was able to jar it like that... but still cant make an "executable jar file" :(

If you right click on a project and select Export>Jar File, Eclipse assumes that you want to export all the files in that project; the wizard shows that project top level folder as selected in the left pane. Files unrelated, but belonging to that project are shown in the right pane. You can (de) select any directory in the project. You can also specify the name and directory of your jar file in the current panel (below the two others).

In the next panels (click 'next') you can specify what exactly to export and you can also specify which file to use for the manifest entry in the jar file.

Select export to a jar file instead of a runnable jar file and do it yourself: i.e. select the files to be exported and an optional manifest file. More important: read the manual so you know what you're doing; too many people try to click their way through quite a complicated process (Eclipse already makes it a lot easier for you). Also read my previous reply.

I opened the jar file and I see a lot of class files for one single java file

example
one.java is the original file but I see
one.class
one0.class
one1.class
etc

so I did a manual compile for each program
(javac one.java)

then jarred all those class files, made the manifest to point to the main() class

(so far so good)

then did a java -jar <filename>.jar (in the console)

and the damn thing opened up and ran perfectly!!!

Was soooo ****ing happy to see it running by itself
(first time I have done this, and like they say... you never forget your first :p )

Then I exited the console and double clicked it in windows explorer, and it opens Nokia OVI :confused: :eek: :(
Started googling and found out that Nokia associates .jar files with OVI because they automatically assume that a .jar file is a game or something and NOT that it can be a java developer creating his own jars.
ARRRGH! (Was not going to buy a Nokia again, and this seals the deal - next phone Android)

Ok, done with my little rant... can someone tell me how I associate the .jar files back to java please?
Is it as simple as "open with" and point to Java.exe or javaw.exe or do I have to add some parameters as well?

COntrol Panel -> Programs -> Default Programs -> Set Associations (or right click and "open with...") lets you set the application executable but that's all as far as I can see.

According to annoyances.org the pre vista ability to edit these things has been removed. They suggest a third party tool that attempts the sisyphean task of making this OS behave properly and let you set file associations. I haven't tried it.

Right click on jar file, in the menu that pops up click on open with, then browse (because java was not shown in the list of program) browse over to your installation of java and double click on java.exe

problem is, when I double click on the .jar it opens a command window and then exits again (too fast to see what the error is), I think its a null pointer exception.

But opening the same thing with java -jar <filename>.jar runs it perfectly :(