Search code examples
linuxubuntuintellij-ideachromebookcrouton-os

Installing IntelliJ on Acer CB5-311 Chromebook with Ubuntu 12.04 (ARM)


I just received a brand new Acer 13 inch (Modell CB5-311) Chromebook as a gift. I really love it up to now.

So, I would love to use it to develop with IntelliJ IDEA. For this reason I installed Ubuntu 12.04 with GNOME desktop (ARM) through crouton. It runs really smooth and I like the experience, but I just can't get IntelliJ to work.

I tried the steps suggested in this question: How to install JDK and Intellij IDEA on ARM/Samsung series 3

Here is a summary of what I did after Ubuntu was up and running:

I installed open jdk 7.

sudo apt-get update && sudo apt-get install openjdk-7-jdk

I downloaded the latest version of IntelliJ IDEA (v. 14.1.4), moved it to my user's home directory and unpacked it there.

mv ~/Downloads/idea-IU*.tar.gz ~
cd ~
tar xvf idea-IU*.tar.gz

I In the idea.sh file I changed IDE_JVM_ARGS from

IDE_JVM_ARGS=""

to

IDE_JVM_ARGS="-jamvm"

Then I downloaded the fsnotifierto.sh script from https://gist.github.com/pcarrier/7560053#file-fsnotifierto-sh and run it.

./fsnotifierto.sh ~/idea-IC-141.1532.4/bin/

The output of this scripts looked really good. So I assume it worked out.

So, when I now run ./idea.sh I get a screen which asks me if I want to import settings from a previous IntelliJ IDEA version. I click "no" and the screen disappears. Nothing happens after that and I don't get any error messages in my console and the idea.sh scripts stops running. When I try to start idea.sh again the dialog doesn't appear again.

When I run the script in debug mode I receive the following output:

(precise)sebbi@localhost:~/idea-IC-141.1532.4/bin$ bash -x idea.sh
++ which uname
+ UNAME=/bin/uname
++ which egrep
+ GREP=/bin/egrep
+ GREP_OPTIONS=
++ which cut
+ CUT=/usr/bin/cut
++ which readlink
+ READLINK=/bin/readlink
++ which xargs
+ XARGS=/usr/bin/xargs
++ which dirname
+ DIRNAME=/usr/bin/dirname
++ which mktemp
+ MKTEMP=/bin/mktemp
++ which rm
+ RM=/bin/rm
++ which cat
+ CAT=/bin/cat
++ which tr
+ TR=/usr/bin/tr
+ '[' -z /bin/uname -o -z /bin/egrep -o -z /usr/bin/cut -o -z /bin/mktemp -o -z /bin/rm -o -z /bin/cat -o -z /usr/bin/tr ']'
++ /bin/uname -s
+ OS_TYPE=Linux
+ SCRIPT_LOCATION=idea.sh
+ '[' -x /bin/readlink ']'
+ '[' -L idea.sh ']'
++ dirname idea.sh
+ IDE_HOME=./..
++ dirname idea.sh
+ IDE_BIN_HOME=.
+ '[' -n '' -a -x /bin/java ']'
+ '[' -x ./../jre/bin/java ']'
+ '[' -n '' -a -x /bin/java ']'
+ '[' -n '' -a -x /bin/java ']'
++ which java
+ JAVA_BIN_PATH=/usr/bin/java
+ '[' -n /usr/bin/java ']'
+ '[' Linux = FreeBSD -o Linux = MidnightBSD ']'
+ '[' Linux = SunOS ']'
+ '[' Linux = Darwin ']'
+ '[' -z '' -a -x /bin/readlink -a -x /usr/bin/xargs -a -x /usr/bin/dirname ']'
++ /bin/readlink -f /usr/bin/java
+ JAVA_LOCATION=/usr/lib/jvm/java-7-openjdk-armhf/jre/bin/java
+ case "$JAVA_LOCATION" in
++ /usr/bin/xargs /usr/bin/dirname
++ /usr/bin/xargs /usr/bin/dirname
++ /usr/bin/xargs /usr/bin/dirname
++ echo /usr/lib/jvm/java-7-openjdk-armhf/jre/bin/java
+ JAVA_LOCATION=/usr/lib/jvm/java-7-openjdk-armhf
+ '[' '!' -d /usr/lib/jvm/java-7-openjdk-armhf/bin ']'
+ '[' -x /usr/lib/jvm/java-7-openjdk-armhf/bin/java ']'
+ JDK=/usr/lib/jvm/java-7-openjdk-armhf
+ '[' -z /usr/lib/jvm/java-7-openjdk-armhf ']'
++ /bin/mktemp -t java.version.log.XXXXXX
+ VERSION_LOG=/tmp/java.version.log.AJKHF9
+ /usr/lib/jvm/java-7-openjdk-armhf/bin/java -version
+ /bin/egrep '64-Bit|x86_64|amd64' /tmp/java.version.log.AJKHF9
+ BITS=1
+ /bin/rm -f /tmp/java.version.log.AJKHF9
+ '[' 1 -eq 0 ']'
+ BITS=
+ '[' -n '' ']'
+ MAIN_CLASS_NAME=
+ '[' -z '' ']'
+ MAIN_CLASS_NAME=com.intellij.idea.Main
+ VM_OPTIONS=
+ VM_OPTIONS_FILES_USED=
+ for vm_opts_file in '"$IDE_BIN_HOME/idea$BITS.vmoptions"' '"$HOME/.IdeaIC14/idea$BITS.vmoptions"' '"$IDEA_VM_OPTIONS"'
+ '[' -r ./idea.vmoptions ']'
++ /bin/cat ./idea.vmoptions
++ /usr/bin/tr '\n' ' '
++ /bin/egrep -v '^#.*'
+ VM_OPTIONS_DATA='-server -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=150m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Dawt.useSystemAAFontSettings=lcd '
+ VM_OPTIONS=' -server -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=150m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Dawt.useSystemAAFontSettings=lcd '
+ '[' -n '' ']'
+ VM_OPTIONS_FILES_USED=./idea.vmoptions
+ for vm_opts_file in '"$IDE_BIN_HOME/idea$BITS.vmoptions"' '"$HOME/.IdeaIC14/idea$BITS.vmoptions"' '"$IDEA_VM_OPTIONS"'
+ '[' -r /home/sebbi/.IdeaIC14/idea.vmoptions ']'
+ for vm_opts_file in '"$IDE_BIN_HOME/idea$BITS.vmoptions"' '"$HOME/.IdeaIC14/idea$BITS.vmoptions"' '"$IDEA_VM_OPTIONS"'
+ '[' -r '' ']'
+ IS_EAP=false
+ '[' false = true ']'
+ IDE_JVM_ARGS=-jamvm
+ CLASSPATH=./../lib/bootstrap.jar
+ CLASSPATH=./../lib/bootstrap.jar:./../lib/extensions.jar
+ CLASSPATH=./../lib/bootstrap.jar:./../lib/extensions.jar:./../lib/util.jar
+ CLASSPATH=./../lib/bootstrap.jar:./../lib/extensions.jar:./../lib/util.jar:./../lib/jdom.jar
+ CLASSPATH=./../lib/bootstrap.jar:./../lib/extensions.jar:./../lib/util.jar:./../lib/jdom.jar:./../lib/log4j.jar
+ CLASSPATH=./../lib/bootstrap.jar:./../lib/extensions.jar:./../lib/util.jar:./../lib/jdom.jar:./../lib/log4j.jar:./../lib/trove4j.jar
+ CLASSPATH=./../lib/bootstrap.jar:./../lib/extensions.jar:./../lib/util.jar:./../lib/jdom.jar:./../lib/log4j.jar:./../lib/trove4j.jar:./../lib/jna.jar
+ CLASSPATH=./../lib/bootstrap.jar:./../lib/extensions.jar:./../lib/util.jar:./../lib/jdom.jar:./../lib/log4j.jar:./../lib/trove4j.jar:./../lib/jna.jar:/usr/lib/jvm/java-7-openjdk-armhf/lib/tools.jar
+ '[' -n '' ']'
+ LD_LIBRARY_PATH=.:
+ /usr/lib/jvm/java-7-openjdk-armhf/bin/java -Xbootclasspath/a:./../lib/boot.jar -classpath ./../lib/bootstrap.jar:./../lib/extensions.jar:./../lib/util.jar:./../lib/jdom.jar:./../lib/log4j.jar:./../lib/trove4j.jar:./../lib/jna.jar:/usr/lib/jvm/java-7-openjdk-armhf/lib/tools.jar -server -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=150m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Dawt.useSystemAAFontSettings=lcd -Djb.vmOptionsFile=./idea.vmoptions -XX:ErrorFile=/home/sebbi/java_error_in_IDEA_%p.log -Djb.restart.code=88 -Didea.paths.selector=IdeaIC14 -jamvm com.intellij.idea.Main
jmm_GetInputArgumentArray
+ EC=1
+ test 1 -ne 88
+ exit 1

Maybe someone knows what is going wrong here?

Thank you!

Thomas


Solution

  • Wooohooo.... I got IntelliJ running. I just downloaded the sources from jetbrain's git repository and compiled it by myself with a ARM jdk.

    Here is how you can do the same:

    Install git:

    apt-get install git
    

    Install ant:

    apt-get install ant
    

    Clone the repository to your local drive (this takes a while):

    git clone git://git.jetbrains.org/idea/community.git idea
    

    Download the latest stable jdk. I used oracle jdk 8 for ARM.

    sudo add-apt-repository ppa:webupd8team/java -y
    sudo apt-get update
    sudo apt-get install oracle-java8-installer
    sudo apt-get install oracle-java8-set-default
    

    Check if it worked out:

    (precise)sebbi@localhost:~/idea$ java -version
    java version "1.8.0_51"
    Java(TM) SE Runtime Environment (build 1.8.0_51-b07)
    Java HotSpot(TM) Server VM (build 25.51-b07, mixed mode)
    

    Cloning the repository to your local disk takes a while. When it is finsihed go to cloned-idea-directory/ and call ant build.

    (precise)sebbi@localhost:~/idea$ ant build  
    

    This process now took about 25 minutes for me. After the compilation is finished, unpack ideaIC-142.SNAPSHOT.tar.gz from cloned-idea-directory/out/artifacts to a directory of your choice.

    (precise)sebbi@localhost:~/idea/out/artifacts$ tar -xfz ideaIC-142.SNAPSHOT.tar.gz -C ~/idea-compiled
    

    Now you need to run the fsnotifierto.sh script (get if from https://gist.github.com/pcarrier/7560053#file-fsnotifierto-sh).

    ./fsnotifierto.sh ~/idea-compiled
    

    Now you can start IDEA!

    cd ~/idea-compiled/bin
    ./idea.sh
    

    I recommend to use the IntelliJ theme. The GTK theme was a little bit slow on my device.

    Now have fun and code!