You are here

Java and Class Archive configuration problem 2.4

9 posts / 0 new
Last post
Maasdoel
Offline
Last seen: 16 years 7 months ago
Joined: 2008-05-12 05:29
Java and Class Archive configuration problem 2.4

Hi

Been struggling a week now!

Previous working configuration.

1. Was running Ver 2.2 on a stick and on the local HDD as a portable app.
2. Win XP host system
3. Using Java and Mysql *.jar file for JDBC functionality(latest)
4. No problems

Upgraded to 2.4 on both installations.

Problem statement

XP Host
1. Path to local Java auto detected but not selected.
2. Path to Class/Archive mysql*.jar is clear every time I start OOp
3. File G:\PortableApps\OpenOfficePortable\Data\settings\user\config\javasettings_Windows_x86.xml
contains the correct information when exiting OOp but on entry to OOp the content is set back to empty default values.

I can set the correct values and immediately work with a DB but, on exit all is lost again.

No it does not prompt my to exit and reload after changing Java settings !!
Tried that to!

Win200 Host
Request user registration every time plus the afore mentioned problem with Java

Yes I did exit OOp every time.
Yes I did exit Papp every time.
Yes I did delete All installations and work on the Stick only.
No there is not an installation of normal OO on either machine.
Yes I did search for hidden ini files.
Yes I did create a ini file in G:\PortableApps\OpenOfficePortable
No, the symptoms changed, javasettings_Windows_x86.xml was no longer changing but it was not being read either.

Yes I tried going back to OOp 2.2 same results.
Yes I tried on a new machine.
No I have not yet tried a new stick (need to get one)

The force is weak, The dark side calling please help!

John T. Haller
John T. Haller's picture
Offline
Last seen: 11 hours 44 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
No Custom Settings

You can't currently make any custom changes to the Java setting in OOP. It only works with the defaults which work with Java at X:\PortableApps\CommonFiles\Java or within OpenOfficePortable\App\Java. If you place Java anywhere else, it won't work with OpenOfficePortable.

Sometimes, the impossible can become possible, if you're awesome!

Maasdoel
Offline
Last seen: 16 years 7 months ago
Joined: 2008-05-12 05:29
The Class archive path could

The Class archive path could be set and was remembered before?

now the class path needs to be selected every time.

Java run time is installed in both directory's you mentioned.
The MySql class has been copied to both of the afore mentioned directory's
and the portable documents directory.

Try this..

Download mysql-connector-java-5.1.6.zip (or another *.jar)

http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1....

extract
mysql-connector-java-5.1.6-bin.jar

and place it on your stick.

Now open OOp OpenOfficePortable.exe
Now TOOLS -> OPTIONS -> JAVA

Check that there is a dot next to the version of java you are using (1.6.0_05)
Select CLASS PATH -> ADD ARCHIVE (Point it at mysql-connector-java-5.1.6-bin.jar)
Save
Exit
open OOp OpenOfficePortable.exe
Check if JAVA runtime is selected.
Check if CLASS PATH is still set.

Monitor contents of
x:\PortableApps\OpenOfficePortable\Data\settings\user\config\javasettings_Windows_x86.xml

Before 1st opening OOp
After saving settings.
After closing OOp.
After 2nd opening OOp.
After exiting Java settings window.

you will notice that the contents are reset to default after exiting the Java settings the second time.

Regards
Eric

Jeremiah
Offline
Last seen: 6 years 1 month ago
Joined: 2006-04-19 12:39
Same problem, no new solutions offered

I'm having this same problem and have seen two other threads addressing it that were much newer. BUMP Any new ideas? Why won't it save class path data across restarts?

jpe

MAK-CS
Offline
Last seen: 14 years 10 months ago
Joined: 2008-09-25 09:40
Same Problem like you

Hello,
I have the same Problem with OOp 2.4.1 an one more Information: When I config the Class Path with OOp Writer save and reopen with OOp Writer the Class Path is still there. But when I open OOp Base the Class Path will be delete immediately.

rab040ma
Offline
Last seen: 5 months 3 weeks ago
Joined: 2007-08-27 13:35
What is the class path

What is the class path setting before you change it?

Would changing it in the environment work, or does it need to be set in some config file?

MC

MAK-CS
Offline
Last seen: 14 years 10 months ago
Joined: 2008-09-25 09:40
Class Path setting

The Class Path setting is emty before I chose a File under "Extras -> Optionen -> OpenOffice.org -> Java -> Class Path" (It's similar in English). This settings change the following file: \PortableApps\OpenOfficePortable\Data\settings\user\config\javasettings_Windows_x86.xml

When I reopen OOp Base the file will be deleted an rebuild with default settings.

site_ml
Offline
Last seen: 13 years 5 months ago
Joined: 2009-10-15 12:22
Solution?

Has this been resolved? If not, could the portable wrap around inject the setting into the xml file so that the MySQL JDBC connector could be used?

I have checked just now, and as of version 3.1.0, this is still an issue where this file:

OpenOfficePortable\Data\settings\user\config\javasettings_Windows_x86.xml

is removed, leaving to OpenOffice reconstructing it.

Here is what the xml looks like when the needed connector is added (replaced with []):

[?xml version="1.0" encoding="UTF-8"?]
[!--This is a generated file. Do not alter this file!--]
[java xmlns="http://openoffice.org/2004/java/framework/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"]
[enabled xsi:nil="true"/]
[userClassPath xsi:nil="false"]L:\mysql-connector-java-5.1.10-bin.jar[/userClassPath]
[vmParameters xsi:nil="true"/]
[jreLocations xsi:nil="true"/]
[javaInfo xsi:nil="true"/]
[/java]

Here is the xml after deletion and rebuilding (again replaced with []):

[?xml version="1.0" encoding="UTF-8"?]
[!--This is a generated file. Do not alter this file!--]
[java xmlns="http://openoffice.org/2004/java/framework/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"]
[enabled xsi:nil="true"][/enabled]
[userClassPath xsi:nil="true"][/userClassPath]
[vmParameters xsi:nil="true"][/vmParameters]
[jreLocations xsi:nil="true"][/jreLocations]
[javaInfo xsi:nil="true"][/javaInfo]
[/java]

My conclusion comparing those two is that this file does not store anything system-specific anyway, and I think a good solution to this would be to allow the portable wraparound to read from a template file and modify the path based on OOP's path on the fly. That template file could be maintained with an extra tool if need be, and if absent, the portable wraparound can revert to default behavior of deleting the xml file.

Thus, if there's no fix to this yet, is my proposed solution doable? Without this or a similar solution, a portable OpenOffice.org Base is useless to me for what I need with MySQL.

Thanks in advance.

mziegler
Offline
Last seen: 15 years 1 week ago
Joined: 2009-12-11 08:15
I have created a modified launcher

As I got stuck with the same problem, I modified the launcher to do the following:
Instead of regenerating the javasettings_Windows_x86.xml file on every launch it generates a javasettings_Windows_x86.new.xml instead and leaves the other one untouched. In case of a problem you can just copy over the .new.xml over the other one. If somebody is interested in it and can tell me where to upload it here, please let me know.

Log in or register to post comments