LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 December 23 2004

7aRami
Member

Java questions

hello guys!
I am starting a project using java, and I need to convert the compiled .class files into executable files (.exe), do u know any program that can do that for me..?
my project is based on networking and writing on .dat files... I need to know if it is somehow easy to send data from a client to a server, telling it to either write some data on a specific file, or retrieve some data from the same file.. tell me if what I thought about is correct or not..
If I had for example a table containing the ID and the name of some students.
if I need to write new record on the file, I'll send 3 variables from the client to the server, 1 for the ID, the other for the name, and the third to tell the sever that he should write the first 2 variables to the file.
while if I need to retrieve the name related to a specific ID, I'll be sending 2 variables, 1 for the ID to be retrieved and the other will be to tell the server that it he should retrieve the information for me.
meaning, ill send a "0" for example for the writing thing, and a "1" for the retrieving.
ill sure need the server to reply to me...

so what do u think? am I on the right way..?

Offline

#2 January 21 2005

alateos
Member

Re: Java questions

hello guys!
I am starting a project using java, and I need to convert the compiled .class files into executable files (.exe), do u know any program that can do that for me..?
my project is based on networking and writing on .dat files... I need to know if it is somehow easy to send data from a client to a server, telling it to either write some data on a specific file, or retrieve some data from the same file.. tell me if what I thought about is correct or not..
If I had for example a table containing the ID and the name of some students.
if I need to write new record on the file, I'll send 3 variables from the client to the server, 1 for the ID, the other for the name, and the third to tell the sever that he should write the first 2 variables to the file.
while if I need to retrieve the name related to a specific ID, I'll be sending 2 variables, 1 for the ID to be retrieved and the other will be to tell the server that it he should retrieve the information for me.
meaning, ill send a "0" for example for the writing thing, and a "1" for the retrieving.
ill sure need the server to reply to me...

so what do u think? am I on the right way..?

I'm not going to go into why you can't make an exe file out of .class files. There's a very good reason for it and it conforms to the "write once, run everywhere" philosophy of java.

Anyway, the closest I've come to executable files in java is to make Executable Jar files out of your project.

Do some research on the Internet for Jar and War files. I would use the former for standalone applications and the latter for web applications.

To me it seems like you've just written a class for a client and a class for a server. Then you're running your server class on one machine, and it is waiting for the client to connect. Yeah try executable jar files.

Offline

Board footer