"insert JDK path on Wine" = huh?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
GM_of_OLC
Newbie
Newbie
Posts: 1
Joined: Fri May 29, 2009 4:25 pm

"insert JDK path on Wine" = huh?

Post by GM_of_OLC »

I'm following
http://supportforums.blackberry.com/rim ... 675#M25929
to install the Blackberry Eclipse plugin.
I'm stuck at step 4, as I'm not sure what it is asking.
I have a basic understanding of Paths within Windows, but don't know how to edit/add/create them within Linux/Wine.
Anybody know what I'm supposed to do?
KenJackson
Level 2
Level 2
Posts: 24
Joined: Mon Apr 14, 2008 11:01 am

Post by KenJackson »

You could run regedit (yes, even from a Linux Bash shell) and drill down to HKEY_LOCAL_MACHINE -> System -> CurrentControlSet -> Control -> Session Manager -> Environment
and modify the PATH there.

But whenever I install or upgrade wine, I have a script I run to make sure it's got my favorite stuff configured right. This is one item taken from that script:

Code: Select all

#!/bin/sh
# Modify the registry
cd ~/.wine
REGFILE="/tmp/$$.reg"
cat >$REGFILE <<'EOF'
REGEDIT4

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment]
"PATH"="c:\\bin;c:\\windows\\system32;c:\\windows;c:\\other\\paths"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion]
"RegisteredOrganization"="self"
"RegisteredOwner"="user"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion]
"RegisteredOrganization"="self"
"RegisteredOwner"="user"
EOF

regedit $REGFILE  ||  echo "WARNING: regedit returned $?"
rm -f $REGFILE
This is another, more direct way to modify the registry. But it depends on knowledge of the way Wine stores the registry, so it's less robust:

Code: Select all

# Use of sed: sed '/^pattern/s/old/new/'
# Add c:\bin to the front of the path (save a backup with ".orig" added)
sed -i.orig '/^"PATH"="c:..windows/s/"="/"="c:\\\\bin;/' system.reg
Locked