Need a little help understanding java and /etc/profile.d/***

A few days ago I installed jre-6u10-1 and jdk-6u10-1 via pacman on my desktop machine; for the web plugin.
The packages installed in /opt/java/...
I later installed jedit, via pacman.  It runs fine as it (/usr/bin/jedit) is hardcoded to look for java in /opt/java/...
Today, I installed jedit (pacman -S jedit) on my laptop which did not have any java installed.
Pacman automatically installed openjdk6-jre-6u10-1 as a prerequisite.
Openjdk installs to /usr/lib/jvm/..., therefore jedit fails as /opt/java... is non-existent.
I suppose Sun's java and the opensource version are installed in different locations to keep from overwriting each other.
I could easily edit /usr/bin/jedit to point to the openjdk location and it would work.
But I'm a little uncertain of the following three files:
Sun's java installs /etc/profile.d/jre.sh and /etc/profile.d/jdk.sh
which do the following (respectively):
export PATH=$PATH:/opt/java/jre/bin
if [ ! -f /etc/profile.d/jdk.sh ]; then
export JAVA_HOME=/opt/java/jre
fi
and
export J2SDKDIR=/opt/java
export PATH=$PATH:/opt/java/bin
export JAVA_HOME=/opt/java
The opensource java package installs /etc/profile/openjdk6.sh
which does the following:
export J2SDKDIR=/usr/lib/jvm/java-1.6.0-openjdk
export J2REDIR=$J2SDKDIR/jre
export JAVAHOME=/usr/lib/jvm/java-1.6.0-openjdk
#export CLASSPATH="${CLASSPATH:+$CLASSPATH:}$J2SDKDIR/lib:$J2REDIR/lib"
So I am left with a few options:
1.  edit /usr/bin/jedit to look in the opensource location
2.  edit /usr/bin/jedit to use the $J2SDKDIR variable when looking for java
3.  update the $PATH via /etc/profile.d/openjdk6.sh to include java's location
I think all three methods would work, but I have limited experience with java and would like some input as to which proposed solution is the best going forward.
What methods are other java apps using to find java?
Thanks
(edit: more descriptive title)
Last edited by cjpembo (2008-11-11 04:24:47)

I think the best option would be to ask the maintainer to modify the jedit-bin file, and have it launch
$J2SDKDIR/bin/jre/java cp $CP -Djedit.home="/usr/share/jedit" -mx${JAVA_HEAP_SIZE}m org.gjt.sp.jedit.jEdit $@
That way, it should work with both java implementations (completely untested, btw.)

Similar Messages

  • Need a little help in java

    I'm new to java used to program with C++. I need to know whether there is ques in java and if there is how to use them. and if not what is an alternative? please help

    I'm new to java used to program with C++. I need to
    know whether there is ques in java and if there is
    how to use them. and if not what is an alternative?
    please helpAre you asking about queues?
    Java� Collections Framework
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Queue.html

  • Hi there... I need a little help with buttons and their actions using flex builder 4.5

    I run a repo company and have zero experience in the developing applications and I could use some help from anybody that is willing to give it.... Here is a basic idea of what I need...  let's say there are 3 states... state 1 has a question that says "car you read this?" and a "yes" and a "no" button... when you select either answer, you go to slide 2.  Slide 2 with have a question like "Is the sky brown?" and a "yes" and a "no" button and when either button is selected, you are taken to Slide 3.  Slide 3 needs to be some sort of a text form that is created by the user selecting the buttons and the screen would say something like "yes, i can read this.  no, the sky is not brown", or "no, I can't read this.   yes, the sky is brown" .  I know how to get the buttons to take the user to the correct new slide, but I do not know how to get the buttons to insert specific text somewhere else when any button is selected.... Can anybody help me?  Youtube is only getting me so far, and my kids are driving me nuts while I'm trying to figure this monster out...  I've gotten several slides created and some screens have several buttons, I just need to see what I need to put in the code to get it to do this type of function 

    Also where can I read up on setting my .Xdefaults and xmonad.hs file? I ripped someones from this forum, and it works nice, but I want to make my onw, but cant find any decent documentation. Thanks.
    At the moment, the best source for configs are those posted in the screenshots thread (for both Xdefaults and xmonad.hs), the xmonad config archive (and the available docs from the root page on that site), and our own thread.  Unfortunately you'll have to sort of scrounge for good docs on the xmonad.hs at the moment, since most of the information was written for the 0.4 version of xmonad.  The configuration has since been made MUCH simpler.
    Hope that helps some.

  • I need a little help with xmonad and stuff

    Hi all. I recently changed from fluxbox to xmonad, and I find it fantastic. I have some minor? problems.
    In fluxbox I was using xterm as a terminal emulator, but I couldnt use irssi with it, the Alt + w/e keys weren't working. They worked however in aterm and urxvt but those two support only 16 colors, and I wish to use 256 colors, mainly because of my vim color scheme. Is there a solution to be able to run both irssi and vim from the same terminal, or should I run different terminals for them?
    Also where can I read up on setting my .Xdefaults and xmonad.hs file? I ripped someones from this forum, and it works nice, but I want to make my onw, but cant find any decent documentation. Thanks.
    edit:
    I found the solution to using the Alt key in xterm. I had to add theese two lines in my .Xdefaults
    XTerm*eightBitInput: false
    XTerm*metaSendsEscape: true
    Last edited by tch (2007-12-28 11:00:33)

    Also where can I read up on setting my .Xdefaults and xmonad.hs file? I ripped someones from this forum, and it works nice, but I want to make my onw, but cant find any decent documentation. Thanks.
    At the moment, the best source for configs are those posted in the screenshots thread (for both Xdefaults and xmonad.hs), the xmonad config archive (and the available docs from the root page on that site), and our own thread.  Unfortunately you'll have to sort of scrounge for good docs on the xmonad.hs at the moment, since most of the information was written for the 0.4 version of xmonad.  The configuration has since been made MUCH simpler.
    Hope that helps some.

  • [solved] Need a little help with sed and regular expressions

    Hello!
    I am shure this is something easy for most of you
    I want to make a script, which converts filenames of my ripped MP3s (replaces '_' with spaces, removes leading track numbers...)
    But I have some problems:
    j=$(echo $j | sed 's/_\+/ /g')
    j=$(echo $j | sed 's/^[0-9]{0,3}//g')
    j=$(echo $j | sed 's/[^ ]-[^ ]/ - /g')
    j=$(echo $j | sed 's/_\+/ /g') << this is working fine (converts all "_" to spaces)
    j=$(echo $j | sed 's/^[0-9]{0,3}//g') << is NOT working, why??
    For Example in "01-somebody_feat_someone-somemusic.mp3" the leading "01" number is NOT being removed..
    j=$(echo $j | sed 's/[^ ]-[^ ]/ - /g') << how can I insert spaces before and after the "-"?
    So that "someone-somemusic" becomes "someone - somemusic" (but only where "-" is surrounded by letters)
    Last edited by cyberius (2011-07-27 18:50:54)

    For sed, you must escape { and } to use them as you want (just slap a \ before them).
    For the last expression, capture the letter before/after the dash -- use \( and \) -- and then substitute it for something like "\1 -" and then "- \1". You'll want to split this into two pieces, one for the front and one for the back so you can get "somemusic -someband" the way you want without a bunch of cases.
    Edit: Or, you could just do a replace for "-" to be " - " and then have another expression to reduce spaces. I see you've used \+ before, so I'm guessing you can figure that out
    Also, sed has the -e switch so you can do multiple different expressions with one invocation.
    Also (also), have you looked into something like Picard with automatic track renaming? You can even customize how they are renamed.
    Edit (2): Also^3, check out prename. There are different versions, ones which use PCRE and ones that use other standards, but it is for renaming files based on regular expressions, which is what you're doing. In any case, you might want to put you script into the User made scripts thread when you feel more comfortable and get some more critiquing, if you're interested.
    Last edited by jac (2011-07-26 23:13:27)

  • I need a little help

    hi i need a little help making a java applet rpg with log-in, chat, etc. and i dont really know to much about it and dont understand applet programming too much. If anyone could help, it would be appreciated. Also, since i am fairly decent at making/improving websites, if you help me i could make a website for you or improve one you already have. You can email me if you want to help at "[email protected]"

    Don't just give up. Like I said, start small.
    I've never heard of any pre-made RPG java classes.
    Why don't you poke around on SourceForge or some java-centric project site or one of the java gaming sites. Maybe someone has written all these libraries already, although you may have trouble using these classes if you're not familiar with programming in general and java in particular. Or do a Google search.
    But using a specialized API is a lot easier if you know how to use the general API (i.e., j2se).
    Another option of course is not to use java at all. Many commercial games come with an editor; you may find it easier to get one of those and do a mod.

  • Need a little help with dial setup on CME

    I've got a CME I'm using for testing and I think I need a little help figuring out the proper config to get the system to accept numbers I dial and have those numbers be passed on to an Avaya system (including the leading 9 for ARS in Avaya) via H.323 IP trunks.   I have it working well for internal 5 digit extension calls across the H.323 trunks and I also have it working well for some types of outside calls that gets passed on to the Avaya and then the Avaya dials the call out to the PSTN.   My only real problem is, I can't figure out how to correctly configure CME to examine the digits I'm dialing and only send the digits once I'm finished dialing....not as soon as it sees an initial match.
    What's happening is this.  I can dial local numbers in my area as 7 digits or 10 digits.  The phone company doesn't yet force us to dial area code and number for local calls (10 digits).  I can still dial 7 digits.   But...if I put an entry in CME that looks like this....
    (by the way, the 192.168.1.1 IP is not the real IP address, that's just an example, but the rest of this entry is what I really have entered in CME)
    dial-peer voice 9 voip
    description Outside 7 Dig Local Calls Via Avaya
    destination-pattern 9.......
    session target ipv4:192.168.1.1
    dtmf-relay h245-alphanumeric
    no vad
    ...Then it will always try to dial out immediately after seeing the first 8 digits I dial (9 plus the 7 digit number I called)...even though I have a speicifc entry in the system that accounts for calls to 9 plus area code 513.  I would have assumed that if I put the specific entry in for 9513....... it would see that and wait to see if I was actually dialing something to match 9513....... instead of 9.......   Understand what I mean?   Because 9513....... is more specific than 9....... but it still tries to send the call out immediately after seeing the first 8 digits I dialed.
    dial-peer voice 9513 voip
    description Outside 10 Dig Local Calls Via Avaya
    destination-pattern 9513.......
    session target ipv4:192.168.1.1
    dtmf-relay h245-alphanumeric
    no vad
    ...BUT...here's the interesting thing.  If I trace the 10 digit call in Avaya, I see that the number being presented to the Avaya PBX is only the first 7 digits of the number....not the full 10 digits...BUT I see a few more of the digits I dialed (like the 8th and 9th digits) after the call is already setup and sent to the PSTN.  It's like the CME is trying to send the rest of the 10 digits I dialed, but at that point it's already too late.   It setup the call as a 7 digit call (9 plus 7 digits), not 10 digit like I wanted.
    I'm more familiar with how to setup dialing in the Avaya via ARS.  My background is Avaya, not Cisco, so this dial-peer config is a little difficult for me until I understand the reasoning of how it examines the numbers and what I should do to make it wait for me to finish dialing....or to tell the system that what I'm dialing will be a minimum or a certain amount of digits and maximum of a certain amount of digits, like the Avaya does.  I just need some pointers and examples to look at :-)   I think I've almost got it....but I'm just missing something at the moment.
    Just so you understand, the call flow should be like this:  Cisco phone registered to CME > CME to Avaya via H.323 trunks > Avaya to PSTN via ISDN PRI trunks connected to Avaya.  I have to be sure I send the 9 to the Avaya also, because 9 triggers ARS in the Avaya. 
    Thanks for your help

    Here is a good document that explains how dial-peers are matched in the Cisco world:
    http://www.cisco.com/en/US/tech/tk652/tk90/technologies_tech_note09186a008010fed1.shtml#topic7
    In your case, it is variable length dial plan you are trying to implenent. To fix it, you need to add a T to force the system to wait for more digits to be entered if there is any.
    dial-peer voice 9 voip
    description Outside 7 Dig Local Calls Via Avaya
    destination-pattern 9.......T
    session target ipv4:192.168.1.1
    dtmf-relay h245-alphanumeric
    no vad
    dial-peer voice 9513 voip
    description Outside 10 Dig Local Calls Via Avaya
    destination-pattern 9513.......
    session target ipv4:192.168.1.1
    dtmf-relay h245-alphanumeric
    no vad
    You can also configure the inter-digits timeout using the command timeouts interdigit under telephony-service.
    Please rate helpful answers!

  • Need a little help new to mac

    Need a little help I'm new to Mac.. i have had my ibook for over a year now and i like it a lot, but some times my usb post dies on my for a couple days maybe weeks. Ill have my ipod connected and when i go to plug in a flash drive. It doesn't detect my ipod anymore and my usb port don't work. it says that they were "removed improperly" and now they are not working again..i have tried to reinstall the whole os again and that doesn't work i don't have the hardware test disk so i don't know what could be the problem i know its not the logic board is there any test i can do to it to find out the problem its an ibook late 2001... there is no reset button on it. i tried to hold in the space bar and now when i boot up i get prompt to this screen that shows the world and then a folder with a ? mark but then after a few sec it boots right up im a mess need some help

    +it says that they were "removed improperly"+
    You have to go to the iPod's icon on your computer (or the flash drive's icon), select it and eject it there before removing it. Otherwise, data can be corrupted and/or lost. Repeatedly removing it without ejecting it from the desktop can cause it not to be recognized any longer.
    If your iBook is a "late 2001" model. It should have a reset button. Check out the chart here to make sure which model iBook you have:
    http://support.apple.com/kb/HT1772?viewlocale=en_US
    +i get prompt to this screen that shows the world and then a folder with a ? mark but then after a few sec it boots right up+
    It's trying to find a network volume from which to boot.
    Once it's booted up, go to System Preferences > Startup Disk, and select your Mac OS X startup volume. Then close System Preferences. The next time you start up, it should start up without looking for a network volume.

  • Greetings,   I need a little help. I have a WRT54G Wirele...

    Greetings,
    I need a little help. I have a WRT54G Wireless Router, and it worked well for years with my Alcatel DSL Modem (Bellsouth/ATT).  The modem went out and it was replaced with Westell Modem.  When I bypass the router I have no problem connecting to the Internet, however when I connect the router--no connection.  I thought it would not be a problem swapping the modem out.  I am running XP with Norton Internet Security and Anti-virus.  I have disabled Norton and do not believe that to be the problem.  Do I have to reconfigure the router?  If so, can I do it with the original install CD?  (I am disabled and the original CD/instructions/box is in the attic and I cannot get it easily.)  I have read several different threads, but they do not specifically address my problem.  Any assistance is appreciated.  Eddy

    Many Westell modems are actually "modem-routers" and they use the same 192.168.1.1  address space as your WRT54G.  This is the root of your problems.
    Try the settings at this URL.
    http://www.dslreports.com/faq/6323
    Note that the "WAN" port on the BEFSR41 in the example is the same as the "Internet" port on your WRT54G.
    Please let me know whether or not this worked for you.

  • Need a little help.... not major....but am unsure I have...

    Need a little help.... not major....but am unsure I have the 2.4 GHz Wireless-G Broadband Router Model WRT54G version 2 I had bought some time ago (over year and a half) and never really had it hooked up since I have been moving from place to place. Now that I'm retired and staying in one place I'm ready to set up. I find myself having "several" power adaptors and not sure which is the correct one. Can anyone tell me if all the broadband routers had the Linksys name and/or logo on them? None of the adapters I have do. I want to use a proper adapter so as not to damage....are there any specs that would be helpful so that one of these adapters would work? Also I'm running WindowsXP Sorry to bother you folks with a dumb question as I'm sure there are others with far more important questions and concerns. Although I can't tell other than the end going into the unit fits, I do have one Class 2 Transformer which might be the one it's about 1 1/2 inches thick, about 2 inches tall with following written information: Model 49-12-1000D CUI Inc Input AC 120V 60Hz 20W Output DC12V 1000mA Appreciate any help you can give.....I believe my unit is an older one based on version so there may have been a "fatter" adapter then than now.

    The power adapter output should be 12V, 0.5A(so 6W power rating)

  • Need a little help please    Airport Express

    Need a little help please.
    I am trying to set up a wireless network at my home using Airport Express.
    I have a regular phone line running in to I assume the modem. From there, there is an Ethernet cable running from that box to the back of the PC. My question is, I think, which of those do I unplug and plug into the Airport Express, the one on the back of the PC or the one that is in the back of the modem, or is this totally wrong.
    Any help would be appreciated…
    Thanks
    In advance…
    PS I have the manual but to me it is not very clear…

    Your connection sequence would look like this:
    Internet > Modem > AirPort Express >>>wireless to your computers.
    This means that you would unplug the cable that is now connected at the back of your PC and move that connection to the AirPort Express.
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click Continue to follow the guided setup. On the third page, you will choose the option to "Create a wireless network" and continue the setup.

  • Need a little Help with my new xfi titanium

    +Need a little Help with my new xfi titanium< A few questions here.
    st question? Im using opt out port on the xfi ti. card and using digital li've on a windows 7 64 bit system,? I would like to know why when i use 5. or 7. and i check to make sure each speakear is working the rear speakers wont sound off but the sr and sl will in replace of the rear speakers. I did a test tone on my sony amp and the speaker are wired correctly becasue the rear speakers and the surrond? left and right sound off when they suppose too. Also when i try to click on? the sl and sr in the sound blaster control panel they dont work but if i click on the rear speakers in the control panel the sl and sr sound off. Do anyone know how i can fix this? So i would like to know why my sl and sr act like rears when they are not?
    2nd question? How do i control the volume from my keyboard or from windows period when using opt out i was able to do so with my on board? sound max audio using spidf? Now i can only control the audio using the sony receiver.
    Thank you for any help..

    /Re: Need a little Help with my new xfi titanium? ?
    ZDragon wrote:
    I'm unsure about the first question. Do you even have a 7. system and receiver? If you just have 5., you should be able to remap the audio in the THX console.
    I do have a sony 7. reciever str de-995 its an older one but its only for my cpu. At first i didnt even have THX installed because it didnt come with the driver package for some reason until i downloaded the daniel_k support drivers and installed it. But it doesnt help in anyway.
    I have checked every where regarding the first question and alot of people are having problems getting sound out of there rear channels and the sound being re-mapped to the surround right and the surround left as if there rear left and rear right.
    I read somewhere that the daniel_k support drivers would fix this but it didnt for me and many others.
    For the second question i assumed it would be becasue of the spidf pass through and that my onboard sound card was inferior to the xfi titaniums. But i wasnt sure and i was hopeing that someone would have a solution for that problem because i miss controlling the volume with my keyboard.

  • Need a little help with syncing my iPod.

    I got a new macbook pro for cristmas and a few cds. After i tried to sync my ipod to itunes i put a symbol next to each song that i got from other cds saying that they were downloading but they werent. Also the cds i downloaded to my ipod for the first time didnt appear at all. Need help.

    /Re: Need a little Help with my new xfi titanium? ?
    ZDragon wrote:
    I'm unsure about the first question. Do you even have a 7. system and receiver? If you just have 5., you should be able to remap the audio in the THX console.
    I do have a sony 7. reciever str de-995 its an older one but its only for my cpu. At first i didnt even have THX installed because it didnt come with the driver package for some reason until i downloaded the daniel_k support drivers and installed it. But it doesnt help in anyway.
    I have checked every where regarding the first question and alot of people are having problems getting sound out of there rear channels and the sound being re-mapped to the surround right and the surround left as if there rear left and rear right.
    I read somewhere that the daniel_k support drivers would fix this but it didnt for me and many others.
    For the second question i assumed it would be becasue of the spidf pass through and that my onboard sound card was inferior to the xfi titaniums. But i wasnt sure and i was hopeing that someone would have a solution for that problem because i miss controlling the volume with my keyboard.

  • Quality Playback-.need a little help

    Quality Playback….need a little help
    I’ve posted in the Premiere forums too, because I’m not sure where my issue is in converting .MOD files, the export of edited footage from Preimere Pro CS4 or if it’s in Encore.
    The quality just does not seem that good, I know it’s not HD quality, but it should be better than what I have.  Seems over pixilated especially around objects.
    Here’s my steps
    Convert .MOD files using Mpeg Streamclip to a .DV file format
    Settings Compression DV (DV25)
    Standard NTSC 720 x 480 29.97 fps
    Aspect 16:0
    Everything else is default
    Import to Premiere Pro CS5
    Edit footage
    Export to quicktime .mov file
    NTSC DV Widescreen
    720 x 480 quality 100%
    codec is DV25 NTSC
    Import .mov files to Encore CS5
    Build menus and playlists
    Export with default settings approximately 1hr 45min of edited video
    Thanks
    MAB

    Bill
    Thanks for your help and patience.
    I posted a screen shot of the mov export settings I was using.  I’m going to try Ann’s conversion method on the mod files to see if that improves things.
    You asked about the Encore transcoding, what do you mean by that, are there other settings in Encore that I need to set?
    I have an 1hour 45 min of video in my Encore project, burning to a 4.7 DVD.  Encore says it’s using 3.3bg, which seems low.
    MAB

  • New to mac.. need a little help

    I am relatively new to macs and need a lil help understanding what's going on with my computer. I recently got a lend of a powerbook G4 from a friend and it has a tendency to freeze up completely and I have to just hold the power button until it turns off then it when I turn it back on it will work ok again sometimes for several hours without a hitch.
    Also, sometimes instead of freezing up I'm just not able to type. I can do everything else with the mouse or open programs and such but when I try to type it just doesn't work (and again, restarting fixes the prob).
    Looking for help .. if anyone knows why it may be doing this and/or how to fix it your help would be greatly appreciated. Thanks

    Welcome to the Apple discussions.
    First, check your hard drive free space. Click on the apple on the menu bar, about this mac, ata, and click on the hard drive under ata bus (DVD drive is listed there too). That will tell you the drive capacity and how much is available. You want 10% to 15% of the total capacity to be available for systems usage. If less than that, performance can slow to a crawl, and some of the issues you identified could be due to low free disk space.
    Next, you should have a backup of the hard drive, if there's anything you want to keep.
    Download the program OnyX from http://www.titanium.free.fr/pgs2/english/download.html . Run the tasks on the cleaning and maintenance tabs. A number of people have found this helps clean up the hard drive and contributes to improved performance.
    This FAQ has some good advice for performance tuning: http://www.thexlab.com/faqs/performance.html
    If, after cleaning your system and tuning it up, you're still having problems, please post back with specifics.

Maybe you are looking for

  • Save for Web Image Is Offset

    I have AI CS4 on Windows Vista and have created an artboard that is 220 px wide and 88 px high. I then added a rectangle of the same dimensions as a background to cover the entire artboard. When I export it to Save for Web and Devices, the resulting

  • Apple ID disabled on Iphone, I can not access my music or apps!

    I have been able to log on here using my apple id, but on my Iphone the message comes up eveytime Your Appl ID has been disabled. with the button OK It is so frustrating!!! What can I do I have changed the password secrurity question name even  on th

  • Couldnt find query elapsed time  version 2.1.1.64

    Hi All, I have oracle sql devloper 2.1.1.64. can you please help me how to find the query elapsed time in this? i tried the help option but couldnt figure out correctly. not cant we see the query elapsed time in sql devloper at all ?

  • Reporting Restrictions by Cost centers

    Hi I have a cost center reporting role which has an object  K_CSKS where we maintain cost center values. Now we have a many CCs maintained for this object. SO manager of CC 100 can also see reports for CC 200 which we want to restrict. How can we res

  • Urgent.. How to open Particular folder direcly using File Browse tag

    Hi, I want to select a particular folder using file browsing option in html. why i want this is : i have to update the resumes located in a particular folder. so every time i am opening that folder which is a subfolder. ex: c:\dir1\dir2\dir3\Resumes