Re: [OpenMap Users] Java 1.4.0_02 Problems

From: Geoffrey Knauth <geoff@knauth.org>
Date: Tue Oct 15 2002 - 12:36:32 EDT

First I tried this on a RH6.2 system with JDK 1.4.0_02, since my RH7.3
system already had JDK 1.4.1. Got the same warning about "Could not
create system preferences directory." OpenMap came up nonetheless.

I looked for that warning on Google. Scrolled down to the last message
(19-Sep-2002) on this page:
http://forums.java.sun.com/thread.jsp?forum=17&thread=271015

Tried the following:
# mkdir /etc/.java
# chown normaluser /etc/.java

Reran OpenMap as normaluser, everything was fine this time (no warnings
about could create dir(s) or obtain file lock(s)).

I tried all this again with JDK1.4.1 on RH7.3, same thing. JDK1.4.x
expects to find /etc/.java/.systemPrefs/, and it writes files in there
with names like .system.lock and .systemRootModFile. The first time
you run (any) Java App with JDK1.4, it creates those files, with file
ownership matching the current userid.

Geoffrey

--
Geoffrey S. Knauth				http://knauth.org/gsk
On Tuesday, October 15, 2002, at 09:37 AM, Hutson, Joe wrote:
> Based on a search on the error in non-OpenMap areas it looks like it 
> might be
> trying to create a file in the /etc/.java directory.
>
> Try creating that directory and making sure you have read/write 
> Privileges.
>
> Joe
>
>
> -----Original Message-----
> From: Eliot Lebsack [mailto:elebsack@mitre.org]
> Sent: Tuesday, October 15, 2002 7:52 AM
> To: Prakash Manghwani
> Cc: openmap-users@bbn.com
> Subject: Re: [OpenMap Users] Java 1.4.0_02 Problems
>
>
> Prakash,
>
> I tried this modification, and was met with the same result.
>
> in tcsh:
>
> setenv OPENMAP_HOME <my home directory path>/openmap-4.5.3
> setenv CLASSPATH ${OPENMAP_HOME}:${OPENMAP_HOME}/lib/openmap.jar
>
> java -Dopenmap.configDir=${OPENMAP_HOME} com.bbn.openmap.app.OpenMap
>
> Note: my openmap.properties is sitting in $OPENMAP_HOME.
>
> I get the following output:
>
> OpenMap(tm) Version 4.5.3
>   Copyright (C) BBNT Solutions LLC.  All rights reserved.
>   See http://openmap.bbn.com/ for details.
>
> Oct 15, 2002 7:46:24 AM java.util.prefs.FileSystemPreferences$2 run
> WARNING: Could not create system preferences directory. System
> preferences are unusable.
>
> It appears to be related to something different. Thanks for the idea,
> though!
>
> Regards,
>
> Eliot
>
> Prakash Manghwani wrote:
>>
>> before running openmap, try updating your CLASSPATH variable to
>> OPENMAP_HOME:CLASSPATH
>> ex: for Bash shell i do
>> export CLASSPATH=$OPENMAP_HOME:$CLASSPATH
>>
>> This is an issue i have noticed on all platforms and has been fixed.
>>
>> Prakash
>>
>> Eliot Lebsack wrote:
>>> Herve,
>>>
>>> Thanks for giving me some ideas on this. However, the problem appears
>>> to be that my openmap.properties file is not being read correctly. In
>>> fact, it does not seem to be read at all. When I take my 
>>> openmap-4.5.3
>>> directory (unchanged) to Windows 2000, it appears to find the correct
>>> openmap.properties file, and produce the desired layers, etc.
>>>
>>> This problem is identical to Solaris. I've tried running the openmap
>>> application as root, and it works correctly. I should not have to be
>>> root to do this. I've tried wiping my ${HOME}/.java directory,
>>> wiping /etc/.java, and setting all permissions as open as possible.
>>>
>>> Regards,
>>>
>>> Eliot
>>>
>>> Hervé Allemand wrote:
>>>
>>>> Hello Eliot,
>>>>
>>>> Monday, October 14, 2002, 7:21:14 PM, you wrote:
>>>>
>>>> EL> Good afternoon...
>>>>
>>>> EL> I'm trying to run openmap-4.5.3 with Java 1.4.0_02 on a RedHat 
>>>> Linux
>>>> EL> 7.2 machine. When I run the bin/openmap shell script, I get an
> openmap
>>>> EL> window, but on the console, I get the message
>>>>
>>>> EL> Oct 14, 2002 12:55:50 PM 
>>>> java.util.prefs.FileSystemPreferences$2 run
>>>> EL> WARNING: Could not create system preferences directory. System
>>>> EL> preferences are unusable.
>>>>
>>>> EL> This does not seem to be a problem on Windows. Any ideas? I saw 
>>>> this
>>>> EL> behavior on a Solaris 8 machine as well (with the same j2sdk).
>>>>
>>>> EL> Regards,
>>>>
>>>> EL> Eliot
>>>>
>>>> The warning you are witnessing is linked to the new Preferences API
>>>> included since the JDK 1.4.
>>>>
>>>> The first time the JVM is launched, it tries to creates the 
>>>> structure
>>>> used to store the system and user preferences.
>>>>
>>>> On Windows machines, system and user preferences are stored in the
>>>> registry, under the keys named
> [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs]
>>>> and [HKEY_CURRENT_USER\Software\JavaSoft\Prefs]. I think the system
>>>> preferences tree is created at installation, and I am sure the user
>>>> preferences tree is created the first time the JVM launches a Java
>>>> program.
>>>>
>>>> On Unix machines, the system and user preferences are using XML 
>>>> files
>>>> located in specific directories. I do not know where the system
>>>> preferences are stored, but I know the user preferences are stored 
>>>> in
>>>> the user home directory, in a ".java"-like directory I guess.
>>>> If the behavior is the same as under Windows, the user preferences
>>>> directory should be created the first time the JVM launches a 
>>>> program.
>>>> You should then have write access to that directory.
>>>> If it is a write access rights problem, you should then witness the
>>>> same warning when launching any java program, and not only OpenMap.
>>>>
>>>> Anyway, since as far as I know, OpenMap doesn't use the Preferences
>>>> API, this should not be a problem for you.
>>>>
>>>> I do not know much about Unix, but I hope this helps.
>>>>
>>>> --
>>>> Best regards,
>>>> Hervé Allemand                         mailto:hallemand@mangoosta.fr
>>>>
>>>> --
>>>> [To unsubscribe to this list send an email to "majdart@bbn.com"
>>>> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>>>
>>>
>
> -- 
> ====================================================
> Eliot Lebsack                         (781) 271-5830
> Senior Communications Engineer    elebsack@mitre.org
> The MITRE Corporation                    Bedford, MA
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe 
> openmap-users"]
>
>
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Oct 15 12:37:03 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT