Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Windows Registry Questions

Author
Message
Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 12th Feb 2008 01:29 Edited at: 12th Feb 2008 02:18
Just wondering if anyone knows the answer to 2 registry related questions I have. I'm using Vista 64 bit if that matters at all.

So I was messing around with the registry and gave jar files an icon and made them call java.exe -jar, and I put a compile option on the right click menu for java files, and started wondering...

1) This is my command string for the jar file Open command:
"C:\Program Files\Java\jdk1.6.0_04\bin\java.exe" -jar %1
Is it possible to remove the absolute path and replace it with a relative one? In the command prompt, you can just call "java ..." because the PATH variable contains the a path to the java folder that has that exe, but this doesn't seem to work in the registry.

2) When you want to run java class files, you type the name of the file, minus the extension, so if you have HelloWorld.class,
java HelloWorld
The problem is, if I wanted to add an execute command to .class files, I'd have to find some way to drop the '.class' from the %1 argument (contains the path, name, and extension of the file you call the command on). Does anyone know how to do that?

Thanks,
-Jeff

bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 12th Feb 2008 01:36
Not sure how to answer your questions, but, why don't you just use a proper java IDE?


Hurray for teh logd!
Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 12th Feb 2008 01:44 Edited at: 12th Feb 2008 02:19
I have one, I just like to 'tinker' with things. I made something to auto backup my flash, I made registry items to show/reveal hidden files because the folder options menu is annoying to pop up all the time, I made programs to hide the start bar, hide the system tray, remove windows from the start bar by tying them to other windows, screw with menu options in other programs, remove the exit option/button from other programs, etc. It's fun, educational, and sometimes slightly useful

And sometimes I just want to run something without having to wait for Eclipse launch etc. A right click option would just be convient at times.

Attachments

Login to view attachments
ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 12th Feb 2008 02:08
Are you sure it's in the PATH? Make sure it's in the system PATH and not the user-variable one. As far as dropping .class, I don't think that's possible without a script. You might be able to make a simple shell script to do it, and then call that in the registry.

Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 12th Feb 2008 02:16 Edited at: 12th Feb 2008 02:37
Its under Environment Variables - System Variables - Path

I had thought about making a script to do it, but I figured I might as well see if there was a cleaner way to do it.

3) Is there a way to create a new key in REGEDIT thats (Default) value is of type REG_EXPAND_SZ? I've had to create them my exporting other keys with the correct default value, and then edit them and load them back into the registry where I want them.

[EDIT] Using notepad %1 works fine, javac %1 pops up the 'what do you like want to open this with' dialog, as does random nonsense

Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 16th Feb 2008 03:28
Bump back to page 1...

Not at all urgent or important, yet input is appreciated. Thank you

tha_rami
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location: Netherlands
Posted: 16th Feb 2008 08:46
Whoa, someone who actually knows how to decently bump. I'm sorry, I wish I could help you out . Hope someone else can.


A mod has been erased by your signature because it was larger than 600x120
Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 16th Feb 2008 15:36
Quote: "Whoa, someone who actually knows how to decently bump. I'm sorry, I wish I could help you out . Hope someone else can."


Haha, thanks...

Don't worry about it, I might just write some of my own programs to take care of it, but the less junk floatng around the better, so I'm just looking for a cleaner solution.

Login to post a reply

Server time is: 2024-11-19 22:21:23
Your offset time is: 2024-11-19 22:21:23