You are not logged in.
Pages: 1
I am trying to build the jedit package but I am having problems with the JAVA_HOME env variable.
The build keeps looking in /opt/j2re for tools.jar. I have manually set JAVA_HOME to /opt/j2sdk, put it in my .bashrc, set the JAVA_HOME variable in the PKGBUILD script, and even tried removing /etc/profile.d/j2re.sh. This was all to no avail, when I run the makepkg it is still looking in /opt/j2re.
Where am I supposed to set this this variable? This is my first time using makepkg so I am still learning the ropes.
Thanks!
Offline
What PKGBUILD are you using?
JEdit is in hapy's TUR, isn't it? but it may not be up to date.
You might try exporting JAVA_HOME just before you run makepkg. You should probably also have to export it as root (in root .bashrc instead of in users) because makepkg runs in fakeroot. I don't know if it uses root env vars or not.
Dusty
Offline
You might try exporting JAVA_HOME just before you run makepkg. You should probably also have to export it as root (in root .bashrc instead of in users) because makepkg runs in fakeroot. I don't know if it uses root env vars or not.
Fakeroot is specifically meant to be used without any root stuffs at all. That's the point of it. Don't touch anything of root's to make it work with fakeroot, because it won't.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
This is a problem with the way that j2sdk and j2re are packaged. Since /opt/j2sdk/jre is symlinked to /opt/j2re, the jvm returns /opt/j2re as the System.getProperty("java.home"); even if you have your environment variable JAVA_HOME set to /opt/j2sdk.
The only way to fix it is to rm the /opt/j2sdk/jre symlink and cp /opt/j2re into /opt/j2sdk/jre like so
rm /opt/j2sdk/jre
cp -r /opt/j2re /opt/j2sdk/jre
hth,
-wd
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
Excellent! Thank you wdemoss that did the trick. I thought the packaging of the jre and sdk was weird so I looked it up and saw that it had been split. Now I know why just linking /opt/j2re to /opt/j2sdk didn't work when I tried that last night.
Thanks again everyone for you help.
Offline
So, now that we know the problem, how do we fix it? I originally split j2re and j2sdk because people complained about having to download so much to be able to use the java plugin and whatnot.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
So, now that we know the problem, how do we fix it? I originally split j2re and j2sdk because people complained about having to download so much to be able to use the java plugin and whatnot.
I can not think of another way to fix it besides having the full jre in the j2sdk. Perhaps, don't make the j2sdk depend on the jre. That way a person can install one or the other, depending on whether or not they are a java developer. If you have the j2sdk installed, there is no need for the j2re.
just a thought,
-wd
EDIT:
if you like, i'll submit a bug about it.
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
I suggested that to Xentac last night, but he told me it wouldn't work because other packages that need to install to the jre directory (such as extension modules) need to know where that directory is, whether it is jre/ or j2sdk/jre.
I don't know if this would work, but could you make the link from j2sdk to j2re a hard link instead of a symbolic link? That would behave like copying the files, but would not double up on the number of files installed. I don't remember if you can make hard links to directories though...
Another option would be this file structure
/opt/java/jre <-- j2re gets installed here
/opt/java <-- j2sdk gets installed here; the j2re directory is now under the j2sdk directory regardless.
Dusty
Offline
You can make a hard link, but I'm pretty sure that wouldn't work from within a package. Hard links point directly to inodes. The idea is that two directory (or file) entries point to exactly the same inode. Problem is that my inodes are different from your inodes...
If anyone wants to test this, be my guest.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
What if you create the hardlink using the post_install() thingy instead of within the package itself?
If this post is extremely dumb, please let me know, for I'm not too sure wether I understood the problem or not.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
That could work... though I've always hated creating files from within a post install script
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
What if you create the hardlink using the post_install()
That was what I was thinking.
That could work... though I've always hated creating files from within a post install script
You can't always get what you want... do you want to not create a file in post install, or do you want the JAVA_HOME problem to go away? which is more important?
ah, decisions... decisions...
To hell with it, lets scrap J2RE and use J2SDK only! 8)
Dusty
Offline
My point is that I'll go with that solution if I have to, but I'd rather not, so keep suggesting things.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
/opt/java/jre <-- j2re gets installed here
/opt/java <-- j2sdk gets installed here;
Whats wrong with dusty's idea? This sounds like a viable alternative to me.
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
You can make a hard link, but I'm pretty sure that wouldn't work from within a package. Hard links point directly to inodes. The idea is that two directory (or file) entries point to exactly the same inode. Problem is that my inodes are different from your inodes...
If anyone wants to test this, be my guest.
I tried the hard link, but it appears that it does not work for directories. Perhaps, I missed something in the help/man files. I always get error message Operation not permitted.
I tried
ln -nF /opt/j2re /opt/j2sdk/jre
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
Dusty wrote:/opt/java/jre <-- j2re gets installed here
/opt/java <-- j2sdk gets installed here;Whats wrong with dusty's idea? This sounds like a viable alternative to me.
Hmmm... I used to be against this idea because a java lib package wouldn't know where to install the libs. But, I guess it'd always be in /opt/java/jre/...
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
I just hit this same problem. Was there ever any solution implemented for this?
Dusty's idea sound like it would work to me too. Any reason not to implement it?
DR
Offline
I solved the problem by doing this
cd /opt/opt/j2re/lib
ln -s /opt/j2sdk/lib/tools.jar
I don't now if there are any side effects
Offline
I solved the problem by doing this
cd /opt/opt/j2re/lib ln -s /opt/j2sdk/lib/tools.jar
I don't now if there are any side effects
That's more elegant than anything else that's been suggested so far. What says Xentac?
Dusty
Offline
What if j2sdk isn't installed? Will it break anything because the symlink doesn't point to anything? Or should the symlink be part of the j2sdk package? Is it just that file that's needed and nothing else from the j2sdk package?
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
What if j2sdk isn't installed? Will it break anything because the symlink doesn't point to anything? Or should the symlink be part of the j2sdk package? Is it just that file that's needed and nothing else from the j2sdk package?
I'd put the symlink in the j2sdk package; apparently j2re doesn't need tools.jar, or it would have been installed there in the first place, yes/no? I don't know if that's the only needed file or not, bug reports will tell...
Dusty
Offline
Xpop wrote:I solved the problem by doing this
cd /opt/opt/j2re/lib ln -s /opt/j2sdk/lib/tools.jar
I don't now if there are any side effects
That's more elegant than anything else that's been suggested so far. What says Xentac?
Dusty
This probably will work for solving the given problem with finding the tools.jar. But, i think the real problem is that System.getProperty("java.home") does not return what is set as the JAVA_HOME variable, nor what is the home of the jre being executed on the path. I think it is confusing and would eventually lead to more obscure problems like this one.
I have a solution to suggest: If the problem origionally needing solved was that people were complaining about the size of the download, then don't make them depend on each other. If you would like them to be mutually exclusive because you think it would be a configuration pain , then make them confict. The argument I heard against this was that the mozilla-common plugin would break. I looked at the package build and instead of linking the library their to /opt/mozilla-common, do it in a post_install() for each of j2sdk and j2re so that both of them would basically be
post_install() {
if [ ! -f /opt/mozilla-common/libjavaplugin_oji.so ]; then
ln -s /opt/j2sdk/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so /opt/mozilla-plugins
fi
or /opt/j2jre/jre/plugin/... as applicable. If you wanted to get really crafty (and both were allowed to be installed for whatever reason) on the remove in the install script, you could check and see if the other was installed and link the library to it.
-wd
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
I'm leaning towards the j2sdk in /opt/java and j2re in /opt/java/j2re solution. Though I'll have to evaluate it to make sure that everything else will still work right.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
I'm leaning towards the j2sdk in /opt/java and j2re in /opt/java/j2re solution. Though I'll have to evaluate it to make sure that everything else will still work right.
I don't mean to nit pick, but did you mean j2sdk in /opt/java nad j2re in /opt/java/jre (you said /opt/java/j2re which wouldn't work)
-wd
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
Yeah... that's what I meant.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
Pages: 1