File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to make a specify client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to make a specify client" Watch "How to make a specify client" New topic
Author

How to make a specify client

filson sun
Greenhorn

Joined: Mar 06, 2011
Posts: 12
I have make a Constructor to make the user to have a specify program , but I do not know how to make the specify class that contains the user's configuration info to be the *.java
file (with the java language). who can help me ,Thank you !
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18546
    
  40

Can you please elaborate? I am thinking there is a translation problem here, because I can't understand what you are asking.


And BTW, welcome to the JavaRanch.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
filson sun
Greenhorn

Joined: Mar 06, 2011
Posts: 12
Henry Wong wrote:Can you please elaborate? I am thinking there is a translation problem here, because I can't understand what you are asking.


And BTW, welcome to the JavaRanch.

Henry


Thank you for paying attention to my question. My problem is that I am making a C/S program ,then I want to make the Client program with the configuration that let the user to fill it.
the Class is
"Class ClientFrame{
public ClientFrame(String hostIp, String hostPort){
........
}
}"
where,I want to save the specify instance of the ClientFrame ,then I can make it to the client user ,and he or she can use the *.java or *.jar to connect the host user computer.
But, I do not know how to save the specify instance of the ClientFrame ,and save it like the *.java or *.jar.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18546
    
  40

filson sun wrote:
where,I want to save the specify instance of the ClientFrame ,then I can make it to the client user ,and he or she can use the *.java or *.jar to connect the host user computer.
But, I do not know how to save the specify instance of the ClientFrame ,and save it like the *.java or *.jar.


To directly answer your question. You can pre-instantiate the objects that you want, and serialize them to a file. Then your program can simply derserialized the instances from those files.

However, I am guessing that this is *not* optimal. In your description, you sound like you want to set configurations. It might be a better idea to simply create configuration files, in any format that you want; and during application start up, load the configuration files, to instantiate the objects that you need.

Henry
filson sun
Greenhorn

Joined: Mar 06, 2011
Posts: 12
Henry Wong wrote:
filson sun wrote:
where,I want to save the specify instance of the ClientFrame ,then I can make it to the client user ,and he or she can use the *.java or *.jar to connect the host user computer.
But, I do not know how to save the specify instance of the ClientFrame ,and save it like the *.java or *.jar.


To directly answer your question. You can pre-instantiate the objects that you want, and serialize them to a file. Then your program can simply derserialized the instances from those files.

However, I am guessing that this is *not* optimal. In your description, you sound like you want to set configurations. It might be a better idea to simply create configuration files, in any format that you want; and during application start up, load the configuration files, to instantiate the objects that you need.

Henry



Thank you! I will use your second idea
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make a specify client
 
Similar Threads
How to make a java desktop application with register
ejb deployment-urgent
how do i make a field mandatory in my WSDL using axis2
B&S Locking Strategy
JasperReports and tables