Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying out PHPStorm on openSUSE, and it requires the Sun Java JDK which doesn't come by default. I installed the Sun JDK based on directions here.

I can run PHPStorm file as root user after that procedure but when I try to run it under my user account I get an error saying that Java is not found.

The solution I'm using is to add the following to the top of the phpstorm.sh script:

export JDK_HOME=/opt/java/64/jre1.6.0_30

I'm wondering if this is the best way to accomplish this or if there is a better/cleaner way to do it?

share|improve this question
up vote 1 down vote accepted

If you want to affect this export for all system (not a just for particular user) please create appropriate file-script in /etc/profile.d folder.

Example /etc/profile.d/java.sh

export JDK_HOME=/opt/java/64/jre1.6.0_30

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .