You are not logged in.

#1 2006-08-21 19:06:03

Bison
Member
From: Jacksonville, FL
Registered: 2006-04-12
Posts: 158
Website

Classpath JVMs PKGBUILD Question (Cacao and JamVM)

I've got a package for Cacao and JamVM.  The problem is if Proprietary Java is installed it creates BOOTCLASSPATH & CLASSPATH environment variables.  If they are set then Cacao & JamVM will not operate, so the variables have to be unset.

So Here's my question:

Should I make sure those variables are unset, or should I echo a message that tells the user to make sure they aren't set?

If I should unset those variables: what would be an acceptible way to do that?

Offline

#2 2006-08-21 19:33:18

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: Classpath JVMs PKGBUILD Question (Cacao and JamVM)

Can't you write a wrapper script that does all this automatically?

Offline

#3 2006-08-21 20:37:06

Bison
Member
From: Jacksonville, FL
Registered: 2006-04-12
Posts: 158
Website

Re: Classpath JVMs PKGBUILD Question (Cacao and JamVM)

arooaroo wrote:

Can't you write a wrapper script that does all this automatically?

you mean just write a bash script that unsets those, and then calls the apps?

Offline

#4 2006-08-21 21:06:48

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: Classpath JVMs PKGBUILD Question (Cacao and JamVM)

Yeah

pseudo for jamvm.sh

set classpaths

/usr/share/jamvm/bin/jamvm [args] 

reset classpaths

The user types jamvm myclass and it calls the script, sets the new paths, passes the args to jamvm, and once completed, puts the old paths back.

Would this not do?

Offline

#5 2006-08-23 17:33:04

Bison
Member
From: Jacksonville, FL
Registered: 2006-04-12
Posts: 158
Website

Re: Classpath JVMs PKGBUILD Question (Cacao and JamVM)

arooaroo wrote:

Yeah

pseudo for jamvm.sh

set classpaths

/usr/share/jamvm/bin/jamvm [args] 

reset classpaths

The user types jamvm myclass and it calls the script, sets the new paths, passes the args to jamvm, and once completed, puts the old paths back.

Would this not do?

Yes that would work indeed.  However, how do I pass the args to jamvm effectively?

EDIT: nvmd, I figured it out.  So if I use that script.  How would I use it in the PKGBUILD, and where would I put JamVM now?

Would i just use --prefix=/usr/share (or something like that?).  And have the .install copy the script to /usr/bin?

Offline

#6 2006-08-23 19:18:27

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: Classpath JVMs PKGBUILD Question (Cacao and JamVM)

Look at other PKGBUILDs that come with a wrapper shell script. There's one for Jacman. And I think there's one for jedit too that passes arguments.

Offline

#7 2006-08-23 21:10:18

Bison
Member
From: Jacksonville, FL
Registered: 2006-04-12
Posts: 158
Website

Re: Classpath JVMs PKGBUILD Question (Cacao and JamVM)

arooaroo wrote:

Look at other PKGBUILDs that come with a wrapper shell script. There's one for Jacman. And I think there's one for jedit too that passes arguments.

Okay cool.  Thanks for the wisdom.

Offline

#8 2006-08-23 21:12:45

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: Classpath JVMs PKGBUILD Question (Cacao and JamVM)

Bison wrote:
arooaroo wrote:

Look at other PKGBUILDs that come with a wrapper shell script. There's one for Jacman. And I think there's one for jedit too that passes arguments.

Okay cool.  Thanks for the wisdom.

Gulp. No one's said that to me before!

Offline

#9 2006-08-24 03:22:22

Bison
Member
From: Jacksonville, FL
Registered: 2006-04-12
Posts: 158
Website

Re: Classpath JVMs PKGBUILD Question (Cacao and JamVM)

arooaroo wrote:
Bison wrote:
arooaroo wrote:

Look at other PKGBUILDs that come with a wrapper shell script. There's one for Jacman. And I think there's one for jedit too that passes arguments.

Okay cool.  Thanks for the wisdom.

Gulp. No one's said that to me before!


AH! Now I don't know if I should even unset those variables.  You can technical use those with cacao, but it messes things up if you let proprietary java set those (which it did on mine).

So should I wrap the program? or let the user worry about it and echo a message.

Offline

Board footer

Powered by FluxBB