Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I develop Java programs if I have only JRE installed?

Tags:

java

I have JRE 1.7 installed on my system. Due to some admin issues I don't have JDK on my system. is there any way I can develop Java programs with JRE only?

like image 655
user2176800 Avatar asked Jul 15 '14 06:07

user2176800


People also ask

Can I run a Java program only with JRE?

It provides a platform to execute java programs. JRE consists of JVM, Java binaries, and other classes to execute any program successfully. JRE doesn't contain any development tools such as Java compiler, debugger, JShell, etc. If you just want to execute a java program, you can install only JRE.

Can JRE work without JDK?

The JDK is required to develop and run Java applets and applications. The JRE is used to run Java programs. It is required to run any Java programs.

Can a JRE compile code?

Java Runtime Environment (JRE): It is important to know that JRE cannot compile the code. JDK comes with its own JRE and in order to run any java program from any browser you have to install JRE in your machine and should also be able to enable your browser.

Is JRE required to compile Java files?

Java source code is compiled and converted to Java bytecode. If you want to run this bytecode on any platform, you need JRE.


2 Answers

No you can't develop java programs only with JRE

You will need JDK for compiling your programs.JRE provides only runtime environment,but JDK is something you will need to compile your code to make them executable by your JRE.You will need javac for compiling your code which is present in JDK.

enter image description here

However for resolving the issue of admin rights you are having, you can download and install eclipse which has its own built in compiler.

like image 143
nobalG Avatar answered Oct 03 '22 23:10

nobalG


You need some program which compiles your sources, but that doesn't neccessarily have to be the JDK.

For example you can download Eclipse which only requires a JRE, it has it's own compiler (built-in) and you can develop with that. Eclipse does not require any admin priviliges, it's a zip file which you can download and extract.

like image 22
icza Avatar answered Oct 04 '22 01:10

icza