Hi,
Can any one tell me what is server and can we run jar file without using serever i.e. only using the JVM (java command)???
I am very new to Java.
Printable View
Hi,
Can any one tell me what is server and can we run jar file without using serever i.e. only using the JVM (java command)???
I am very new to Java.
A server is a computer that serves stuff.
Can you be more specific? There are zillions of types of servers.
You can execute the code in a jar file using a JRE (Java Runtime Environment) which you can download for free from java.sun.com
Between the stuff talking about here, there is no any connection.
Server is a machine(a PC) where we locates resources to serve others.
jar is a Java deployment package. To run a jar file you need a JRE(Java Runtime Environment). You can download it from the SUNs' official web site. To run a jar file on the command prompt use the following command.
But there you should set the class path to the jar executing folder.Code:java -jar your_jar_file
Hi,
Are you asking a general server or some server like Jboss or Tomcat where we deploy our applications?
And for running application without using servers like Jboss or Tomcat is possible using the command mentioned by Eranga.
Basically server is piece of software that runs and serves resources/responses if there is any request. E.g. if you run tomcat server then it stays and waits for any requests to come. That request(s) always come from browser and after receiving the request, tomcat processes the requests and serves appropriately.
I think I am pretty much clear about the server concepts. Please let me know if you have any other questions.