From what I understand, virtualenv enables you to have separate library installation paths, effectively separate "virtual" Python installations.
Java doesn't have the concept of a "system-wide installed" library(*): It always searches the classpath for the libraries to be loaded. Since the classpath can be (and needs to be!) defined for each application, each application can pick-and-choose which libraries and which versions it wants to load.
If you go down one level deeper and have a single application that somehow needs two different versions of the same library at the same time, then you can do even that with some classpath trickery. It can get complicated, but it's definitely possible (OSGi is one example where this is supported, even Tomcat with two separate webapplications does this).
I've seens some references to security in the virtualenv description: Java has a pretty thorough security system built in. In server applications it's often turned off because it's just easier to configure this way, but you can easily configure what exactly a Java application is allowed to do.
(*) Almost, there are extensions or extension libraries, but they aren't used a lot and even those can easily be loaded from arbitrary directories.
Answer from Joachim Sauer on Stack OverflowFrom what I understand, virtualenv enables you to have separate library installation paths, effectively separate "virtual" Python installations.
Java doesn't have the concept of a "system-wide installed" library(*): It always searches the classpath for the libraries to be loaded. Since the classpath can be (and needs to be!) defined for each application, each application can pick-and-choose which libraries and which versions it wants to load.
If you go down one level deeper and have a single application that somehow needs two different versions of the same library at the same time, then you can do even that with some classpath trickery. It can get complicated, but it's definitely possible (OSGi is one example where this is supported, even Tomcat with two separate webapplications does this).
I've seens some references to security in the virtualenv description: Java has a pretty thorough security system built in. In server applications it's often turned off because it's just easier to configure this way, but you can easily configure what exactly a Java application is allowed to do.
(*) Almost, there are extensions or extension libraries, but they aren't used a lot and even those can easily be loaded from arbitrary directories.
Build tools like Ant, Maven, and gradle are the the closest thing to pip or easy_install.
The concept of virtualenv is done by the classpath. So there is no real need of virtualenv for Java
How to Install Java (JDK/JRE) with PIP? - Stack Overflow
Why is there no such notion of a virtual environment in a language like Java? Why only in Python?
Use virtual environment with Jep
How Java program can run python program with virtual environment? - Stack Overflow
» pip install jvm
I dont know if it ispossible (install JAVA through PIP) my guess is it is not. But what you have done with "pip install install-jdk" is just intalled a Python library called install-jdk. To have this working you need a python script that import this library and call the function who install JAVA. See https://pypi.org/project/install-jdk/
it sounds like you haven't downloaded the official java yet.
you have to download java via their official website first https://www.oracle.com/java/technologies/downloads/
afterwards, remember to set your PATH (under environment variables) to route to the correct java path
Is it because with Java development you add the dependencies (libraries) each time to the project, and you can specify version numbers etc. while in Python everything is pip installed globally?
» pip install install-jdk