my first Jar
hi i wrote a program and now want to make a jar file from it,
the program runs in Eclipse with run Run
and am now wondering how to make a runnable Jar File of it.
after choosing File-> export -> Java -> runnable Jar file
i get a dialog with 3 options:
1 -> Extract required Libraries into generated Jar
2 -> package recruired libraries into generated jar
3 -> Copy required libraries into a subfolder next to the generated Jar.
my program only uses the standard Java libraries
(including Swing and Awt, but not Swt or JFace)
what should i choose and why?
I do not want to distribute my sourcecode this time, how do i make sure only the compiled code is in the Jar?
Thanks in Advance
Re: my first Jar
How about you just export the jar, and then look what's inside it? My experience has been that Eclipse only exports what is needed. You will have to choose a configuration to use for the export, but that should be easy enough if you've run the file from the "Run" menu.
Oh, I see now what you're getting at. I think anyone with a JDK may be able to open and see your code. There may (probably is) a way to set a password on your .class file, but I have no idea how. I just tried on my computer and could only see the compiled bits, but I'm no computer expert. Eclipse wouldn't open it either. You may be fine.