[SOLVED] Why does my JAVA_HOME point to jre instead of jdk?

I am having a strange phanomenon.
I have jdk7-openjdk installed, but I still have
% echo $JAVA_HOME
/usr/lib/jvm/java-7-openjdk/jre
This is only with my current user. When I try root or a freshly created user, I correctly get
% echo $JAVA_HOME
/usr/lib/jvm/java-7-openjdk
So I guess this is caused by something in my home directory. As 'grep -r JAVA_HOME ~/.*' does not give any hints, I do not know how to investigate this further.
Maybe someone here has any idea how to find out more.
Last edited by cbuehler (2013-12-22 10:20:30)

As far as I understand, the order is not important in this case, because jre.sh only overrides JAVA_HOME if it is not set before.
I also like to avoid making configuration changes when it looks like the default config should work fine.
But brebs' reply inspired me to run 'sh -x /etc/profile', which finally shed light into my issue:
+++ . /home/cbuehler/Siemens/Teamcenter10.1/Visualization/bin/visviewwebinit /home/cbuehler/Siemens/Teamcenter10.1/Visualization
++++ '[' X_ = X_True ']'
++++ '[' -n /home/cbuehler/Siemens/Teamcenter10.1/Visualization ']'
++++ export EAI_INSTALL=/home/cbuehler/Siemens/Teamcenter10.1/Visualization
++++ EAI_INSTALL=/home/cbuehler/Siemens/Teamcenter10.1/Visualization
++++ '[' -d /usr/lib/jvm/java-7-openjdk/jre -o -h /usr/lib/jvm/java-7-openjdk/jre ']'
++++ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre
++++ JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre
I have Teamcenter Visualization installed in my home directory. And this changes my JAVA_HOME in /home/cbuehler/Siemens/Teamcenter10.1/Visualization/bin/visviewwebinit:
# If JAVA_HOME points to the top level java directory, reset it to point to the JRE directory.
if [ -d $JAVA_HOME/jre -o -h $JAVA_HOME/jre ]; then
    export JAVA_HOME=$JAVA_HOME/jre
fi
I commented this part out and now everything works fine.
Thank you very much for your help.

Similar Messages

  • Why does my mouse pointer change from a hand to a downward facing arrow sometimes?

    why does my mouse pointer change from a hand to a downward facing arrow sometimes?

    the-edmeister, you are a genious. I went to "view" then "toolbars" and de-selected "yahoo toolbar" and then moved the curser over my firefox page and it now works completely including the problem area (the top 3 cm of each screen). Thank you, thank you, thank you, thank you, thank you, thank you. You have no idea how good I feel know on this otherwise cold, windy and rainy day.

  • Why does audio books list by chapter instead of books?

    Why does audio books list by chapter instead of by book ?

    Perhaps I should have given more detail. The device works the way it works. Listing every chapter is part of the normal behaviour, and often not in a useful order which is the main thrust of that article. However it does point out that you can use one of the various free/cheap tools available to stitch the individual files into a single audiobook file which is what iDevices really expect to receive.
    Alternatively you could use a smart playlist which matches a particular title and only includes files with a play count of zero to make it easier to locate the current chapter. I don't recall ever trying this so I'll have a go and see how it works out.
    tt2

  • I have an iphone 4s why does it have a black screen instead of my background picture when I get a text message?

    I have an iphone 4S why does it have a black screen instead of my background picture when I get a text message?

    When you see the old number come up in the suggested choices look for a blue arrow to the right of the Contact. Tap the blue arrow and then tap Remove from Recents.

  • Why does the Java API use int instead of short or byte?

    Why does the Java API use int if short or even byte would be sufficient?
    Example: The DAY_OF_WEEK field in Calendar uses int.

    One of the point is, on the benchmark tests on Java performance, int does far better than short and byte data types.
    Please follow the below blog talks about the same.
    Java Primative Speed
    -K

  • When I push play, why does it play back all tracks instead of whats in the arrangement view?

    Why does it play the track even when there aren't any files in the arrangement view?

    It sounds as though "something" has become corrupted. This can be the result of an add-on, or it might be that reinstalling Firefox will help. Here are some diagnostic suggestions:
    First, make a backup of your computer for safekeeping. To back up Firefox, see [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information].
    Next, try starting Firefox in Firefox
    [http://support.mozilla.com/kb/Safe+Mode Safe Mode]. Be careful not to "reset" anything permanently if you didn't back up.
    Does that fix it? If not, try creating a new (blank) profile: [http://support.mozilla.com/kb/Managing+profiles Managing profiles].
    If the new profile works, then you either can work to track down the problem with your old profile, or move key settings like bookmarks from your damaged profile to the new profile, see: [https://support.mozilla.com/en-US/kb/Recovering+important+data+from+an+old+profile Recovering important data from an old profile].
    Hope this helps.

  • Why does "Date Created" sometimes show dashes instead of a date?

    My finder shows four dashes ("----") for the "date created" on a large percentage of my files. When I look at the properties of those files, there are "Created" dates on them. Some of the files are .PDF, some are .doc (I haven't checked for .xls or .txt files). Why does this happen, and what can I do to fix it so the "date created" is in the finder window?
    Thanks!

    Perhaps that information isn't in the file. It may have been lost through various copy events on machines that did not recognize the information or where the information was lost during transfers to and from Windows or Linus servers.

  • Why does my 4S send text messages instead of imessages, even though it has sent that person imessages in the past?

    Why does my 4S suddenly switch to text messages when it has been sending to the same person as imessages?  I am connected to wifi and have no cell service where I am, so the text errors out.  Can I force it to send as an imessage?

    It's on.  We were sending imessages earlier today, then for some reason, my phone switched to text???

  • Why does Flash add points when I "Undo"?

    I converted a bitmap to vector.  I am removing all the useless extra points which get created in that process.  Occasionally I will mis-click and end up moving or deleting a shape.  When that happens I want to use "undo".  But ctrl-z and undo from the menu do not simply undo the last action.   It also goes and adds useless extra points all over the place.  Why?  Is there a way to make it quit doing that?  It looks to me like it is a very bad bug.

    Has anyone else even seen this?
    1) Import a graphic.
    2) Do Modify > Bitmap > Trace Bitmap
    3) Remove some of the extra points
    4) Press ctrl-z OR do Edit > Undo Undefined
    5) RESULT: the last action is undone, but several more extra points are added at various places in the graphic
    Please let me know if it happens or not.

  • Why does my mouse pointer have a "no" symbol attached?

    My mouse pointer has the   symbol attached. I can move the pointer, but it does not do anything. It's like it is frozen.

    Take these steps if the cursor changes from an arrow to a white "prohibited" symbol when you try to move an icon on the Desktop.
    Sometimes the problem may be solved just by logging out or rebooting. Try that first, if you haven't already done it. Otherwise, continue.
    Select the icon of your home folder (a house) in the sidebar of a Finder window and open it. The Desktop folder is one of the subfolders. Select it and open the Info window. In the General section of the window, the Kind will be either Folder  or something else, such as Anything.
    If the Kind is Folder, uncheck the box marked Locked. Close the Info window and test.
    If the Kind is not Folder, make sure the Locked box is not checked and that you have Read & Write privileges in the  Sharing & Permissions section. Then close the Info window and do as follows.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    xattr -d com.apple.FinderInfo Desktop
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You should get a new line ending in a dollar sign ($). Quit Terminal.
    Relaunch the Finder.
    If the problem is now resolved, and if you use iPhoto, continue.
    Quit iPhoto if it's running. Launch it while holding down the option key. It will prompt you to select a library. Choose the one you want to use (not the Desktop folder.)

  • [SOLVED] why does cuda-gdb require root permissions?

    I am doing GPGPU development on Arch Linux with the cuda-sdk and
    cuda-toolkit packages.  My attempts to run cuda-gdb as a normal
    user on a simple program results in:
    $ cuda-gdb ./driver
    NVIDIA (R) CUDA Debugger
    4.2 release
    Portions Copyright (C) 2007-2012 NVIDIA Corporation
    GNU gdb (GDB) 7.2
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-unknown-linux-gnu".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /home/nwh/Dropbox/projects/G4CU/driver...done.
    (cuda-gdb) run
    Starting program: /home/nwh/Dropbox/projects/G4CU/driver
    warning: Could not load shared library symbols for linux-vdso.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    fatal: The CUDA driver initialization failed. (error code = 1)
    If I run cuda-gdb as root, it behaves normally:
    # cuda-gdb ./driver
    NVIDIA (R) CUDA Debugger
    4.2 release
    Portions Copyright (C) 2007-2012 NVIDIA Corporation
    GNU gdb (GDB) 7.2
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-unknown-linux-gnu".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /home/nwh/Dropbox/work/2012-09-06-cuda_gdb/driver...done.
    (cuda-gdb) run
    Starting program: /home/nwh/Dropbox/work/2012-09-06-cuda_gdb/driver
    warning: Could not load shared library symbols for linux-vdso.so.1.
    Do you need "set solib-search-path" or "set sysroot"?
    [Thread debugging using libthread_db enabled]
    [New Thread 0x7ffff5ba8700 (LWP 11386)]
    [Context Create of context 0x6e8a30 on Device 0]
    [Launch of CUDA Kernel 0 (thrust::detail::backend::cuda::detail::launch_closure_by_value<thrust::detail::backend::cuda::for_each_n_closure<thrust::device_ptr<unsigned long long>, unsigned int, thrust::detail::device_generate_functor<thrust::detail::fill_functor<unsigned long long> > > ><<<(1,1,1),(704,1,1)>>>) on Device 0]
    [Launch of CUDA Kernel 1 (set_vector<<<(1,1,1),(10,1,1)>>>) on Device 0]
    vd[0] = 0
    vd[1] = 1
    vd[2] = 2
    vd[3] = 3
    vd[4] = 4
    vd[5] = 5
    vd[6] = 6
    vd[7] = 7
    vd[8] = 8
    vd[9] = 9
    [Thread 0x7ffff5ba8700 (LWP 11386) exited]
    Program exited normally.
    [Termination of CUDA Kernel 1 (set_vector<<<(1,1,1),(10,1,1)>>>) on Device 0]
    [Termination of CUDA Kernel 0 (thrust::detail::backend::cuda::detail::launch_closure_by_value<thrust::detail::backend::cuda::for_each_n_closure<thrust::device_ptr<unsigned long long>, unsigned int, thrust::detail::device_generate_functor<thrust::detail::fill_functor<unsigned long long> > > ><<<(1,1,1),(704,1,1)>>>) on Device 0]
    The test program driver.cu is:
    // needed for nvcc with gcc 4.7 and iostream
    #undef _GLIBCXX_ATOMIC_BUILTINS
    #undef _GLIBCXX_USE_INT128
    #include <iostream>
    #include <thrust/device_vector.h>
    #include <thrust/host_vector.h>
    __global__
    void set_vector(int *a)
    // get thread id
    int id = threadIdx.x + blockIdx.x * blockDim.x;
    a[id] = id;
    __syncthreads();
    int main(void)
    // settings
    int len = 10; int trd = 10;
    // allocate vectors
    thrust::device_vector<int> vd(len);
    // get the raw pointer
    int *a = thrust::raw_pointer_cast(vd.data());
    // call the kernel
    set_vector<<<1,trd>>>(a);
    // print vector
    for (int i=0; i<len; i++)
    std::cout << "vd[" << i << "] = " << vd[i] << std::endl;
    return 0;
    driver.c is compiled with the command:
    $ nvcc -g -G -gencode arch=compute_20,code=sm_20 driver.cu -o driver
    How can I get cuda-gdb to run with out root permissions?
    Last edited by nwhsvc (2012-10-21 19:07:08)

    Question: What is one mayor difference between root and pretty much any other user account ?
    Hint: Access rights....

  • [SOLVED]Why does .bash_profile seem tobe read in non-login shells too?

    ~/.bash_profile:
    . $HOME/.bashrc
    ~/.bashrc:
    export PATH=$PATH:$HOME/code/shell
    (irrelevant lines left out)
    (I have no ~/.profile, ~/.bash_login or * ~/.bash_logout. I have also never edited /etc/profile or /etc/bash.bashrc.)
    I've read that in a login shell (e.g. TTY1) only the former is read, which in my case sources the latter. Running "export -p" in TTY1 gives a result consistent with this:
    declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/home/lazar/code/shell" (/home/lazar/code/shell is only listed once)
    I've also read that in a non-login shell (e.g. xterm) only the latter is read. However, when I run "export -p" in xterm or urxvt I get an unexpected result:
    declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/home/lazar/code/shell:/home/lazar/code/shell" (/home/lazar/code/shell is listed twice!)
    This implies that ~.bashrc is read twice, perhaps because .bash_profile is read in non-login shells too, even though it shouldn't be, should it? It doesn't seem to matter really, but I can't help but wonder why...
    [EDIT]
    I've found the answer. Exports from .bash_profile are done at boot time and *remain* active while X is active. Opening a non-login shell will cause .bashrc to export as well. Hence the duplication. My solution:
    ~/.bash_profile:
    export PATH=$PATH:$HOME/code/shell
    . $HOME/.bashrc
    ~/.bashrc:
    (lines other than export commands)
    Last edited by Lazar (2011-02-14 07:57:56)

    As I wondered, I think it's a problem with passwd. I don't have a dbus entry and must have missed it when I was copying things around between my version and the .pacnew. Downloading an install disc now since I can't seem to change it from the recovery console due to mounting root read-only.
    I'd love to know of a way to boot that avoids starting dbus and other things that might break while still having read/write access to root. Will mark solved once I update /etc/passwd and reboot.

  • [SOLVED] Why does jre7-openjdk-headless require a version bump?

    I'm attempting to update my system, and I get the following error.
    sudo pacman -Syu
    :: Starting full system upgrade...
    resolving dependencies...
    looking for inter-conflicts...
    :: jre7-openjdk-headless and jre7-openjdk-headless-infinality are in conflict. Remove jre7-openjdk-headless-infinality? [y/N]
    error: unresolvable package conflicts detected
    error: failed to prepare transaction (conflicting dependencies)
    :: jre7-openjdk-headless and jre7-openjdk-headless-infinality are in conflict
    I presume pacman wants to remove jre7-openjdk-headless-infinality because it's 7.u65_2.5.1-3, while jre7-openjdk-headless is 7.u65_2.5.1-8. I presume jre7-openjdk-headless-infinality will be updated soon, and I won't get this error.
    However, I was interested in what exactly was requesting this version bump in the first place. I presume that it's a package that jre7-openjdk-headless-infinality is a dependency for. I looked firstly at what needed to be updated on my system, noting jre7-openjdk.
    $ pacman -Qu
    calibre 1.206.0-1
    device-mapper 2.02.108-1
    ffmpeg 1:2.3.1-1
    jdk7-openjdk 7.u65_2.5.1-3
    jre7-openjdk 7.u65_2.5.1-3
    lib32-krb5 1.12.1-2
    lvm2 2.02.108-1
    mesa-demos 8.2.0-1
    xf86-input-synaptics 1.8.0-2
    I had a look at the reverse dependencies for jre7-openjdk-headless-infinality, noting jre7-openjdk again.
    $ pacman -Qii jre7-openjdk-headless-infinality
    Provides : java-runtime-headless=7 jre7-openjdk-headless
    Depends On : libjpeg-turbo lcms2 nss ca-certificates-java
    Required By : jre7-openjdk
    Conflicts With : openjdk6 jre7-openjdk-headless jre7-openjdk-headless-fontfix
    I interpret that as pacman -Syu saying that jre7-openjdk needs an update, and this also depends on jre7-openjdk-headless-infinality. I double checked this.
    $ pacman -Qi jre7-openjdk
    Provides : java-runtime=7
    Depends On : jre7-openjdk-headless xdg-utils hicolor-icon-theme
    So I can see that jre7-openjdk actually depends on jre7-openjdk-headless, which can be provided by jre7-openjdk-headless-infinality (as above). However, I don't understand why a new version of jre7-openjdk requires a bump in version of jre7-openjdk-headless (or jre7-openjdk-headless-infinality). Have I misunderstood something?
    Last edited by Salkay (2014-08-24 12:34:29)

    EDIT: actually, when testing the different "useSystemAAFontSettings" parameters I somehow missed "on" - that one does indeed work well enough with the arch java packages. I still prefer the "--enable-infinality=yes" version, but you can scrap my whining below - PEBCAK.
    Wikimig wrote:What I mean is: I think you don't even need Infinality patch (just like most of people using this package). I am pretty sure you can get to a nice clean look with official Arch Linux packages.
    I completely understand that the official package has to remove the infinality flag if it breaks (default) non-infinality setups - but:
    You should definitely give fontconfig-infinality a try (very easy to install thanks to bohoomil's bundle). In my experience it massively improves font rendering. However, the current java7-openjdk really does not work with it, there is no way to get a nice clean look. I tried all the AA settings, and they were all terrible.
    Best settings with vanilla java7
    Same settings with --enable-infinality
    It looks even worse in reality, but just zoom in all the way to the left upper corner and compare... these are some pretty sparkling rainbow fonts
    Again, unfortunate, but I rather rebuild from ABS with "--enable-infinality=yes" than drop infinality completely.
    Last edited by hokasch (2014-09-01 13:25:32)

  • Why does the arrow pointer become a hand?

    i just noticed that the arrow pointer becomes a hand when hovering over clickable links and i don't believe that it has always done so....is this supposed to happen? 

    That's obviously NOT what I meant.    I meant, as a percentage of total "personal computing," over time, more of it will be happening on touchscreen DEVICES (such as iPad and iPhone).  And more people will ONLY have a touchscreen mobile computing device, and not even own a desktop or laptop computer.  And THAT is why having a "pointer" on the screen that changes shape "may become less common in the future."
    Unlike Microsoft and the Windows 8 kludge, Apple is clearly intent on keeping Macs and touchscreen iOS devices distinct and separate.  Macs (from 27-inch iMac to 11-inch MacBook Air) will continue to have an interface optimized for keyboard and mouse/trackpad.  And iOS mobile devices will continue to evolve its touchscreen-based interface.  That's a very good thing...

  • Why does my Power Point refuse to close?

    silly. all my other applications close just fine when i click on the red dot. not Power Point. i have to force close. just annoying thats all. is this a sign something else is wrong? not so tech savvy.

    Templeton Peck wrote:
    Apple Communities only provide support for Apple products:
    Déjà vu:
    <https://discussions.apple.com/message/17421900#17421900>
    "With all due respect, I disagree most vigorously.
    I can find nothing like this either in the Apple Support Communities Terms of Use, or in the Community etiquette. I quote from the latter:
    'Apple Support Communities exists to enable community members to help each other get the most out of their Apple products and services.'
    In my book, helping a community member to use Microsoft Word (or any other legal third party software) effectively on his Mac certainly qualifies as helping him to get the most out of his Apple product."

Maybe you are looking for

  • XmlUnmarshalException: XML Deserialization Error

    Hi, I have generated a Deployable WebService Proxy of a external WebService from the Provider ESRI (http://arcweb.esri.com/arcwebonline/index.htm) with SAP Dev Studio SP9 and deployed to the WAS 6.40 SP9. Within a Servlet i called first the WebServic

  • St22 dump : Syntax error in program "SAPLCRM_KNOWLEDGE ".

    Hello experts, When i click on Define Template for folder in SPRO ( spro -> customer relation relationship management> basic function --> content management ---> define template for folder) it goes to dump. Runtime Errors         SYNTAX_ERROR Short t

  • Need to crop with rounded edges

    I am a novice and purchased Elements 2.0 a couple of years ago so that I can adjust pictures to post on our web site. Very simply, I want to take a rectangle picture and round the edges off. I have spent hours pouring through the help files and playi

  • DAB Radio App and Belle FP2 (on 808)

    I loved listening to DAB Radio via the Nokia headset on my C7. Imagine my surprise when I bought a new 808 Pureview and the DAB Radio App was missing. I installed the app from (ahem!) another place, and it runs OK, but then crashes whenever I access

  • Lost library and only a portion was salvaged - how I get the rest?

    I was running Google Earth and iTunes at the same time today and our computer crashed. As a result, we lost our library (we do have it backed onto our iPhone except the album I purchased just before it crashed). I followed the instructions under appl