I created the following environment.yml file from my local Anaconda that contains an openjdk package.
name: venv
channels:
- defaults
dependencies:
- openjdk=11.0.6
However, Azure Machine Learning couldn't install the openjdk package from the environment.yml file as module is not found.
Backstory:
I'm building a machine learning model using H2O.ai Python library. Unfortunately, H2O.ai is written in Java so it requires Java to run. I've installed openjdk to my local Anaconda venv for running H2O.ai locally - it runs perfectly. However, I couldn't deploy this model to Azure Machine Learning because it couldn't install openjdk from requirements.txt or environment.yml as module not found.
Solution:
Install openjdk through conda but specify conda-forge as the channel to install the package from.
name: venv
channels:
- defaults
- conda-forge
dependencies:
- conda-forge::openjdk=11.0.9.1
Do you have terminal access? sudo apt install default-jdk should work on Debian-based systems (such as Ubuntu); or if you need a specific version, e.g. JDK 14: sudo apt install openjdk-14-jdk
Alternatively, there is a guide to installing H2O on Azure in the manual; apparently H2O is available in the Marketplace.
Related
I have MacOs when I install Hadoop I used this Command sudo apt install hadoop-yarn-resourcemanager
I got below error
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/apt"
apt is the Debian / Ubuntu Linux package management system. What makes you think that MacOs supports Debian packages?!
Instead you could install and use the brew package manager.
See https://isaacchanghau.github.io/post/install_hadoop_mac/ for example.
I am trying to change java installed in boss Linux because am trying to install eclipse oxygen which needs java8. First I couldn't find where the jdk installed. Currently 1.7.0_73 installed. I just downloaded the tar.gz of jdk8. Extracted in a location. Setted java home and path pointing bin. But still am getting error during eclipse installation that version 1.8 is required.
Well as Wikipedia states that
BOSS Linux is an "LSB certified" Linux distribution :
the software has been certified by the Linux Foundation
for compliance with the Linux Standard Base standard.
BOSS Linux is derived from Debian Linux.
Note that It is derived from Debian Linux and uses apt to handle packages for updates or upgrades. On that note, you just have to use apt
command to upgrade to version you want.
Installing java version 1.8 by installing OpenJDK v8
To install java version 1.8 (OpenJDK v8), type following on terminal :
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
If you only want to install the Java Runtime Environment :
sudo apt-get install openjdk-8-jre
Feel free to add-in more details to the answer.
Hi I want to install WSO2 API Manager on VirtualBox with Ubuntu 14.04 LTS, I install Java using sudo apt-get install jre-default but I got OpenJDK version that isn't recommended for WSO2.
So I proceeded to add oracle repository and install java 8, then I configured as default java version and used the source /etc/environment for update paths, then with echo $JAVA_HOME I got this route /usr/lib/java/java-8-oracle/jre/bin/java and when I run the wso2server.sh I got "Error: JAVA_HOME is not defined correctly. Carbon cannot execute java"
I don't know what is the problem when I installing WSO2 API Manager. Or in the route, also I check the route with Whereis java.
I would like to use Amazon Lambda to run a component. However, this component has dependencies with some packages which seem to be only available in the Oracle's SDK.
I have read that AWS Lambda functions run on Linux Amazon AMI (which are Open SDK based). Actually, some time ago I tried to run my project on an EC2 instance and faced the same problem, so I switched to a standard Ubuntu 14.04 and I installed the Oracle Java 8 SDK.
Do you have any ideas?
Edit: the problem I'm finding is:
[2016-11-21T23:58:02.100] java.lang.NoClassDefFoundError: com/sun/webkit/network/CookieManager
[2016-11-21T23:58:02.100] java.lang.NoClassDefFoundError: com/sun/webkit/network/CookieManager
[2016-11-21T23:58:02.100] at com.machinepublishers.jbrowserdriver.JBrowserDriverServer.main(JBrowserDriverServer.java:74)
I think that class is only available in the Oracle's Java SDK.
If you check Lambda Execution Environment and Available Libraries, then you will get
If you are using any native binaries in your code, make sure they are
compiled in this environment. Note that only 64-bit binaries are
supported on AWS Lambda.
AWS Lambda supports the following runtime versions:
Node.js – v0.10.36, v4.3.2 (recommended)
Java – Java 8
Python – Python 2.7
Q: What is the JVM environment Lambda uses for execution of my function?
Ans: Lambda provides the Amazon Linux build of openjdk 1.8.
Q: How do I compile my AWS Lambda function Java code?
You can use standard tools like Maven or Gradle to compile your Lambda
function. Your build process should mimic the same build process you
would use to compile any Java code that depends on the AWS SDK. Run
your Java compiler tool on your source files and include the AWS SDK
1.9 or later with transitive dependencies on your classpath. For more details, see aws documentation.
You can also check: AWS Lambda: How It Works
UPDATE:
If you check the github for jbrowserdriver, the pre-requisite are given
Prerequisites
Java 8 with JavaFX:
Ubuntu Xenial 16.04 LTS, Debian 8 Jessie (Backports), Debian 9
Stretch:
sudo apt-get install openjdk-8-jre openjfx
Ubuntu Trusty 14.04 LTS:
sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java8-installer libgtk2.0 libxtst6 libxslt1.1 fonts-freefont-ttf libasound2 && sudo update-alternatives --config java
Mac, Windows, Linux:
install Oracle Java 8 (note: choose either the JRE or JDK but not the "Server JRE" since it doesn't include JavaFX)
Resource Link:
https://aws.amazon.com/lambda/faqs/#functions-java
I'm installing Neo4j on a headless system, a virtual server only accessible by ssh. When using the instructions from http://debian.neo4j.org/, the package manager wishes to install java-runtime, which pulls in all kinds of GUI-related packages. There is a headless version available (java-runtime-headless), but it is clear that this doesn't satisfy the dependency.
Is it possible to install Neo4j, using the deb repository made available, with the headless java runtime and then how, or are some of the non-headless packages really required?
Use Oracle JDK - doesn't depend on any gui related packages (it probably does for some tools, but not explicitly).
Full JDK (java development kit) might come in handy when you start debugging some issues.
Here is how to install oracle jdk:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
In the end, I created a dummy package that makes java7-runtime-headless satisfy java7-runtime using the equivs package. See the question “How to fake a package version installed?” for general information.
The package file I wrote is as simple as
Section: java
Priority: optional
Standards-Version: 3.9.2
Package: java7-runtime-dummy4headless
Maintainer: equaeghe <equaeghe#example.com>
Depends: java7-runtime-headless
Provides: java7-runtime
Description: fake package to allow us to use java7-runtime-headless instead of java7-runtime for neo4j