The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

how to show/open/load JPanel(form) in an external jar

i am beginner in java, i am used to VB.
Here is my case:
1. i've made a desktop application using netbeans
2. it contains main.class that launch the myForm.class.
3. it works when run from its project and netbeans
4. then, i made it became a jar file
5. i put the jar file in a specific folder (eg. as same folder as the new-another desktop app. will load the jar). so, how i should load it when run time (using source code)

Re: how to show/open/load JPanel(form) in an external jar

how i should load it when run time

Can you explain your problem?
Code executed from a jar should work the same as when executed from files in a folder.
The exception is you need to treat files as resources and use the classloader's getResource methods instead of File reading classes.

You execute the code in a properly constructed jar file by the command: java -jar <THEJARFILENAME>.jar
The jar command is used to create a jar file.