Sruthy, with her 10+ years of experience, is a dynamic professional who seamlessly blends her creative soul with technical prowess. With a Technical Degree in Graphics Design and Communications and a Bachelor’s Degree in Electronics and Communication, she brings a unique combination of artistic flair…
We learned more about Java Swing in our previous tutorial, in this tutorial, we will learn how to deploy a java project.
Once coding has been completed, you have to wrap all the files as a JAR file and that jar file can be deployed in any required machine. Check our interesting Java training series.
Here is a Video tutorial on Java Deployment:
To Create a Java JAR file
Right-click the project folder and select “export “option.
Select the java folder and select the jar file inside the java folder.
Enter the File name and file location to save.
Click on finish.
Now, you can get the jar file in the specified location.
To Run the JAR file
You can run the jar file from the command prompt/ terminal.
First, you need to go to the directory in which you have the jar file from the terminal/command prompt.
Then, type the below command and hit enter,
java –cp JarName mainclass_with_packagename
Now, the program has been executed.
Conclusion
Java class files can be wrapped as a jar file and that can be executed in any machine.
In this tutorial, we learned how to build a jar file and execute it.
This Tutorial Explains What is a JAR File and How to Run and Open it in Windows, MAC, Linux using .JAR File Openers: You must have come across JAR files at some point while surfing the Internet and must have wondered about it, about what it is and what it…
This Tutorial Provides an Introduction to the Basics of Java Coding Language. We will Introduce Topics Such as Java Class, OOPS, Syntax, and Core Java Concepts: In our previous tutorials, we have discussed the characteristics and features of the Java language. We have also learned about Java applications. We got…
A Complete Overview of Java Virtual Machine: Java Deployment was explained clearly in our last tutorial. Here, we will explore more about JVM. Java Virtual Machine - JVM is a software implementation of a machine. While downloading JDK, JVM also comes with that. JRE provides the run-time environment. There are…
This Tutorial gives a Detailed Description of Java as a Platform and its Components i.e. JRE, JDK, Java Virtual Machine and Difference Between JRE vs JDK: Java has been described as a programming language as well as the platform. In our introductory tutorial, we already discussed that a platform is…
Hands-on Java Tutorial Series for Beginners: Learn Java Online from Scratch Learn Core Java Programming with the help of this hands-on free Java training course. List of Java Video Tutorials for Beginners to learn Java language from scratch with examples. Get ready to learn Java online with our range of…
In this tutorial, we will learn all about Java char or Character Data Type which is another primitive data type in Java: This tutorial will also include a brief description of char data type, syntax, range, and example programs that will help you understand this primitive data type in detail.…
This tutorial explains how to use the Java Continue Statement in various scenarios while dealing with the loops with the help of programming examples: In this tutorial, we will discuss Java’s “Continue Statement” - one of the jump statements that Java supports. Here, we will cover the topic in detail…
In this tutorial, we will Explore the Java Keywords List and learn about some Important Reserved Words, their Meaning along with Examples: Keywords in Java are the reserved words that act as a key to the code. As these words are predefined, they cannot be used for any other purpose…