开发者

How can we create more than one instance of a class from single Java class file?

I have a r开发者_开发技巧equirement which says I have to create only once class file of one Java Swing application and reuse them to create multiple instance of same application.

One way comes to my mind is store this class file and create instances from that files whenever required.

but is it correct way? Is there any other efficient way to create instance of applications using class created only once and stored somewhere?

Also there is additional desing constraint that says that you should use parts of class files in creating more than one application.


I have to create only once class file of one Java Swing application

compile the swing application's java source files into class files (this needs to be done just once)

and reuse them to create multiple instance of same application.

run the same class files in different virtual machines instances (sequentially, or simultaneously)

.. or have I got you completely wrong? :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜