Eclipse not finding JRE/JDK...

Well I'm trying to get Eclipse up and running, but whenever I launch it it tells me...
JRE or JDK needed.
No java virtual machine was found after searching:
/usr/share/eclipse/jre/bin/java
How would I go about pointing it to the real path for JRE? Thanks.

Perhaps we should make the JDK/JRE .install files export JAVA_HOME? I haven't looked at the packaging for them, but it seems everyone has a problem eventually relating to this.
Maybe something similar for everything that installs in /opt, since PATH needs refreshing... at least have pacman tell the user to source /etc/profile.
Anyways, OP, please mark your thread as [SOLVED] by editing the first post
Last edited by Ranguvar (2009-03-22 02:05:57)

Similar Messages

  • Could not find JRE executable

    Hello, I am running into problems in Eclipse Mars when trying to run a static web project using the HTTP preview server (as well as dynamic web project running on apache, but one thing at a time), I get this error.
    'Launching HTTP Preview at localhost' has encountered a problem.
    Could not find JRE executable.
    I tried searching these forums and did not find anything so sorry if this has been addressed before. Also tried searching internet but did not find anything that worked for me.
    When I run, java -version in terminal it shows:
    java version "1.8.0_20"
    Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
    Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
    Please help

    On 07/24/2015 06:36 AM, Jay Sal wrote:
    > Hello, I am running into problems in Eclipse Mars when trying to run a
    > static web project using the HTTP preview server (as well as dynamic web
    > project running on apache, but one thing at a time), I get this error.
    >
    > 'Launching HTTP Preview at localhost' has encountered a problem.
    > Could not find JRE executable.
    >
    > I tried searching these forums and did not find anything so sorry if
    > this has been addressed before. Also tried searching internet but did
    > not find anything that worked for me.
    >
    > When I run, java -version in terminal it shows:
    > java version "1.8.0_20"
    > Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
    > Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
    >
    > Please help
    What I do is this...
    I install exactly the JDK I want to use with Eclipse, usually the
    latest. Not merely a JRE, but the JDK. And I do it locally, not for my
    host. I let the host's notion of JRE be whatever it wants to be.
    I run Eclipse wired up to my own private JDK.
    This way, I know what JDK/JRE I'm running Eclipse on and what I'm using
    to develop Java code to.

  • Eclipse not finding libswt-gtk.s0 [solved]

    I recently installed Eclipse on my new Arch system and ran into the famous error:
    /mnt/home/.eclipse/org.eclipse.platform_4.2.0_1543616141/configuration/org.eclipse.osgi/bundles/193/1/.cp/libswt-gtk-4236.so: /mnt/home/.eclipse/org.eclipse.platform_4.2.0_1543616141/configuration/org.eclipse.osgi/bundles/193/1/.cp/libswt-gtk-4236.so: failed to map segment from shared object: Operation not permitted
    I know the that soft-linking /usr/lib/libswt-* into /mnt/home/.swt/lib/linux/x86_64/ fixes the issue, but the problem is that my libswt files are of a different version. They all end in 4234, while the ones eclipse is looking for end in 4236. Is it because OpenJDK and Eclipse from the ArchRepositories are of incompatible versions? Do I have to manually find a matching version of eclipse and install that instead, or is there an easier way?
    By the way, here are some information that might be relevant:
    This is the original error message:
    ┌─[20:52:27]──[91/1683]:/mnt/home$
    └──>> cat /mnt/home/.eclipse/org.eclipse.platform_4.2.0_1543616141/configuration/1371745338639.log
    !SESSION 2013-06-20 20:52:18.353 -----------------------------------------------
    eclipse.buildId=M20130204-1200
    java.version=1.7.0_40
    java.vendor=Oracle Corporation
    BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
    Command-line arguments:  -os linux -ws gtk -arch x86_64
    !ENTRY org.eclipse.osgi 4 0 2013-06-20 20:52:19.894
    !MESSAGE Application error
    !STACK 1
    java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
            /mnt/home/.eclipse/org.eclipse.platform_4.2.0_1543616141/configuration/org.eclipse.osgi/bundles/193/1/.cp/libswt-gtk-4236.so: /mnt/home/.eclipse/org.eclipse.platform_4.2.0_1543616141/configuration/org.eclipse.osgi/bundles/193/1/.cp/libswt-gtk-4236.so: failed to map segment from shared object: Operation not permitted
            no swt-gtk in java.library.path
            Can't load library: /mnt/home/.swt/lib/linux/x86_64/libswt-gtk-4236.so
            Can't load library: /mnt/home/.swt/lib/linux/x86_64/libswt-gtk.so
            /mnt/home/.swt/lib/linux/x86_64/libswt-gtk-4236.so: /mnt/home/.swt/lib/linux/x86_64/libswt-gtk-4236.so: failed to map segment from shared object: Operation not permitted
            at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
            at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
            at org.eclipse.swt.internal.C.<clinit>(C.java:21)
            at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
            at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
            at org.eclipse.swt.widgets.Display.<clinit>(Display.java:133)
            at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:653)
            at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
            at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)
            at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)
            at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
            at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
            at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
            at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
            at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
            at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
    This is my version of libswt:
    ┌─[21:15:21]──[92/1684]:/mnt/home$
    └──>> locate libswt
    /usr/lib/libswt-atk-gtk-4234.so
    /usr/lib/libswt-awt-gtk-4234.so
    /usr/lib/libswt-cairo-gtk-4234.so
    /usr/lib/libswt-glx-gtk-4234.so
    /usr/lib/libswt-gnome-gtk-4234.so
    /usr/lib/libswt-gtk-4234.so
    /usr/lib/libswt-pi-gtk-4234.so
    /usr/lib/libswt-webkit-gtk-4234.so
    These are the version I have installed:
    ┌─[21:20:00]──[109/1701]:/mnt/home$
    └──>> pacman -Q swt
    swt 4.2.1-2
    ┌─[21:20:08]──[110/1702]:/mnt/home$
    └──>> pacman -Q eclipse
    eclipse 4.2.2-1
    ┌─[21:20:09]──[111/1703]:/mnt/home$
    └──>> pacman -Q jdk7-openjdk
    jdk7-openjdk 7.u40_2.4.0-1
    ┌─[21:20:10]──[112/1704]:/mnt/home$
    └──>> pacman -Q jre7-openjdk
    jre7-openjdk 7.u40_2.4.0-1
    Last edited by Untitled (2013-06-23 18:11:53)

    Thanks for the reply.
    My Arch is just a few days old so I had not updated it yet.
    I just ran an update, but the situation is the same.
    (Thanks for the heads-up on the symlinking though. I really thought it would be a cool idea!)
    Last edited by Untitled (2013-06-20 20:34:14)

  • Could not find the Main Class. Program will exit. Eclipse w/ JDK 6 RC

    Hi all,
    I needed to upgrade to JDK 6 RC w/ Eclipse while encountering a java.lang.NullPointer exception.
    Now I would like to compile my code with the new VM. I set all preferences to VM Version 6.
    Now I have the following Error:
    Java Virtual Machine Launcher
    Could not find the Main Class. Program will exit.
    What do I do now? Attached you find the Error Message.
    Bye
    Gerrit
    ================================The System.error looks like:
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Exception in thread "main"

    i wouldn't report a nullpointer to sun unless you're fairly confident there's some sort of bug. if main() can't be found it sounds to me like a config issue. if nullpointer, sounds like a code issue. post the code if you want, but i don't think sun will help you debug this.

  • NitroXInstaller (2.1) can not find JDK or JRE 1.4

    Hi,
    I have been trying to install NitroX JSP Editor (NitroXInstaller.exe), downloaded today, and keep getting an error saying it can not find a JRE or JDK 1.4 or later.
    I have modified my PATH and tested a few permutations to no avail. I only have 1.4 installed on my machine. The path is correct:
    E:\tmp\ExpressNitroXFreeInstall-411>java -version
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
    I saw in an other post that if I press <cntr> while running the install, I can get the installer to create a log file. I tried that but the functionaility did not come up...
    Any ideas?
    Patrick

    From what I see in the log, it does find the correct JVM but has a problem starting up:
    versionInfo: major: 2 minor: 1 micro: 0 buildNumber: 411 release name: M1
    java.io.IOException: CreateProcess: D:\Program Files\java\j2sdk1.4.2_06\jre\bin\
    java.exe -version error=5
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:66)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:428)
    at java.lang.Runtime.exec(Runtime.java:364)
    at java.lang.Runtime.exec(Runtime.java:326)
    at com.m7.installer.InstallerUtil.getVersion(InstallerUtil.java:119)
    at com.m7.installer.InstallerUtil.checkVersion(InstallerUtil.java:83)
    at com.m7.installer.CheckInstallerVM.install(CheckInstallerVM.java:35)
    at com.zerog.ia.installer.actions.CustomAction.installSelf(DashoA8113)
    I am running W2K with the latest MS updates.

  • Can not start WebLogic in Eclipse. Error: "Could not find the main class."

    I have installed Eclipse 2.0 and WebLogic Server 6.1. and the WebLogc plug in from GENUITEC (and jdk1.3.1_04, on Win2K Server). After I have done the configuration, the WebLogic start/stop buttons are integried into the Eclipse Toolbar, but when I click on the start button to start Weblogic, it pops up a dialog box "Java Virtual Machine Launcher" with message: "Could not find the main class. Program will exit!"
    Starting WebLogc Server from the Start panel works fine.
    Does any one have seen this before or have a suggestion what I should do?
    Many many thanks in advance.
    Huan

    Weblogic must be started with a full JDK; otherwise
    JSPs and dynamic EJB stubs could not be deployed. The
    error message
    indicates you are attempting to use a JRE. Configure
    Eclipse JRE to point to a JDK. The product
    documentation will help you with this process. It does not work for me. :-(
    I have tried JDK 1.3.1 and 1.4.1: same result: I get a "Could not find the main class: Program will exit"
    For free expert support please consider contacting
    Genuitec at [email protected] If just want any
    answer ask a newsgroup.
    WayneI'll try the support at '[email protected]' :)
    Michel
    Michel Szybist
    [email protected]
    Fax: +33 (0)173729897
    SMS: http://www.szybist.net/

  • Eclipse give following error :could not find Java 2 runtime environment

    When I try to start eclipse it is giving me following error could not find Java 2 runtime environment.It was working fine untill I installed a new verson of eclipse although I am not whethar that is the source of problem.
    When i give java -version command in command prompt it shows
    Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
    has value '1.4', but '1.6' is required.
    Error: could not find java.dll
    Error: could not find Java 2 Runtime Environment.
    My java Home ,classpath , and path are all set as I say it was earliar woking fine.
    Please Help.

    I know this is a relatively old post, but some people can stumble on this page when doing a search for this problem.
    Anyway, I ran into this on my PC after I installed Sybase which had an older jre.
    Solution:
    1. Run regedit
    2. Look for Java Runtime Environment
    You may have to do multiple searches. Eventually you'll find one with the version number.
    3. Modify the value and change it to the correct version number. (in your case, you would have changed it from 1.4 to 1.6).
    This is much quicker than reinstalling Java every time installing something that uses an older version of Java hoses up the registry value.

  • JAVA_HOME points to a JDK and not a JRE.

    Hi,
    I am using Redhat Linux 9. From root i can able to find the java -version as
    java version "1.4.2_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
    But when i run jboss_home/bin$ sh run.sh i am getting the error as follows,
    [root@arc bin]# sh run.sh
    run.sh: Missing file: /root/usr/java/j2sdk1.4.2_06/lib/tools.jar
    run.sh: Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE.
    run.sh: line 181: /root/usr/java/j2sdk1.4.2_06/bin/java: No such file or directory
    I set Java_Home, JBOSS_HOME but why i am getting these error. Please let me know.

    Don't know nothing about JBoss but, when JBoss starts up does it switch to it's own username?, i.e not root, if it did it probably wouldn't be able to access root's home dir to get to java, as root's home dir is usually not readable by any other user, just a hunch.

  • Fat Jar Export: Could not find class-path entry for 'C:Java/jdk/mysql-connector-java-

    ok friends,
    have a normaly running project in eclipse and want to create a jar file...i tried ewerythin in ->export but nothing function
    i wanted to create a runnable jar file but that error ecures:
    JAR export finished with warnings. See details for additional information.
    Exported with compile warnings: ICQJJ/src/ICQJJ.java
    Jar export finished with problems. See details for additional infos.
    Fat Jar Export: Could not find class-path entry for 'C:Java/jdk/mysql-connector-java-5.1.8-bin.jar'
    what's the problem?
    ok, i am using a mysql db und using the driver mysql-connector-java-5.1.8-bin.jar....
    i improted this jar file like this run -> run configuration -> classpath -> add external jar....
    pls help me

    That looks like it might be a binary-distribution JAR that you should unjar. The actual JAR for the classpath is probably inside it.

  • Getting this error :NB: JAVA_HOME should point to a JDK not a JRE

    HI All
    I've installed jdk1.5.0_06 in windows enviroment.i've correctly set the java_home path for it.
    Apart from it i've installed two servers one is Weblogic 9.1 and Tomcat 5.5 and NetBeans 5.5.1.
    While running my project with the netbeans it tried to start the server. On starting the Tomcat server it showed me this error in the Tomcat log.
    NB: JAVA_HOME should point to a JDK not a JRE
    but while running Weblogic it worked smoothly. the java_home path has both the paths of jdk1.5 (installed separatly ) and the one which is bundeled with weblogic(jdk1.5)
    Could anyone tell me the solution for the error.while running the project sseparatly is working fine. but i am not able to run it from NetBeans.

    By why it is so that we bin folder was not selected,
    because when i earlier installed weblogic then at
    that time weblogic automatically made this entry
    using its own internal jdk and the path was till bin.A JAVA_HOME directory should point to a directory containing all the java related stuff. The bin part is appended while executing javac or java command. Weblogic might be using the JAVA_HOME variable differently.

  • Could not find the main class in Eclipse

    Hey,
    I've been working with Java for a few years now, but I recently set-up a new Eclipse-environment and now my Application won't run...
    "Could not find the main class. Program will exit."
    If I compile and run the source myself it works fine, so it must be a setting in Eclipse somewhere...
    It doesn't work, even when I put the class in the default package...
    It must be something very stupid, but I can't seem to find out what the problem is :(

    It was only the basic Hello-World-concept;
    public class Game extends JFrame {
         /** A default SerialVersionUID */
         private static final long serialVersionUID = 1L;
         public Game() {
              addKeyListener(new GameController());
              MainView view = new MainView(...);
              add(view);
          * @param args The game-options
         public static void main(String[] args) {
              Game spel = new Game();
              spel.setSize(1024, 768);
              spel.setTitle("Java Rally");
              spel.setResizable(false);
              spel.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              spel.setVisible(true);
    }

  • Installation problem: I'm not finding ...\eclipse\configuration\org.eclipse.osgi\bundles\15\1\.cp\lib

    <p>I&#39;m following the PDF on &#39;Creating a Thick Client Application&#39; and I do not find a 15 folder in the ...\eclipse\configuration\org.eclipse.osgi\bundles\ folder.  What piece did I not install?  </p><p> </p><p>Thanks in advance. </p>

    You can find the JAR in question, ReportViewer.jar, in ..\eclipse\plugins\com.businessobjects.sdks.jrc.11.8.0_11.8.1.v671\lib as well.  Note that "11.8.1.v671" above denotes the version number, which increases with every update; you should always use the latest version.

  • Could not find an installed JDK, SCM Java Tools may not work until registry

    Hello all,
    I've downloaded the latest full version of Designer (10.1.2.3), but getting installation error: Could not find an installed JDK, SCM Java Tools may not work until registry
    Any solution?

    3. install the Designer 10.1.2.3 patch to the Developer suite home.When I try to do this at C:\oracle\product\Ora10gDSR2, I get a message OUI-10137: An Oracle Home with name OUIHome already exits at C:\OraHome (a directory that doesn't exist) please specify another name for Oracle Home.
    I don't want to just specify another name because cleaning up these faulty installations requires deleting registry keys, etc, since the deinstall does't really remove everything sufficiently to start with a clean slate.
    I also got the Java JDK message because the JDK 5 is no longer being put straight onto the C drive, it is buried in C:\Sun\SDK\jdk, so some java programs have to be pointed to it. The Oracle installer doesn't provide this option.
    Also, Michael, your post, "Re: Designer 10.1.2.3 on windows Xp Posted: Oct 20, 2007 7:05 AM in response to: mmehdi" is full of unreadable characters and question marks. Maybe I don't have a font you are using. There are also references to a zip file and a Word document that aren't there.
    Anyway, thanks for all your time and effort,
    Edward

  • Could not find the main class JRE 1.6 only with console program into Contro

    Hi,
    I want replace JRE1.5-11 with JRE 1.6.
    Applet is running correctly with JRE 1.6.
    But when i want launching Java program located into "Parameters/Control Panel"
    I have following error message "Could not find the main class JRE 1.6 "
    Regards
    Philippe

    i wouldn't report a nullpointer to sun unless you're fairly confident there's some sort of bug. if main() can't be found it sounds to me like a config issue. if nullpointer, sounds like a code issue. post the code if you want, but i don't think sun will help you debug this.

  • How can I find JRE installed or not thro' script

    hi,
    for my purpose, if any one install JRE, if another version of JRE or same version exits already, then I want to show error message to user that JRE is already installed.
    Is it possible?.
    can I find JRE is already in system or not (specifically in linux) using any script.

    Why would you want to do this?

Maybe you are looking for

  • Calendar app contains multiple entries for birthday calendar and Apple US Holiday's calendar.

    After the most recent update, my calendar app began showing duplicate entries for all of my calendars (google, birthday and US Holidays). I deleted all of the google calendars from my phone and then added each calendar back to the phone one at a time

  • Screen Print in XI (Hard Copy)

    Does XI have a option to print mapping in the Integration Repository in the graphical message mapping screen?

  • MapViewer error -05523

    I have added a JDBC theme to my map with the following query: var baseQuery="select /*+ index(a, LIST_CENTRELINE_I) */ innera.name1, innera.name2, geom " + "FROM (SELECT a.PRI_NAME as name1, b.PRI_NAME as name2, sdo_geom.sdo_intersection( a.shape, b.

  • Schdule_ship_date should not be updatable when we change a request_date

    Hi all , can you please help to resolve this issue? In OM module Sales order form we have request_date and schdule_ship_date and they are some default rules are defined as sysdate for both the dates and thses should be effected once you save the form

  • Network sharing administrating

    Hello, I'm using network sharing to share my internet connection (I'm tethering and sharing the internet). I have a problem: _If I set up a password for the sharing, windows OS on other computers cannot connect._ I solved it using no password, but no