WordRider Home
Welcome! Log In Create A New Profile

Advanced

portable java (windows)

Posted by ra 
Re: portable java (windows)
October 27, 2009 11:39AM
In the forum. I will let know you on Twitter.
I plan to work on speed limiter and priorities for plugins, sorting in the main table during next days.

-------------------------------------





Edited 1 time(s). Last edit at 10/27/2009 11:47AM by Vity.
Re: portable java (windows)
October 29, 2009 05:30PM
Well, I added for you new JVM system property (like user.dir is) - exePath into 0.83u1.
What -DexePath does:
1. You can specify there how to launch FRD
2. If this property is specified, it will download files in your script properly

-------------------------------------





Edited 1 time(s). Last edit at 10/29/2009 05:30PM by Vity.
ra
Re: portable java (windows)
October 31, 2009 02:58PM
Thank you very much, Vity!
I should be able to test this new version during the weekend.
Just to make sure I understand what's in your mind, do you mean that my script will work if I change just the launch line this way (I'm merely adding -DexePath to the launch line)?

start "" "%JAVAHOME%\bin\javaw.exe" -jar "%jarpath%" -DexePath="%CD%\..\..\" --portable %*

frd.jar is located in folder %CD%\..\..\
Re: portable java (windows)
October 31, 2009 03:36PM
i think that -DexePath should be absolut path - i thought you would be using it for launching your script.

-------------------------------------

ra
Re: portable java (windows)
October 31, 2009 07:08PM
%CD%\..\..\ is an absolute path. It starts with a drive letter.
Can you give me an example of how you thought I should use it?
Re: portable java (windows)
October 31, 2009 08:29PM
Something like this:
start "" "%JAVAHOME%\bin\javaw.exe" -DexePath=path_to_this_script  -jar "%jarpath%" --portable %*

PS. Among Java developers it's better to use JAVA_HOME

-------------------------------------

ra
Re: portable java (windows)
November 01, 2009 11:09AM
I tested it. Now downloaded files are renamed correctly, and description files are created along them.
But I did not see significant changes regarding the download locations.
I also need to report two general errors.

I changed my script this way:
pushd "%~dp0"
set thisScriptPath=%CD%
...
cd %APPDATA%
start "" "%JAVA_HOME%\bin\javaw.exe" -DexePath=%thisScriptPath% -jar "%jarpath%" --portable %*
Test results:
An ABSOLUTE save path like X:\downloads is first created as X:\downloads
but files are finally saved in tools\downloads (relative path).
A RELATIVE save path like downloads is initally created as tools\portablejava\Data\AppData\downloads
but files are finally saved in tools\portablejava\Data\AppData\tools\portablejava\Data\AppData\downloads.

Ideally I would like for X:\downloads to save into X:\downloads, and without creating the intermediate tools\downloads, which is a problem for flash drive tear.
For relative path downloads I would like to find files in tools\portablejava\Data\AppData\downloads without creating the unnecessary second folder.

In my tests I also changed -DexePath=%thisScriptPath% to -DexePath=%APPDATA%, but it made no difference, files were still saved as described above.

As regards other errors - tested only by running FRD from my script:
1- download file, right-click file entry to get its properties, all is OK, but exit and restart FRD, right-click same entry to get properties and get a severe Java error message.
2- the SaveTo pulldown menu does not remember download locations when you restart FRD.
Sorry, only registered users may post in this forum.

Click here to login