After I recently tried to install TomCat and use it in Eclipse, I was not able to run the server as it prompts an error that says "Could not create Java Virtual Machine".
After reading other's solutions I tried adding a _JAVA_OPTIONS in system variable but it didn't work either.
What is the solution to this problem?
Related
I'm trying to get Eclipse to work on my CentOS 7 VM via X11 forwarding. The X11 forwarding seems to be working, as I am able to run and see "xclock". However, whenever I run Eclipse, it crashes with a message similar to this:
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/home/centos/eclipse/configuration/org.eclipse.osgi/375/0/.cp/libswt-pi-gtk-4527.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
no swt-pi-gtk in java.library.path
/home/centos/.swt/lib/linux/x86_64/libswt-pi-gtk-4527.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
Can't load library: /home/centos/.swt/lib/linux/x86_64/libswt-pi-gtk.so
This issue is all over the web, and a lot of it is solved my soft linking files in /usr/lib/jni/ to ~/.swt/lib/linux/x86/ but, I do not have a a /usr/lib/jni directory. So, I tried to find the libraries that create this folder upon installation and I found these in another Stack Overflow post: libswt-gtk-3-jni, libswt-gtk-3-java
And I can't seem to find anything on CentOS that provides these. I then found this guide on the CentOS client portal for installing Eclipse and it doesn't work for me. It talks about getting access to devtoolset-3 via RedHat Subscription Manager or RHN Classic, both of which are unavailable to me on the machine that I am working with.
At this point I have JDK installed, and Eclipse untarred and attempting to launch and I'm getting this error. Any ideas?
I am running a virtualbox with debian installed as local webserver. I am working with eclipse directly on that virtual box with a remote project (RSE plugin). I am having the problem that eclipse starts the DLTK-indexer as soon as I open the project. On the debian machine, instantly my /var/log/auth.log is filling up with a endless list of:
sshd[4271]: error: no more sessions
In eclipse, the error log is filling up with (although using JRE 6):
org.eclipse.core.runtime.CoreException: Operation failed. File system input or output error: rse://xxx.xxx.xxx.xxx/path/to/file/being/indexed
org.eclipse.rse.services.files.RemoteFileIOException: Operation failed. File system input or output error
While indexing is done, I am not able to save any file I am working on, as all ssh-sessions are already used on the server.
It seems that the indexing process tries to open a new connection for every file it´s indexing.
When indexing is finished, everything works normal again, I can save files etc.
I would appreciate the indexer to complete its work, but as code completion does not work afterwards, eclipse was not able to do the indexing.
One solution would be to disable the indexing, but this is not the purpose of an IDE, code completion is one of the few reasons for me to still use an IDE (at least for large projects).
Any ideas on how to make indexing work and get rid of the ssh-errors would be great!
Futher system information:
Host-System: Windows 7 Prof. 64bit
Guest-System (virtualbox): Debian Lenny with sftp subsystem enabled
Eclipse: Indigo with Zend PDT and RSE (already running with Java 6 JRE 1.6.0_45)
Thanks for your help!
David
I was able to fix this issue by doing two things:
set up ssh to use multiplexing (see http://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing) in the virtual machine
Upgrade eclipse to Kepler 64Bit release (much faster and more stable in Windows 7) with manual installation of PDT feature (using Zend PDT is a waste of time)
This also works with Java7!
Now I have completely indexed projects and can use code-completion!
In my STS installation, I tried to upgrade Xmx1024 to Xmx4096. My computer computer has 8GB installed memory. But it keeps giving me an error message - "could not create java virtual machine" and exits with code 1. What could possibly be the problem and what should I do to fix it?
That's it: you're running a 32 bit JVM. I think you can't have more than 3GiB (or maybe 2GiB, I read by there) in a 32 bit JVM.
Can you try running a 64 bit JVM?
As they say in this article, you seem to be missing the unit.
Don't you want to write Xmx4096m?
Environment: Eclipse Indigo or Eclipse Juno 4.2 on Windows 7. Oracle 11g XE (local install)
When running my Django project in pydev, attempted page access results in the message "Unable to acquire Oracle environment handle".
Normally, all I have to do is set TNS_ADMIN to point to the correct tnsnames.ora directory.
If I run manage.py from the command line, all works as expected. I thought at first that it was probably an environment variable difference, but the TNS_ADMIN values are the same. In any case, explicitly setting TNS_ADMIN in the Eclipse run configuration didn't make a difference.
PYTHONPATH was somewhat different between the two, and I went to the trouble of overriding it in the run config to see if it made the difference. Nope.
Looking at the cx_Oracle source, the error seems to come from a failure in a call to OCIEnvNlsCreate, but I didn't see anything obvious in the Oracle documentation.
Can anyone give me a clue why I'm getting this in Pydev?
I figured it out. I didn't look hard enough at the PATH variable.
Basically, there was a virtual environment that needed its scripts directory (containing OCI.DLL) to be first in the path, but my Oracle installation was ahead of it. So, the error message was basically the result of calling the wrong OCI.DLL (the one associated with my Oracle installation, rather than the one cx_Oracle was bound to).
Activating the virtual environment worked because it changed the path. Pydev works differently, so Eclipse was seeing my standard path with the Oracle install first.
I have been developing a Java program in Netbeans/Ubuntu 12.04 using OpenJdk. I have got this program to run successfully using the .jar in Linux, but when I copy the .jar to my Windows 7 virtual machine I get the following error;
"Could not find the main class: testprogram.Main. Program will exit."
Also this program uses no external libraries.
How did you start your program? Did you use java -jar yourjarfile.jar?
Maybe your Manifest file does not defined applycation entry point. You can study this topic here.
My fix to this problem was to use JDK 6 as opposed to JDK 7, still unsure as to why this error was produced, but this change has fixed the problem.