I am having problem running my grails application from grails GGTS IDE.
I had to format my harddisk so i had to reinstall all new software. I had a copy of Groovy/Grails Tool Suite. I didn't need to install it since it was stand alone so i just ran it. Since i didn't have java installed i installed jdk 1.8. so now in the path C:\Program Files (x86)\Java i could see both jdk1.8.0_65 folder and jre1.8.0_65 folder.
Now i imported a git project by doing git clone from ggts. Now the final thing i did was that i went to window > Preferences. There in Java > Installed JREs in the right side i clicked on Add.. chose standard VM and and clicked on Directory ... for JRE home and then located the jdk location. c:\program files(x86)\java\jdk1.8.0_65.
After following these steps i get the following error message.
"The project was not built since its build path is incomplete. Cannot find the class file for groovy.lang.GroovyObject. Fix the build path then try building this project"
am i missing any other configurations? if so, please let me know. I appreciate your help!
Note: One thing i am noting is that when i go to properties of the project and select java build path and select libraries and there is JRE System Library [jdk1.8.0_65]. I expand it and there in Native library location i notice it has (None). Does this have anything to do with the errors i am getting?
Did you try to right-click on project and "Grails Tool -> Refresh Dependencies"?
It's also possible to execute it from command line (confirmed on Ubuntu):
grails compile --non-interactive --refresh-dependencies
Related
I'm doing a Java project which involves JavaFX. I'm using Eclipse Oxygen with Java 8 (java-8-openjdk-amd64) and I installed the Eclipse plugin e(fx)clipse.
I don't understand why this project has two errors:
The project was not built since its build path is incomplete. Cannot find the class file for javafx.geometry.Point2D. Fix the build path then try building this project
and
The type javafx.geometry.Point2D cannot be resolved. It is indirectly referenced from required .class files
I searched on StackOverflow for similar problems, and tried some settings changes but nothing solved my problem.
I tried to change the access rules in the Build Path of my project: Build Path > Configure Build Path > Libraries > JRE System Library > Add a new rule
I added different rules: javafx/**, changed it to **/javafx/** but nothing changed.
This project works well in Windows, I opened it with Eclipse on Windows and everything works fine.
Do you have an idea on how to solve this problem?
EDIT: Accepted answer: $ sudo apt install openjfx
It looks like you haven't installed JavaFX. Because some parts of JavaFX are not compatible with the distributions open source licenses, it often is not part of the packages shipped by default.
If you're using Ubuntu, you can install it using sudo apt install openjfx.
For further reading have a look at JavaFX and OpenJDK.
While trying to do a maven compile goal on a jar project in eclipse it failed stating that there was no java compiler found. It showed that it was using the path to jre1.8.0_45. My configured java build path in eclipse is using jdk1.7.0_80 and is configured for the correct corresponding environment.
I tried to rename the jre directory while eclipse was open but it showed that something had a lock on it, and sure enough it was eclipse that was launching with jre1.8. If I renamed the jre1.8 directory while eclipse was closed, then it would not launch again complaining that it cant find the java directory.
I guess what I'm getting at here is, is this a bug with Mars? Or am I missing something because everything in Eclipse is pointed to 1.7.
Thanks,
Nate
You should point Eclipse to JDK installation.
Window -> Preferences -> Java\Installed JREs
click Add -> Select Standard VM, Next ->
and then in text box "JRE home" you should put path to JDK home,
it's quite misleading..
BTW you should specify java version in maven-compiler-plugin. M2E plugin will then recognize this settings and configure compiler appropriatelly
http://www.gamefromscratch.com/post/2011/11/15/Telling-Eclipse-to-use-the-JDK-instead-of-JRE.aspx
It's the launch configuration of any m2e build that should point to a full JDK, cf. http://help.eclipse.org/mars/topic/org.eclipse.jdt.doc.user/tasks/task-choose_config_jre.htm?cp=1_3_5_2 (except you will be using a Maven Build configuration, rather than a Java Application).
For most other situations using a JRE should be perfectly fine.
I've been working on my desktop computer which has openjdk 7.
When I copy a Grails project onto my laptop, which has Oracle's JDK v7, I'm having a problem with the classpath.
I've checked the classpath and everything seems fine.
Here's the text that GGTS shows:
The archive: /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar which is
referenced by the classpath, does not exist
I set the JAVA_HOME inside /etc/profile.
I installed gvm in order to make easier Groovy and Grails setup.
I hope you could help me
:)
I then went to the RUN menu option at the top and selected run configuration
It was on : Grails \ {Myproject} (run-app)
On the right for this run-app there is JRE options
under JRE ensure you have the same JRE defined as project in this case 1.6
I'm guessing that your JRE reference in your project is bad. Is your desktop windows and your laptop a mac or linux (or vice versa)?
Try these things:
Does the /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar path exist on the broken system?
Can you create other kinds of projects on the broken system?
Can you create a new Grails project from scratch inside of the broken GGTS?
What happens if you run Grails -> Refresh dependencies on the project?
I did an upgrade of my windows OS and restored my eclipse workspace from my backup. Now, when I try to open any of the older projects, they complain with a message:
Unbound classpath container: 'JRE System Library [jre6]' in project <ProjectName>
When I looked around, I found pages which suggest that I change the JRE version for the project. However, I have about 50 projects in this workspace and do not want to change the value for each of them.
Any suggestions would be welcome.
Thanks and regards,
Karthick S.
You should add a new JRE and name it [jre6] (or rename your current JRE). That will prevent you from changing manually your 50 projects.
Window -> Preferences -> Java -> Installed JREs -> Add...
The problem is that if you backed up the eclipse project files, then these contain information regarding paths to your JRE or JDK install and any external jars (specific to your last install). There are 2 files that you can edit with any text editor to fix this problem .classpath and .project.
Other option would be to delete the classpath and project files and try to import the project as java project using File > Import.
I went through and uninstalled all Java from my computer. Then I installed JavaSE JDK1.7. I then modified Eclipse configuration so it would start and opened it up. I have an Ant script to build my project and I want to build my project against 1.7, but whenever I run the script, it says
'Launching PROJECT build.xml' has encountered a problem.
Specified VM install not found: type Standard VM, name jdk1.6.0_21
The installed JRE in Eclipse is 1.7 and nothing else. I cannot for the life of me find how to change what Ant is looking for.
This is because you still have the old JDK configured as JRE in the External Tools Configuration" in eclipse - open it via the arrow menu next to this button in the toolbar: , then change it to the Java 7 JDK.
In Eclipse, click the ant file -- Run As -- External Tools Configuration and click on the JRE tab.
Select "Run in the same JRE as the workspace"
Delete the "C:\Users\%USERNAME%\workspace.metadata.plugins\org.eclipse.debug.core.launches\%PROJECT_NAME% build.xml.launch file"
That solved problem for me.