You are here

Jstock

13 posts / 0 new
Last post
gjjh25
Offline
Last seen: 8 months 3 weeks ago
Joined: 2006-04-03 07:38
Jstock

Would it be possible to make this portable?

I found a post from a few years ago, but i dont think it has been followed up?

http://jstock.sourceforge.net/index.html

gjjh25
Offline
Last seen: 8 months 3 weeks ago
Joined: 2006-04-03 07:38
Is nobody interested in doing

Is nobody interested in doing this? I think it would be a good addition.

Graham Yates

Pyromaniac
Pyromaniac's picture
Offline
Last seen: 9 years 8 months ago
Developer
Joined: 2008-09-30 19:18
I looked at it

It can almost be done with the exception of the fact that it leaves a folder, launch4j-tmp in %ProgramFiles%\... which is in accessible to Vista+ users with UAC and can't be deleted without administrative rights, thus not allowing JStock to ever be fully portable.

It's a shame, too, because other than that, only one folder needs to be taken care of, %userprofile%\.jstock, and it'd be portable.

Sorry bro.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Shouldn't be a problem

You shouldn't be running the Launch4J executable; you should analyse what it does and then do what it does directly with PAL (that's normally just command line arguments stuff). Then launch4j-tmp won't be created. Plus, you can do things like the -Duser.home trick.

Even if it were creating a directory in Program Files, that wouldn't be an issue because either Angel it would fail to create it (if it required it, you would need admin, but that's not too bad) or (b) it would create it and you would also have admin so you could remove it.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Pyromaniac
Pyromaniac's picture
Offline
Last seen: 9 years 8 months ago
Developer
Joined: 2008-09-30 19:18
Looks like you were right

Turns out that it's just the executable that gets passed some arguments and launches the original app... Looks like it can be done after all.

I'm on it.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Reference

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Pyromaniac
Pyromaniac's picture
Offline
Last seen: 9 years 8 months ago
Developer
Joined: 2008-09-30 19:18
I see;

Here's my launcher, which doesn't seem to want to cooperate:

[Launch]
ProgramExecutable=javaw.exe
CommandLineArguments='-Xms64m -Xmx512m "%PAL:AppDir%\jstock\jstock.exe"'
WorkingDirectory=%PAL:AppDir%\jstock
SingleAppInstance=true
SinglePortableAppInstance=true
DirectoryMoveOK=yes

[Activate]
Java=Require
XML=true
#For FileWrite, ommitted.

[DirectoriesMove]
jstock=%USERPROFILE%\.jstock\1.0.6

[DirectoriesCleanupIfEmpty]
1=%USERPROFILE%\.jstock

launching java.exe briefly brings up the commandline windows, then leaves, and javaw.exe brings causes [ICON_EXCLAMATION] sound, minus the message box. Neither launches the app.

Aluísio A. S. G.
Offline
Last seen: 8 years 5 months ago
DeveloperTranslator
Joined: 2010-11-09 17:43
JAR

1. You don't need the single quotes around CommandLineArguments.
2. It seems that you're trying to run the Launch4J-based launcher. Find out which JAR it launches and pass it as -jar {file.jar}.

Previously known as kAlug.

Kim_Wood
Offline
Last seen: 11 years 9 months ago
Joined: 2007-09-20 01:43
What about this launcher

This launcher seems to work. What do the PortableApps.com experts think? I agree with comments in other posts here about the desirability of launching the JAR rather than the EXE. However, I just tried a "quick & dirty" to see if there was any real difficulty in the launcher. I don't want to take this over, I am just trying to help.

[Launch]
ProgramExecutable=jstock\jstock.exe
CommandLineArguments=-vm "%JAVA_HOME%\bin"

[Activate]
Java=find

[DirectoriesMove]
jstock=%USERPROFILE%\.jstock\1.0.6

[FilesMove]
jstock.ini=%PAL:AppDir%\jstock\jstock.ini

[DirectoriesCleanupIfEmpty]
1=%USERPROFILE%\.jstock

Regards,

Kim

Kim

Pyromaniac
Pyromaniac's picture
Offline
Last seen: 9 years 8 months ago
Developer
Joined: 2008-09-30 19:18
No need to worry,

I fixed this issue already. I'm just trying to learn this XML stuff and see if I need to handle it in the launcher now...

gjjh25
Offline
Last seen: 8 months 3 weeks ago
Joined: 2006-04-03 07:38
Thank you, looking forward to

Thank you, looking forward to this.

Graham Yates

kenyaree
Offline
Last seen: 12 years 9 months ago
Joined: 2012-03-22 12:32
This's how i make jstock portable

1. install jstock; and then copy the whole jstock directory into folder portableApps on your usb drive.
2. From there, rename jstock.exe to jstock.jar
3. Install jPortable & jPortableLauncher apps
4. Run jPortableLauncher. From JPortableLauncher app, nagigate to your jstock folder and select jstock.jar
5. Voila, jstock is up & running.

If you have other way to make jstock portable, pls post the solution here.

Pyromaniac
Pyromaniac's picture
Offline
Last seen: 9 years 8 months ago
Developer
Joined: 2008-09-30 19:18
Here's the right way.
Log in or register to post comments