Duane and Julie wrote:
>Nothing worked. And then you suggested trying it on a different user
>account. I hadn't thought of that, and wouldn't you know, it WORKED!
>
>But I don't know why. There must be a file or configuration or cache or
>something that Eclipse uses (that I missed).
>
>Is there a way to monitor the files a program opens during startup?
Nothing springs to mind. That doesn't mean there isn't anything, just that
I can't think of anything off the top of my head.
It would be easier if the problem were to find out what file Eclipse keeps
open. Then the 'lsof' command would be very helpful (read 'man lsof' in
Terminal). But that only works on currently open files, and would be
pretty hard to get working as a tracker of all files previously opened.
Oh wait, this just sprang to mind...
Create a SecurityManager class that emits all pathnames it checks to
stdout, then run Eclipse with that as the default SecMgr. Furthermore, the
SecMgr must succeed in all checks, otherwise you won't get far enough to
find out anything.
Once you have this diagnostic SecMgr written and compiled into a jar (use
the new user acct), you add the jar to the classpath. Simplest strategy
there is probably to drop it into /Library/Java/Extensions as a Java
extension jar. Then you define the property "java.security.manager" to be
your class-name, as described here:
<http://java.sun.com/j2se/1.4.2/docs/guide/security/spec/security-spec.doc6.html
>
If I haven't made a mistake about when Java extensions are resolved, then
the SecMgr you wrote should be accessible. If I'm wrong, you'll have to
put the SecMgr's jar directly into the classpath.
Figuring out how to do all this on Eclipse's internal structure, I can't
help you with. But the basic strategy should be sound.
By the way, if you use the diagnostic SecMgr on Eclipse when logged in
under the malfunctioning account, you should be able to correlate a lot
more closely to the actual malfunctioning file, because it will be closer
in time to when the SecMgr does its evaluation.
Before going to all that trouble, though, try looking in
~/Library/Preferences for Eclipse's prefs file, or for a generalized Java
prefs plist. Move that aside and see if it helps, or just confirm its
permissions. I do know that the Preferences API in Java uses a single
plist file, but I forget its name. Running an app that uses the
Preferences API will modify the file, so arrange by date can show what file
to check.
And be sure to file a bug against Eclipse that they should list which files
are accessed during Eclipse startup, and their locations on each Eclipse
platform. If you knew that, you could check them. Not knowing it, you're
left to write diagnostic aids. And if the Eclipse bug-fixers say "Oh,
that's documented already at this URL", then you'll know where to look.
Or if I just now made a vile accusation against the saintly Eclipse,
perhaps a sufficiently irked Eclipse contributor will call me a liar and
provide the URL that refutes my accusation. It's a small price to pay to
get an answer.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden