Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: intellij idea

  1. #1

    Question intellij idea

    I wanted to try intellij idea as an IDE for java programming. I have 64-bit openSUSE 10.3 installed. I installed 64-bit Sun java from the rpm. However,
    echo $JDK_HOME
    yields a blank line. I think that the shell script that is supposed to start IDEA doesn't work because $JDK_HOME is not properly set. Any suggestions? Thank you.

  2. #2
    ab@novell.com NNTP User

    Default Re: intellij idea

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Have you tried setting JDK_HOME to wherever your JDK from Sun ended up?
    ~ export JDK_HOME=/path/to/your/jdk

    To set permanently add the line above to your user's ~/.bashrc or
    ~/.profile file.

    Good luck.





    Cross AM wrote:
    | I wanted to try intellij idea as an IDE for java programming. I have
    | 64-bit openSUSE 10.3 installed. I installed 64-bit Sun java from the
    | rpm. However,
    | echo $JDK_HOME
    | yields a blank line. I think that the shell script that is supposed to
    | start IDEA doesn't work because $JDK_HOME is not properly set. Any
    | suggestions? Thank you.
    |
    |
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIUsOB3s42bA80+9kRAracAJ90fkG/psPdP5fmjQvnCsl6BbX4fQCfXws3
    OaTOyWfNv5vOuv8TRY72ISw=
    =mYad
    -----END PGP SIGNATURE-----

  3. #3

    Default Re: intellij idea

    Well I tried to find out where the JDK was installed using
    which javac
    which yielded
    /usr/bin/javac.
    However, that didnt work either. There was again an error with the script or may be I exported the wrong path.

  4. #4
    Join Date
    Jun 2008
    Location
    Sarasota
    Posts
    301

    Default Re: intellij idea

    In that case, you'd want your export to be:

    export JDK_HOME=/usr/bin

    [Get rid of any leading '~' that was shown
    by the suggester...it was a typo/mistake.]

  5. #5
    Join Date
    Jun 2008
    Location
    Sarasota
    Posts
    301

    Default Re: intellij idea

    Hmm...now that I look at my other box, I
    think maybe you want:

    export JDK_HOME=/usr

    [because they assume there will be a following '/bin'.
    That was true back when it was called JAVA_HOME rather
    than JDK_HOME. If the first still wasn't working,
    try this one.]

  6. #6

    Default Re: intellij idea

    cookdav wrote:

    >
    > Hmm...now that I look at my other box, I
    > think maybe you want:
    >
    > export JDK_HOME=/usr
    >
    > [because they assume there will be a following '/bin'.
    > That was true back when it was called JAVA_HOME rather
    > than JDK_HOME. If the first still wasn't working,
    > try this one.]
    >
    >

    Thank you for the advice. I tried it but now another error has come up. I am
    pasting the details of the exception that occured when I ran the script.
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
    version number in .class file
    at java.lang.ClassLoader.defineClass2(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:719)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

  7. #7
    ab@novell.com NNTP User

    Default Re: intellij idea

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Yes... sorry about that leading '~'... twas a typo.

    Regarding your current error if you run `/usr/bin/java -version` does it
    show the version you are hoping to use? Also in SUSE Linux Enterprise
    /usr/bin/java is just a softlink to a real version somewhere else in the
    filesystem. With that said, where does /usr/bin/java point? Mine
    refrences a 1.4.2 version but I have a 1.6 version elsewhere that I've
    installed and can reference manually.

    Good luck.






    Cross_AM wrote:
    | cookdav wrote:
    |
    |> Hmm...now that I look at my other box, I
    |> think maybe you want:
    |>
    |> export JDK_HOME=/usr
    |>
    |> [because they assume there will be a following '/bin'.
    |> That was true back when it was called JAVA_HOME rather
    |> than JDK_HOME. If the first still wasn't working,
    |> try this one.]
    |>
    |>
    | Thank you for the advice. I tried it but now another error has come
    up. I am
    | pasting the details of the exception that occured when I ran the script.
    | Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
    | version number in .class file
    | at java.lang.ClassLoader.defineClass2(Native Method)
    | at java.lang.ClassLoader.defineClass(ClassLoader.java:719)
    | at
    | java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
    | at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
    | at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    | at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    | at java.security.AccessController.doPrivileged(Native Method)
    | at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    | at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    | at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIU/1x3s42bA80+9kRAvgAAJ43rUK99Jx9SFTu1kOqIXjM4D6/AwCfYGpb
    vmMBJfKwpK21zKHNACDdb88=
    =JiRH
    -----END PGP SIGNATURE-----

  8. #8

    Default Re: intellij idea

    ab@novell.com wrote:

    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > Yes... sorry about that leading '~'... twas a typo.
    >
    > Regarding your current error if you run `/usr/bin/java -version` does it
    > show the version you are hoping to use? Also in SUSE Linux Enterprise
    > /usr/bin/java is just a softlink to a real version somewhere else in the
    > filesystem. With that said, where does /usr/bin/java point? Mine
    > refrences a 1.4.2 version but I have a 1.6 version elsewhere that I've
    > installed and can reference manually.
    >
    > Good luck.


    The JDK I installed in the 1.6 version. However,
    /usr/bin/java -version
    yields 1.5 version. How can I use the 1.6 version java?

  9. #9

    Default Re: intellij idea

    Cross_AM wrote:

    > ab@novell.com wrote:
    >
    >> -----BEGIN PGP SIGNED MESSAGE-----
    >> Hash: SHA1
    >>
    >> Yes... sorry about that leading '~'... twas a typo.
    >>
    >> Regarding your current error if you run `/usr/bin/java -version` does it
    >> show the version you are hoping to use? Also in SUSE Linux Enterprise
    >> /usr/bin/java is just a softlink to a real version somewhere else in the
    >> filesystem. With that said, where does /usr/bin/java point? Mine
    >> refrences a 1.4.2 version but I have a 1.6 version elsewhere that I've
    >> installed and can reference manually.
    >>
    >> Good luck.

    >
    > The JDK I installed in the 1.6 version. However,
    > /usr/bin/java -version
    > yields 1.5 version. How can I use the 1.6 version java?


    YaST did the work for me. Now,
    /usr/bin/java -version
    yields the 1.6 version. Idea did work but it tells me that tools.jar is not
    in IDEA classpath. It tells me to check whether JAVA_HOME points to jre
    rather than the jdk.
    echo $JAVA_HOME
    yields /usr/lib64/jvm/jre.

    What I want to know is that whether changing the JAVA_HOME environmental
    variable will affect other applications. I guess to make IDEA work I will
    have to do the following.
    export JAVA_HOME="/usr"

  10. #10
    ab@novell.com NNTP User

    Default Re: intellij idea

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Find out where your new one is installed and point JDK_HOME to THAT
    location. For example, on my laptop:

    rpm -qa | grep jre | grep 6
    returns
    jre-1.6.0_06-fcs

    rpm -ql jre
    has a whole lot of paths that start with:
    /usr/java/jre1.6.0_06/

    So:
    export JDK_HOME=/usr/java/jre1.6.0_06

    Now mine is just the runtime environment and yours will be a full JDK so
    your installed package will probably reflect that, assuming you
    installed an RPM. If you didn't install an RPM then find out where you
    installed whatever you did install. Keep in mind that the path is to
    the directory holding the entire environment and not the 'bin' directory
    or the 'java' command itself.

    Good luck.





    Cross_AM wrote:
    | ab@novell.com wrote:
    |
    |> -----BEGIN PGP SIGNED MESSAGE-----
    |> Hash: SHA1
    |>
    |> Yes... sorry about that leading '~'... twas a typo.
    |>
    |> Regarding your current error if you run `/usr/bin/java -version` does it
    |> show the version you are hoping to use? Also in SUSE Linux Enterprise
    |> /usr/bin/java is just a softlink to a real version somewhere else in the
    |> filesystem. With that said, where does /usr/bin/java point? Mine
    |> refrences a 1.4.2 version but I have a 1.6 version elsewhere that I've
    |> installed and can reference manually.
    |>
    |> Good luck.
    |
    | The JDK I installed in the 1.6 version. However,
    | /usr/bin/java -version
    | yields 1.5 version. How can I use the 1.6 version java?
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIVAG+3s42bA80+9kRAq0UAJwNr0vbf5aTtidUt1NcpKYglRxinACeO3XA
    3C7+lydXWz76T1YaOiCvjzA=
    =JIe4
    -----END PGP SIGNATURE-----

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •