I finished installing Eclipse 3.7.2 (Indigo) on my Ubuntu 12.04 system.
I am unable to have any options pertaining to either creating a Java project, running one as a Java project, can't find any of the Java preferences for JRE settings... There is no Java Development Toolkit in the Help section. I had all this earlier, I am not sure what changed. I am assuming that this has something to do with the SDK but have no other clue.
You might not have a system JRE installed. Press ctl + alt + T to open your Terminal
and then try running:
sudo apt-get install default-jre
Note: this will install Java 1.7, if you want 1.6 then you have to specify that
Then in Eclipse, make sure you have your environment setup correctly.
If you want the official JavaDoc, here how to set it up:
How do I add the Java API documentation to Eclipse?
Here is a link to the JavaDoc that you can use in your preferences:
http://java.sun.com/javase/6/docs/api/
Install your preffered JDK, then go Preferences -> Java -> Installed JREs and point to the fresh install.
Also, check Preferences -> General -> Capabilities. Make sure you have Development selected.
Related
I am trying to use windowbuilder on eclipse oxygen 4.7.3a on macOS highSierra. it installed fine but every time I try to open the design part it displays this error
Eclipse is running under 0, but this Java project has a 1.8 Java
compliance level, so WindowBuilder will not be able to load classes
from this project. Use a lower level of Java for the project, or run
Eclipse using a newer Java version.
I tried everything. like changing the running enviroment, .jre files, try different JDE. nothing working. any suggestions?
Your only short term solution is to use a Java version <= 9.
Initially WindowBuilder did not work with Java 9 for several reasons. See
Bug 526098 - WindowBuilder fails to work on Java 9.
One of those issues was that the the System Property java.version was unexpectedly just "9":
Please check that you have exactly 9.0 JDK, it worked for me with
9.0.1 until I downgraded target JRE to 9.0, which has unusual System.getProperty("java.version").equals("9")
The fixes to get WindowsBuilder working on Java 9 were only completed on 2/21/18, and based on your error it looks like a similar issue exists when running WindowsBuilder using Java 10. I suggest you create a Bug Report with Eclipse.
See also:
SO Post Eclipse Oxygen Window Builder Error with Java SE 10.0.1 where the solution/workaround was to regress to Java 9.
This Eclipse Forum post where a user is reporting a similar problem to yours.
Uninstall Java Version and Install lower version of Java(8).Support for WindowBuilder is not provided anymore.
How to uninstall current version?(Mac)
Go to /Library/Java/JavaVirtualMachines/ to see current version of java and replace jdk1.8.0_131.jdk with yours.
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf ~/Library/Application\ Support/Oracle/Java
Install Java 8:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Then:
Right click on your project and go to Properties
Make sure your configuration look like this,
At the top of picture Configure Workspace settings click on it (Uncheck project specification settings) and then see image below
Apply same as in picture Then enable "project specification settings"
Restart Your Eclipse
Done!!
I am trying to install jre 8.0 on eclipse neon, when I go preferences>java>Installed JRE's>add>standardVM I don't know what it is asking for when it requires a JRE home, it needs a specific type of directory and I don't know what that is. I tried downloading the JRE from elipse's website, but when I put that in it doesn't work. Any help is appreciated.
Eclipse Neon has a dependency on Java8. And atleast JRE needs to be installed. However for most development efforts a JDK environment is recommended. You want to download and install Jdk8 or JRE8 from Oracle site and setup the Java_Home and Path environment variables in Advanced System Settings.
Test that you have java installed correctly by running java -version on the command prompt.
If done correctly, eclipse will automatically detect your jre.
If the project needs the jre to be identified under Preferences as you were trying, you need to check where jre is installed on your machine. Normally it is either "C:\Program Files\Java\jre-version_no" or "C:\Program Files\Java\jdk-version_no\jre". Browse the location, give it a unique name (if it automatically doesnt detect) and it should let you add it.
download and install Jdk8 or JRE8 from Oracle site and setup the Path in environment variables then test it using command prompt, if it's working properly then ur good to go. Go to add external jar and u will find it as system jars, if u have multiple jdk versions then it will show u all the list, u just add the version u like ( I guess jre8). It's very simple steps, ask me if it doesn't work out. I can help u in remote installation also
I hava a mac and It has java JVM 1.6 that I use in eclipse kepler and I want to update the JVM to 1.8. How do I do that?
Simply install it (e.g. https://askubuntu.com/questions/464755/how-to-install-openjdk-8-on-14-04-lts)
Then add it to the JDK selection in Preferences/Java/Installed JREs:
You may have to search for the JDK path (e.g. in /usr/lib/java or /Libraries/java)
Install the JDK on your OS.
Then, check the preferences and look for Java->Installed JREs. Click add. (On Windows, it is Windows->Preferences, or Eclipse->Preferences on a Mac).
I've been having
Exception in thread "main" java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0
So I looked it up, and then updated both my JRE and JDK to 8th version.
But above the console, it displays:
System/Library/Java/JavaVirtualMachines/1.6.0 JDK ....
How do I make my Eclipse run in 8th version of JDK and JRE?
And do I need to change anything in my projects after upgrading?
Thanks in advance!
In Eclipse:
Select pull-down menu: Windows > Preferences
On left, select Java > Installed JREs
Click "Add..." and browse to your JDK/JRE folder
Rename if desired, e.g. change "jdk1.8.0_51" to "jdk1.8"
Repeat if you want access to more JDK/JRE versions in Eclipse workspace
Check the JRE you want to be the default for your projects
On left, select Java > Compiler
Set compliance level to match the default JRE
Note: If your projects don't use the workspace default, then you need to update the project Properties.
Eclipse itself is running with the default Java, i.e. the java on your PATH. If you want Eclipse to run using a different JDK/JRE, you need to edit the eclipse.ini file. See the link provided by Tarun Gupta.
In Eclipse you have to change the Java location like below steps
Check for:
1) Proper java environment variable setup.
2) Right click on Project name in Project Explorer in Eclipse. Click on Build Path -> Configure Build Path. Check for proper path for Java Build Path.
Also check whether the latest version of Java is selected in Java Compiler -> Compiler Compliance Level.
3) Check from command line which Java is installed by typing java -version or java.
(Sometimes Java installed from command line in Linux systems installs old versions)
I recently downloaded Eclipse Portable to do some Java Programming anywhere. I also downloaded Java Portable.
How can I integrate Java Portable with Eclipse Portable?
I know that on the "installed" version of these two, I need to set up the CLASSPATH, PATH and JAVA_HOME variables in order to use the Java Compiler(javac.exe)
How can I set this up on a thumb drive? How can I tell Eclipse to use my portable Java?
Please help me, and if possible please be specific and detailed procedure-wise. I am planning to deploy these applications on Windows XP/7 machines.
Any efforts to answer my question will be greatly appreciated!
The following instructions use the folder /apps as an example, but any folder should work.
Download and install Eclipse Portable to any folder. (64 bit or 32 bit)
Download and install the Portable Java Runtime Environment
For 64 bit users: Install Java Portable (64 bit) to /../CommonFiles/Java64
For 32 bit users: Install Java Portable (32 bit) to /../CommonFiles/Java
Open your Eclipse settings file ../EclipsePortable/App/Eclipse/eclipse.ini
Set the -vm as your portable Java installation. (Must be placed before -vmargs)
For 32 bit
-vm
E:/Apps/CommonFiles/Java/bin/javaw.exe
For 64 bit
-vm
E:/Apps/CommonFiles/Java64/bin/javaw.exe
Actually you should install it from within the program itself. I followed this post by berny23 and it worked perfectly (nothing else worked).
You just need the normal java runtime environment and not the
jdk:https://portableapps.com/apps/utilities/java_portable After
putting the files into the jre folder do this:
- Run Eclipse Portable
- Go to "Help" -> "Install new software"
- Select your eclipse version by clicking the small arrow next to "Add"
- search for "java" in the search bar
- Tick "Eclipse Java Development Tools" and hit finished.
- after installation click on "restart eclipse"
You need to set java compiler in eclipse from below path.
Eclipse -> Windows(one of the menu on top) -> Preferences -> Java -> Compiler