wood burning stoves 2.0*
The moose likes General Computing and the fly likes Can a java application be put on a server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Can a java application be put on a server" Watch "Can a java application be put on a server" New topic
Author

Can a java application be put on a server

Larry Jones
Greenhorn

Joined: Oct 22, 2002
Posts: 24
Hello,
This is something that I have been thinking about for awhile. Let's say I develop a java application that is not an applet, and not a servlet, but a standalone java application. If I am in a client-server environment, can that application be put on a server and accessed by all the client computers? Or does it have to be installed separately on each computer I want it to run on? Is this what is meant by an 'application server'? Or is a server that runs servlets or Coldfusion an application server?
And a follow up: If I am in a client-server environment running win2k server, can a Microsoft application such as Word be put on that server and be accessed by all the client computers? Or does it have to be installed separately on all the client computers?
Thank you for any responses.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Yes, you can put a Java Application on a Server and everyone can access it so long as they have access to the server. For that matter, one time I copied the JRE folder to the server as well, and wrote my batch file so that it used that JRE folder for the VM and the client didn't have to even install JAVA. This is not good practice, but it worked for what I needed it to do.
As for your second question. No. By default, Windows and Office won't let you do that. You can however use Terminal Services which is designed to do what you desire. You still have to have a liscense for each user that uses Office though. No way around that legally.


GenRocket - Experts at Building Test Data
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Larry, like a lot of other folks, you probably haven't thought about exactly what the words "a server" really mean (to paraphrase a late president).
Hardware vendors use the term "server" to refer to a particular type of configuration which generally is distinguished by high-performance disk drives, options for remote diagnosis and/or control, and possibly even amenities such as hot-swap power supplies. However, in my previous job, I bought these "servers" to act as client machines because the users were pulling down large mainframe files and acting on them locally.
The most common generic use of the term "server" - and I think the one you meant, is LAN server - which refers to software installed on some computer (often a hardware "server" box) that's responsible for sharing out resources over a network. The exact details vary - Novell servers were dedicated machines running a custom OS, nowadays many shops are running Windows servers, and they run basically the same OS as client machines do - just with fewer limitations on resource sharing.
A "server" in the software sense is really any program that waits for client requests and, upon receiving one, serves up some sort of response. A LAN server falls into this category, as do web servers, Java application servers (which often also provide web server capabilities), time servers, mail servers, ftp servers, and many other functions. Software servers are generally lightweight enough that one machine can and often does host multiple software servers of different types and sometimes even multiple servers of the same type (for example, multiple copies of Apache).
Going back to your original question for a moment. To run a java application, you need 2 things. 1) a Java runtime. 2) the java application. Either, neither, or both of these can be places on a LAN server. Just as long as the client machine can access both items - whether through the local filesystem or a LAN share, the Java app will be able to run. The same is actually true of Windows apps as well, except that Windows apps usually call so many outside DLLs and registry entries that the job is next to impossible.
There's also a third type of server I should mention - you can write a Java application AS as server program. I've seen http servers and proxies, ftp servers, and EJB servers all written in Java. A Java server is just a server application (as defined above) that happens to be written in Java.
Going back to MS Office. At least at one time, I believe that products like Word were constructed to run off a LAN. However thanks in part to the registry and very much in part to the fact that Microsoft intends to see you pay at least once for every machine you run MS Office apps, you can't just put a copy on a LAN server and use it at will. Instead you'd have to do a separate licensed install for each LAN client.


Customer surveys are for companies who didn't pay proper attention to begin with.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Tim Holloway:
Instead you'd have to do a separate licensed install for each LAN client.

Or use Terminal Services.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Originally posted by Gregg Bolinger:

Or use Terminal Services.

Its been a while since I looked at Terminal Services, but in some cases at least, the client user's registry settings still come into play. Technically that means an install would have to be done per-login, rather than per-machine, but it's still multiple installs.
Of course, I don't KNOW that Microsoft is auditing that stuff, but then I hadn't KNOWN that some of their OEM licenses carried a "this copy of Windows is welded into the machine and cannot be transferred even if the machine is scrapped" clause until recently. I do know that they're looking to keep the cash cow fat, so even if you can run multiple Office users for free via WTS today, there's no guarantee down the road.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Oh, you can't do it for free now. You actually have to liscense each client machine for terminal services. In Advanced Server there is actually a Terminal Services Server and a Terminal Services Liscense Server that distrubutes the certificates to the client machines.
But this is off topic, I think we have probably answered Larry's question.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Larry, back to your original questions, I think that you might want to look into Java Web Start. I use it for an application where I work and it seems to work great.
Larry Jones
Greenhorn

Joined: Oct 22, 2002
Posts: 24
Thanks for your input everyone.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can a java application be put on a server
 
Similar Threads
applets or client/server applications
How to Save applet page as a JPG file
New to Java Web Application
Tomcat 4.0.1 with JBoss 3.0.2
Using Tomcat as Servlet Container and JBoss as App Server