|
Re: Failed to create the Java Virtual Machine [message #635103 is a reply to message #635099] |
Mon, 25 October 2010 16:04 |
|
On 2010.10.25 9:55, Stephan Bachofen wrote:
> [snip]
> Other Java applications still work. What doesn't work is Lotus Notes 8.5
> which is based on Eclipse as far as I'm aware.
> Both, Eclipse and Lotus Notes used to work before the Apple Java update.
> Any help is appreciated.
>
> Perhaps a word about the history of this machine: I had JDK 1.5 manually
> installed as well before but it seems to have gone after the Apple patch.
>
> Cheers,
> Stephan
I personally prescribe downloading and using a separate, private JDK
with Eclipse rather than installing it for use by the greater computer
host. That way, whatever is going on with my computer doesn't influence
the behavior of my Eclipse development (and vice-versa).
I'm not a Mac guy, but it would appear on the basis of what you've said
that my personal practice would be even more relevant on that platform
than on Linux and Windows.
If you choose to do this and get a new JDK for Eclipse use, be sure to
edit eclipse.ini to add the -vm argument so that Eclipse knows where to
get its JDK.
|
|
|
|
Re: Failed to create the Java Virtual Machine [message #662407 is a reply to message #638292] |
Wed, 30 March 2011 14:55 |
Dan Kripac Messages: 1 Registered: March 2011 |
Junior Member |
|
|
Hi there,
Just thought I'd add to this as I had the same problem after the java 1.6 update on 10.6.7.
It turned out that my problem was due to having my /etc/launchd.conf contain 'umask 007' (As this is the way I prefer unix permissions to be in my situation) which meant that during the java update install, all symlinks were getting created as root:admin user group and were unreadable to anyone else.
Here is how I fixed it (assumes some terminal knowledge - and comes with a not-my-fault-if-this-breaks-your-system disclaimer!).
1) Save the python code below to the file fixSymLinkPermissions.py
2) Open a terminal and cd to /System/Library/Frameworks/JavaVM.framework/
3) run 'sudo /path/to/fixSymLinkPermissions.py'
It should recursively go though all sub-directories and remake all symlinks with umask 000 permissions (prints it out as it goes).
It works for me at least!
Cheers
Dan
#!/usr/bin/env python
# Quick hack fix to recursively re-make symlinks with full permissions
#
# Author : Dan Kripac
#
# usage:
# fixSymLinkPermissions.py [ optional_File_Or_Dir_List ]
#
# Defaults to the current working directory if no arguments are given.
#
# Should avoid recursing to linked directories outside the directories
# that you initiate the process from (i.e outside the current working
# directory by default)
#
import os, sys, threading, signal
symlinkMutex = threading.Lock()
def signalHandle(signum, frame):
# wait for any symlink operations to finish so we don't leave
# any removed symlinks unmade
symlinkMutex.acquire()
print('Gracefully quiting...')
sys.exit(1)
signal.signal( signal.SIGTERM, signalHandle )
signal.signal( signal.SIGHUP, signalHandle )
signal.signal( signal.SIGABRT, signalHandle )
signal.signal( signal.SIGINT, signalHandle )
signal.signal( signal.SIGQUIT, signalHandle )
def fixSymLinkPermissions( fileList, recursiveLinkDomain=[] ):
if os.getuid() != 0:
if __name__ == '__main__':
print('fixSymLinkPermissions : ERROR : must be run as super user.')
sys.exit(1)
else:
raise OSError('fixSymLinkPermissions : ERROR : must be run as super user.')
for f in fileList:
if os.path.exists( f ):
if os.path.islink( f ):
try:
linkLoc = os.readlink( f )
absLinkLoc = os.path.abspath( linkLoc )
oldumask = os.umask( 0000 )
print('Re-creating symlink %r -> %r' % (f,linkLoc) )
symlinkMutex.acquire()
try:
os.remove( f )
os.symlink( linkLoc, f )
pass
finally:
symlinkMutex.release()
os.umask( oldumask )
if os.path.isdir( linkLoc ):
outsideLinkDomain = False
for p in recursiveLinkDomain:
relpath = os.path.relpath(absLinkLoc,p)
if len(relpath) and relpath[0] == '.':
outsideLinkDomain = True
elif len(relpath) == 0:
outsideLinkDomain = True
if not outsideLinkDomain:
fixSymLinkPermissions( [ absLinkLoc ], recursiveLinkDomain=recursiveLinkDomain )
else:
print('skipping recursion to link %r' % absLinkLoc )
except Exception, err:
print('ERROR : %s creating symlink %r -> %r' % (err,f,linkLoc))
elif os.path.isdir( f ):
childFileList = []
for c in os.listdir( f ):
p = os.path.join( f, c )
if os.path.exists( p ):
childFileList.append( p )
else:
print('path %r doesn\'t eixist?' % c)
if len(childFileList):
fixSymLinkPermissions( childFileList, recursiveLinkDomain=recursiveLinkDomain )
else:
print('fixSymLinkPermissions : path %r does not exist?' % f )
if __name__ == '__main__':
if len(sys.argv) == 1:
fixSymLinkPermissions( [ os.getcwd() ], recursiveLinkDomain=[ os.getcwd() ] )
else:
fileList = []
linkDomain = []
for f in sys.argv[1:]:
if not os.path.isabs( f ):
if os.path.exists( os.path.abspath( f ) ):
fileList.append( os.path.abspath( f ) )
elif os.path.exists( f ):
fileList.append( f )
if os.isdir( fileList[-1] ):
if not fileList[-1] in linkDomain:
linkDomain.append( fileList[-1] )
else:
parentDir = os.path.split( fileList[-1] )[0]
if not parentDir in linkDomain:
linkDomain.append( parentDir )
fixSymLinkPermissions( fileList, recursiveLinkDomain=linkDomain )
|
|
|
|
Powered by
FUDForum. Page generated in 0.03633 seconds