• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root CM10 Development (moved to upp)

as far as i know all remnants from other java versions are gone. I have run the command sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\* which is the only way I know to do it. If you have other options to be sure I will do it.
 
ok so this command will check your java version

java -version

here are some more configuration commands to run

sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
sudo update-alternatives --config javadoc
sudo update-alternatives --config javah
sudo update-alternatives --config javap
sudo update-alternatives --config jar

and this will make sure the path is set correctly

ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar

granted that is where java installed to which it should be i think
 
Output of above commands:

superr@ubuntu:~$ sudo update-alternatives --config jar
[sudo] password for superr:
There is only one alternative in link group jar (providing /usr/bin/jar): /usr/lib/jvm/java-6-oracle/bin/jar
Nothing to configure.
superr@ubuntu:~$ sudo update-alternatives --config javac
There is only one alternative in link group javac (providing /usr/bin/javac): /usr/lib/jvm/java-6-oracle/bin/javac
Nothing to configure.
superr@ubuntu:~$ sudo update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-6-oracle/jre/bin/java
Nothing to configure.
superr@ubuntu:~$ sudo update-alternatives --config javaws
There is only one alternative in link group javaws (providing /usr/bin/javaws): /usr/lib/jvm/java-6-oracle/jre/bin/javaws
Nothing to configure.
superr@ubuntu:~$ sudo update-alternatives --config javadoc
There is only one alternative in link group javadoc (providing /usr/bin/javadoc): /usr/lib/jvm/java-6-oracle/bin/javadoc
Nothing to configure.
superr@ubuntu:~$ sudo update-alternatives --config javah
There is only one alternative in link group javah (providing /usr/bin/javah): /usr/lib/jvm/java-6-oracle/bin/javah
Nothing to configure.
superr@ubuntu:~$ sudo update-alternatives --config javap
There is only one alternative in link group javap (providing /usr/bin/javap): /usr/lib/jvm/java-6-oracle/bin/javap
Nothing to configure.
superr@ubuntu:~$ sudo update-alternatives --config jar
There is only one alternative in link group jar (providing /usr/bin/jar): /usr/lib/jvm/java-6-oracle/bin/jar
Nothing to configure.
 
hmm, if java is in the usr bin folder it should obviously be in the path variable, that is one of the default paths
 
superr@ubuntu:~$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
lrwxrwxrwx 1 root root 39 Jan 4 14:51 /etc/alternatives/java -> /usr/lib/jvm/java-6-oracle/jre/bin/java
lrwxrwxrwx 1 root root 45 Jan 4 14:51 /etc/alternatives/java.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/java.1.gz
lrwxrwxrwx 1 root root 36 Jan 4 14:51 /etc/alternatives/javac -> /usr/lib/jvm/java-6-oracle/bin/javac
lrwxrwxrwx 1 root root 46 Jan 4 14:51 /etc/alternatives/javac.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javac.1.gz
lrwxrwxrwx 1 root root 38 Jan 4 14:51 /etc/alternatives/javadoc -> /usr/lib/jvm/java-6-oracle/bin/javadoc
lrwxrwxrwx 1 root root 48 Jan 4 14:51 /etc/alternatives/javadoc.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javadoc.1.gz
lrwxrwxrwx 1 root root 36 Jan 4 14:51 /etc/alternatives/javah -> /usr/lib/jvm/java-6-oracle/bin/javah
lrwxrwxrwx 1 root root 46 Jan 4 14:51 /etc/alternatives/javah.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javah.1.gz
lrwxrwxrwx 1 root root 36 Jan 4 14:51 /etc/alternatives/javap -> /usr/lib/jvm/java-6-oracle/bin/javap
lrwxrwxrwx 1 root root 46 Jan 4 14:51 /etc/alternatives/javap.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javap.1.gz
lrwxrwxrwx 1 root root 42 Jan 4 14:51 /etc/alternatives/java_vm -> /usr/lib/jvm/java-6-oracle/jre/bin/java_vm
lrwxrwxrwx 1 root root 41 Jan 4 14:51 /etc/alternatives/javaws -> /usr/lib/jvm/java-6-oracle/jre/bin/javaws
lrwxrwxrwx 1 root root 47 Jan 4 14:51 /etc/alternatives/javaws.1.gz -> /usr/lib/jvm/java-6-oracle/man/man1/javaws.1.gz
lrwxrwxrwx 1 root root 34 Jan 4 14:51 /etc/alternatives/jar -> /usr/lib/jvm/java-6-oracle/bin/jar
 
i guess I will try to build again now that I ran that command. I'll post back. Thanks junkie2100 for your help so far :)
 
edit: that works, but if it doesnt build i might finally know why, where did you get the java you have installed? it looks like you have the runtime but not the development kit


before you try building again this command will remove your output directory completely always a good idea between build attempts

make clobber

and you do have to lunch it as far as i know



edit disregard this for now...
go to this file
/home/USERNAME/.bashrc
and add this at the bottom
export JAVA_HOME=/usr/bin

then run
source ~/.bashrc


wait a minute... jdk only goes up to v37 on their site, where did you get the jdk? are you sure its not just the virtual machine instead of the development kit?
 
I have the jdk, got it from the Webupd8team ppa. It is well known for having the latest software versions.
 
ok, poke around your java directories tho and the usr bin folder see if there is a folder for the jdk hidden in there somewhere, because its looking like your computer is only seeing the runtime and not the development kit
 
if you spot another copy of the jdk files somewhere like the "javac" application, overwrite the ones in the usr/bin directory. maybe even try downloading the one off the oracle site, you never know it might work
or try the alternatives thing after installing the openjdk again see if it actually sees the openjdk and gives you the choice of an alternative
but yea im out of ideas, ive been staring at code for god knows how long, managed to fix the mac and linux scripts i wrote im pretty sure, tried my best to make root installable without using a computer, plus the things ive been trying to do here and i dont even remember what else but im pretty sure i did something else today, plus im tired lol, ive gotten distracted from writing this message 4 times already, not a good sign. so yea, good luck, and if it dont work out maybe ill have some fresh ideas tomorrow
 
ah ok kool, good work, now you just need to make sure that it is whats installed in the usr/bin folder
because having it makes no difference if the computer cant find it, see if you can search the computer for javac
or find another way to get the location of the jdk installation
if you find another copy tucked away somewhere you may have to overwrite the ones in your usr/bin
and try that java_home thing i mentioned earlier as well if that doesnt turn up anything
 
basically there is a chance that you have both the runtime, and the jdk installed, but only the runtime is somewhere the program can find it
at the same time tho that seems kinda odd that they have a newer version of oracles java than oracle does...
you might wanna try removing that and installing the one i linked to
 
huh, the links i saw only went up to 37, im confused, but im used to being confused by now lol. ill check in tomorrow tho, have fun :D
 
javac is in 3 places:

/etc/alternatives/javac
/usr/bin/javac
/usr/lib/jvm/java-6-oracle/bin/javac
 
hmm, id compare them and make sure they are all the same file
size and date modified checks should be enough to tell
 
alright, well i tried... maybe try openjdk again and run the alternatives script then check versions and all that stuff to make sure openjdk is fully there, granted the build doesnt work after the java home thing

im out tho, maybe someone else can help, if not ill be thru in the morning
 
Back
Top Bottom