1 |
On Thu, 08 Aug 2013 18:48:24 -0500 |
2 |
Taahir Ahmed <ahmedtd@××××.edu> wrote: |
3 |
|
4 |
> I'm starting by writing an init script for my existing install |
5 |
> (attached). I've got it mostly working, I think, but I am wondering |
6 |
> if there's a gentoo- approved way of setting a proper value for |
7 |
> JAVA_HOME in the init script. Right now I'm just using a |
8 |
> sub-shell call to java-config to detect the active system vm. |
9 |
|
10 |
That's what the Tomcat init script does and I don't think there's |
11 |
anything wrong with that. It does effectively the same thing as |
12 |
sourcing /etc/profile.d/java-config-2.sh would do but I don't think |
13 |
there's any point in doing that because you will always want the system |
14 |
VM in this case. Simple use /etc/java-config-2/current-system-vm as |
15 |
your JAVA_HOME and you will get the same result. This location is a |
16 |
symlinked directory. |
17 |
|
18 |
I was going to suggest that you install a launcher wrapper in the |
19 |
ebuild using java-pkg_dolauncher but this doesn't allow you to start |
20 |
the process with jsvc because the wrapper is hardcoded to use "java". I |
21 |
remember running into this issue before but decided not to use jsvc in |
22 |
the end anyway. |
23 |
|
24 |
Regards, |
25 |
James |