Laerning by pain

Selfbondage software and other kinky developments

Moderators: Riddle, Shannon SteelSlave

Tenderfoot88
***
Posts: 458
Joined: 17 Sep 2013, 08:00
Location: British Columbia, Canada

Re: Laerning by pain

Post by Tenderfoot88 »

Hmm...do you have Java installed?

It's programmed using Java, so if you don't have it installed, it won't be able to run the main program. Considering how the .exe file works, the blink-up screen seems like a logical result of this problem.

https://www.java.com/en/download/ is where you can find the latest release of Java. (Don't download it from anywhere else - they have damned good download speeds and there's a lot of people suspiciously claiming to have the real latest version of Java and the like)
Ginns
*
Posts: 5
Joined: 11 Mar 2014, 17:19
Location: Germany

Re: Laerning by pain

Post by Ginns »

Hmm, I have Java installed (for working with Eclipse) and just updated it to that version, but oddly enough still the same effect :shock:
Tenderfoot88
***
Posts: 458
Joined: 17 Sep 2013, 08:00
Location: British Columbia, Canada

Re: Laerning by pain

Post by Tenderfoot88 »

Hmm, curious. It was developed and tested in Windows 7 x64, so it's definitely not an OS complication.

Ahh...looking at the code, I see that if you're missing a functional config.txt or vocabulary.tsv file, it immediately closes the program after giving the error message. When testing in console, this worked fine because console stays open - when run via the .exe wrapper, it'll close automatically.

The version I have uploaded at present has functional files, so I'd assume it's due to something going wrong with your modifications.

If you can get eclipse to run that class file, or just navigate to the folder in cmd and type "java Vocab", you should get to see the error message, which will at least tell you which file it's having trouble with. From there you can either download the original version of the file and be more careful, or go over it and try to see what causes a problem.

Looking through the code, the 3 most obvious ways to cause this kind of error are:
  • the vocabulary list file is named something other than "vocabulary.tsv". I'm not sure why I didn't abbreviate it to vocab there like everywhere else.
  • the config/settings file is named something other than "config.txt"
  • Possibly, there's a line in config.txt that is missing an equals sign before the message it's supposed to be reading into memory. That's assuming this throws an exception when no = is detected. (reads a line from the file, processes it if it's not the end of the file by determinint where an equals sign is and copying everything right of said equals sign into a string array.)

    Code: Select all

    while((line=br.readLine()) != null) {
    	int n = line.indexOf("=");
    	Settings[lineTracker] = new String(line.substring(n+1));
    	lineTracker++;
    }
An improperly formatted vocab list probably wouldn't end up throwing an exception; it'd just cause really weird behavior further along the line.
Ginns
*
Posts: 5
Joined: 11 Mar 2014, 17:19
Location: Germany

Re: Laerning by pain

Post by Ginns »

Using cmd the program is working perfectly. I'll stick with that ;)
Thank you so much for your help :)
Tenderfoot88
***
Posts: 458
Joined: 17 Sep 2013, 08:00
Location: British Columbia, Canada

Re: Laerning by pain

Post by Tenderfoot88 »

Hmm...OK. Something odd about the .exe file, then. Glad it's working in console.
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Laerning by pain

Post by qwerty212 »

JackZwo wrote:Hi Tenderfoot88,

how`s your work going on ? Any progress ? Qwerty didn`t reply to my idea I explained to you, so it seems your software is the best solution available right now.

greetings
Tenderfoot88 wrote:...
I must admit, I'm not overly surprised that Qwerty didn't respond (yet). He seems to drop in from time to time, rather than being a resident...

That dammit Qwerty... :mrgreen:

Looks like you did a good job Tenderfoot88, thanks for sharing it with us.

Greets from Barcelona
merlot_vin
*
Posts: 6
Joined: 29 Jun 2007, 02:28
Location: San Diego
Contact:

Re: Laerning by pain

Post by merlot_vin »

Thanks Tenderfoot for the work. I think you mentioned you might be willing to share the source code. I am curious to see how you ran the external programs. For the externals to run, given the paths in the configs, does one use double back slashes in those paths? (mypath\\myrun.exe). Merci Beaucooop …ow!
Tenderfoot88
***
Posts: 458
Joined: 17 Sep 2013, 08:00
Location: British Columbia, Canada

Re: Laerning by pain

Post by Tenderfoot88 »

It shouldn't need the escape character (/) to input the actual backslash - my understanding is that's only necessary when you're typing a string directly into the source file (as in String path="C:\\Users\\....) because it's looking for code. I've never had it require using that in the Java IO inputs, whether it's from a file or a in-program prompt.

When I tested it by having it run an mp3 file (I don't have the equipment to make full use of the program, ironically), I don't recall having to use backslashes, though I might not have tested having it in a different directory. I'll double check this in a sec, see the edit at the bottom of this post.

As for posting the source, I apparently promised to include it in the package, then forgot about it. As such, I've edited the release post back on page 1 to include the .java file separately. (It will, of course, need all the other files to run, the .java file is just the piece that's missing for programmers looking to tinker.

Running the external programs basically involved me looking up the Java code to run a console command, finding something that did something similar to what I wanted, then tweaking it to make the console window not display.

Edit: I just tested it with an absolute path and only one backslash is needed, as I suspected. (So it's C:\Users\....)
Post Reply