You are not logged in.

#1 2018-08-11 07:06:11

Al1nuX
Member
Registered: 2018-08-11
Posts: 5

Set path for Oracle JDK

Hello,

I have installed Oracle JDK 10 from AUR, however when i try a program that needs the JDK it gives me an error that JDK is not installed and that i should check JAVA_HOME .

Running this command :

sudo archlinux-java status

Gives me :

Available Java environments:
  java-10-jdk (default)
  java-8-openjdk/jre

Running this :

echo $JAVA_HOME

Gives me no output.

Please help.

Regards

Offline

#2 2018-08-11 14:00:53

robg
Member
Registered: 2015-03-05
Posts: 210

Re: Set path for Oracle JDK

Offline

#3 2018-08-11 14:07:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,755
Website

Re: Set path for Oracle JDK

wiki: Java packaging guidelines wrote:

Arch does not use JAVA_HOME, it uses archlinux-java to set the /usr/bin/java symlink

Please post the complete command used and full output of the error.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2018-08-12 01:18:12

Al1nuX
Member
Registered: 2018-08-11
Posts: 5

Re: Set path for Oracle JDK

Trilby wrote:
wiki: Java packaging guidelines wrote:

Arch does not use JAVA_HOME, it uses archlinux-java to set the /usr/bin/java symlink

Please post the complete command used and full output of the error.

What command do you mean ?

I'm trying to setup Appcelerator studio.

The setup script is telling me to check my $JAVA_HOME .

The following JDK issues were found in your environment:

    JDK (Java Development Kit) not installed.
    If you already have installed the JDK, verify your JAVA_HOME environment
    variable is correctly set.
    The JDK is required for Titanium and must be manually downloaded and installed
    from http://appcelerator.com/jdk.

The following ANDROID issues were found in your environment:

    JDK (Java Development Kit) not found.
    If you already have installed the JDK, verify your JAVA_HOME environment
    variable is correctly set.
    The JDK can be downloaded and installed from http://appcelerator.com/jdk.

Some issues were detected for your environment

    Please review the above found issues that were detected for your environment.
    You should resolve these issues before building or running a cross platform app.
    You can re-run setup once they are resolved to validate.

appc setup complete!




Regards

Last edited by Al1nuX (2018-08-12 01:22:23)

Offline

#5 2018-08-12 01:21:27

loqs
Member
Registered: 2014-03-06
Posts: 5,530

Re: Set path for Oracle JDK

Al1nuX wrote:
Trilby wrote:
wiki: Java packaging guidelines wrote:

Arch does not use JAVA_HOME, it uses archlinux-java to set the /usr/bin/java symlink

Please post the complete command used and full output of the error.

What command do you mean ?

I'm trying to setup Appcelerator studio.

The setup script is telling me to check my $JAVA_HOME .


Regards

Al1nuX wrote:

I have installed Oracle JDK 10 from AUR, however when i try a program that needs the JDK it gives me an error that JDK is not installed and that i should check JAVA_HOME .

What was the command you ran that produced this output?  What was the actual output?
Edit:
So you are doing something like https://wiki.appcelerator.org/display/g … ng+Started
Edit2:
https://github.com/appcelerator/node-ap … dk.js#L201

Last edited by loqs (2018-08-12 02:16:30)

Offline

#6 2018-08-12 02:00:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,755
Website

Re: Set path for Oracle JDK

Al1nuX wrote:

What command do you mean?

Which ever one you were referring to here:

Al1nuX wrote:

when i try a program ... it gives me an error

I think your last post now had the error output, but please use code tags.  Having the command you used is still important though.  You said it is "appcelerator".  I'm not familiar with that and I'm not getting any results for it from an initial search of the repo and AUR.

Show us the steps you have taken so that we can replicate them and investigate where the problem is.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2018-08-13 00:06:56

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 406

Re: Set path for Oracle JDK

Al1nuX wrote:

i try a program

Al1nuX wrote:

The setup script

What @Trilby and @loqs are asking is the exact command you are running, don't say "I run a setup script", tell us exactly which command from what folder you're running.

Installing JDK 10 from AUR merely installs the JDK, it won't set the JAVA_HOME for your user profile, since 1) that wouldn't be the Arch way and 2) you couldn't run multiple JDKs side by side if it you set it that way.

Depending on how your setup script is launched, you will either have to run:

# export JAVA_HOME=/usr/lib/jvm/java-10-jdk

Before you launch the setup script, or, in some cases, you'll have to investigate how the script determines which JDK to use. Also be aware that things changed drastically with JDK 10 compared to previous versions in terms of JDK folder layout, so be 100% sure that the application /setup you're running is compatible with JDK 10.

Offline

Board footer

Powered by FluxBB