D
D
Deiwan2021-04-06 23:18:44
Java
Deiwan, 2021-04-06 23:18:44

Is it possible to run a Java program without installing an integrated development environment?

I have a Jframe program and I want to be able to run it without the JDK. Is this possible(?), if so, do you need only .jar or also .bat? Or maybe just some method in the java file, or in java.xml?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Orkhan, 2021-04-07
@Deiwan

Good afternoon!
To be honest, you have a confusion with the terms, so I will clarify:

Is it possible to run a Java program without installing an integrated development environment?

An integrated development environment (IDE) is a program for developing software. For example, Intellij IDEA, Eclipse, etc.
jdk - Java development kit is a kit for developing Java applications.
I have a Jframe program and I want to be able to run it without the JDK

Any jar can be run without jdk, since jre is enough to run the program.
For clarity:
606cce89baa5b840749460.jpeg
Another thing is that you want to run the jar without the need to install jre on the user's device, as, for example, the IDE does - Intellij IDEA.
Read here, this article - https://eax.me/java-without-jvm/
if yes, do you need only .jar or also .bat?

jar should be enough. In fact, at startup, the batch file will launch jar through cmd. For cross-platform when using bat, you will also need to create a sh script to run on UNIX systems.
I have a jframe program

JFrame is not a program, but a class from the awt package.
https://docs.oracle.com/javase/7/docs/api/javax/sw...

J
Jacen11, 2021-04-06
@Jacen11

For starters, the JDK is not an IDE. JVM is required to run java files. JVM is an instance of JRE (Java Runtime Environment), that is, either hope that there is a jre on your computer or drag it with you.

need only .jar or also .bat

Well, first, find out what it is. Depends on a bunch of things.
I have a jframe program

no, no

A
acwartz, 2021-04-07
@acwartz

Yes, you can. Launch4j will allow you to package everything into an exe, launching which will deploy a temporary runtime environment inside which your jar will run.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question