I am trying to configure Grails in Netbeans.
Grails version:3.2
Netbeans: 8.2
JDK: 1.8
OS: Windows 10
I have install and configured environment path and other stuffs. I can create and run project from the Command Prompt. But I can not create project from netbeans.
Warning |
Unrecognized flag: non-interactive.
Error |
Specify an application name or use --inplace to create an application in the current directory
This error is showing, to create project from Netbeans. I can run the created project though. I have already added Groovy plugin.
How can I solve this problem?
I don't think you are doing anything incorrectly. I have an environment very similar to yours (Grails version: 3.3.2, Netbeans: 8.2, JDK: 8u151, OS: Windows 10) and I see the same error: Specify an application name or use --inplace...
This is a known issue with NetBeans 8.2 that has already been bug reported; see Bug 258407 - Error when creating a Grails 3.1.x project. The problem has been confirmed to exist in Grails releases 3.1.0 up to 3.1.4, but I see the same issue in 3.3.2, and there is no fix for NetBeans 8.2.
However, I successfully created a Groovy/Grails application using JDK 8u151 with a DEV release of NetBeans which you can download from here: http://bits.netbeans.org/download/trunk/nightly/latest/
Note the caveat that comes with using DEV releases of NetBeans:
These builds are still under development and could contain defects
that lead to data loss. They are meant for evaluation of new features.
As always, be sure to back up your changes if you use these builds on
your production code.
As long as you can you can live with that situation, using a DEV release is your (only) solution for creating Grails 3.x applications in NetBeans.
One final point: unlike NetBeans 8.2, DEV releases of NetBeans support Java 9 as well as Java 8, but don't use Java 9 when creating a Groovy/Grails applications. It won't work for a completely unrelated reason.
I'm using Windows 8 and Grails 3.3.8, but the following worked for me:
Create the project using system command line (I used instructions in this page: how to create grails project through windows command promt).
Import the project to Netbeans 8.2 by clicking on File > Open Project... and selecting the project folder.
This solution works for me (Mac OS)
1) Open de console inside Netbeans
2) Navigate to your GRAILS_HOME/bin
3) Type grails create-app [YOUR_NAME_APP] --profile=web (rest-api, etc)
4) The project must be created at GRAILS_HOME/bin/[YOUR_NAME_APP]
5) Do not try to import into Netbeans instead of it Open the project
6) Start coding!
You can move the folder GRAILS_HOME/bin/[YOUR_NAME_APP] to the Netbeans workspace before open the project.
FYI, I am using netbeans 9 and grails 3.3.8 (dont use 3.3.9, its broken), and it works like a dream. I can create domain classes etc. from the menus in netbeans, run, debug etc. THe only thing I had to do was manually install the grails plugin for netbeans, and configure my grails paths etc. The answer on how to set this up is here: how to open a grails 3.3 app in netbeans 9?
The only thing I cant get to work (and its a bit of a show stopper), is multi-module projects (i.e. a grails app which depends on a grails plugin). I can run them, but netbeans does not recognise any of the imports so there is no code completion and it shows all files are having errors. What a shame, as appart from this, netbeans has very good grails support.
Note, I always create projects on the command line, e.g. "grails create-app myapp ...", then simply use the open project menu in netbeans and it instantly recognises them as grails.
Ensure you have gradle plugin installed for netbeans. Then go to File -> Open Project.
You should see the project shown by netbeans as a gradle project.
Related
Disclaimer: I am new to Java, new to Linux, and new to Netbeans - apologies for any over/under explanation - please ask and I will add/remove info.
I have a model written in Java in Netbeans 8.2 that has been successfully running in NetBeans 8.2 on Mac OS. This version of NetBeans was downloaded with JDK8u171 (JDK/Java package).
All components of the model have successfully transferred through FTP (filezilla) to a remote Linux machine.
The Linux machine has a copy of Netbeans 8.2 and has java/1.8.0-oracle (and 1.6.0 and 1.7.0), and has java/1.8.0-openjdk (similarly, 1.6.0 and 1.7.0 also).
I am assuming that 1.8.0-oracle is the equivalent of JDK8u171 but I may well be wrong.
When I load netbeans using
module load java/1.8.0-oracle
module load netbeans
netbeans
The program opens (via remote desktop - x2goclient), and I can search for the project and open it.
Once open, I see:
'myprojectitle (broken)' in the project window on the left of the NetBeans GUI
right click -> resolve problems
...opens a screen saying
'The JDK is missing and is required to run some NetBeans modules Please use the --jdkhome command line option to specify a JDK installation or see http://wiki.netbeans.org/FaqRunningOnJre for more information.'
Does this mean I am using the wrong jdk/java package?
Or is the jdk package configured incorrectly in Netbeans, if so how can I reconfigure?
Any help would be greatly appreciated.
The solution to this was found at
The JDK is missing and is required to run some NetBeans modules
Whereby, java/1.8.0_171 needed to be installed and then netbeans needed to be opened as follows:
netbeans --jdkhome /path/java/1.8.0_171
Apologies for a repeat, but hopefully this answer can either redirect or offer a solution
My Java specifications: JRE: 1.8_u60, JDK: 1.8_u60
JAVA_HOME is set-up correctly.
I´ve downloaded and installed the latest Eclipse Mars Java SDK (Eclipse Mars.1 / 4.5.1) from the official Eclipse download page and used the installer.
I used the Eclipse update site from e(fx)clipse to install the JavaFX IDE.
As described in the site´s tutorial I should now be able to create FX projects with File > New > Other > JavaFX ...
But unfortunatelly I don´t have any option to create an FX project. There is no sub-section called JavaFX.
How do I set up JFX for Eclipse Mars properly (if my setup does not work at all)? here is one more similar Question asked.
Remove the installed plugin and try installing it through Marketplace.
Edit after the answer was accepted:
Just for clarification, it should also work in the way OP has tried it. Before one tries to troubleshoot why it's not working, it is very convenient to verify that the installation is not working from marketplace either.
Since JavaFX is now on default classpath, you do not need any extra plugin to create a JavaFX application. You can just create a simple Java Project in Eclispe and get started.
But, e(fx)clipse is recommended to install on Eclipse because of the extra features it adds to the IDE.
I just finished installing the e(fx)clipse plugin on my Eclipse Mars to check if your scenario can be reproduced, but unfortunately after installing the plugin & restarting Eclipse, I can create JavaFX projects.
You can either try restarting Eclipse or re-install the plugin again.
As mentioned in previous Question by tomsontom, you can check your status of e(fx)clips bundles. Or you can use All-In-One Download.
I am facing setup issues in my eclipse Kepler on Ubuntu 12.04 on Virtual box.
Firstly i was facing issue same as:
Eclipse Open declaration in Java project
I tried everything mentioned here, but nothing seems to be working for me...
Then I explored some more, and get another error message similar to:
I am getting resource not on the buildpath of the project
As per its 1st answer, 2nd point go to "Java Build Path", I tried going there, but i cannot find any "Java Build Path" section in my project property.
When I click on Project properties, it shows only options given in the following screenshot:
I know this is some easy setup issue, but i am unable to handle it.
The answer is a write-up of the discussion in the comments:
If you are on Ubuntu 12.04 and install Eclipse you could end up with a bare-bones install without the Java Development Tools (JDT).
After installing the package manually via Help -> Install New Software and then searching for Programming Languages / Eclipse Java Development Tools Java development should work.
For maven projects you should use the import Existing Maven Projects instead of importing it as a java project.
I am using play framework 1.2.4,and also trying 2.2.1.
In 1.2.4,I created a new play framework based project by using
play new wonder
then I entered its directory,and ran this command
play eclipsify
It was done successfully.And I imported it to eclipse,it worked,but was not pretty good,you will see why
(I am new here,and I don't have 10 reputation to post images,so I post images to another website,link is follow)
http://imgur.com/P3J6zSy
(Here is another screenshot that shows the result of what I have done in Ubuntu 12.04 with play-2.2.1
http://imgur.com/zkDTtvY
)
The related jars were just listed in the root directory,and it was so long.
First,how can I make it not list in that way?
Second,as what you see,these jars were linked to this project rather than copied to the sub-directory of this project.
If I want to make them copied to the sub-directory of this project when generating eclipse project,what should I do?
ps:
When I trying 2.2.1,there are not much different.If you know how to do in any one of these 2 versions,just tell me,thanks a lot!
Instructions for importing a new Play Java project into Eclipse, tested with Play Framework 2.2.1 and Eclipse Standard 4.3.1:
Download and install Eclipse.
Create a new Play project. When asked, select the Java language:
$ play new myapp
Change to the new application's directory:
$ cd myapp
Generate the Eclipse project:
Without including library source code:
$ play eclipse
Including library source code (may take a long time for downloads and a few sources might be missing):
$ play "eclipse with-source=true"
Import the project into your Eclipse Workspace with File | Import | General | Existing Projects into Workspace.
Result:
For more information see Setting up your preferred IDE.
Well, the post is answered already but these commands are not supported in new versions of play.
For users who are using new versions of play, here is the step by step guide for creation and import of play project in eclipse:
**Prerequisites:** java 1.8
type in terminal
java -version
to check if java is installed.
you should see something like:
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
If it is not present then you can download from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html To Create a new application using SBT you must have sbt 0.13.13 or higher installed (download from here https://www.scala-sbt.org/)
open terminal and type following command to generate java project.
sbt new playframework/play-java-seed.g8
if you are on windows platform use sbt.bat instead of sbt
sbt.bat new playframework/play-java-seed.g8
use following command for a scala project:
sbt new playframework/play-scala-seed.g8
sbt.bat new playframework/play-scala-seed.g8
After that, use
sbt run
and then go to http://localhost:9000 to see the running server.
Now, you have successfully created your scala or java project.
Next step is importing it to an IDE. Lets' import it to eclipse. If your project contain mixed code java + scala then you have to download scala ide plugin to you eclipse. open eclipse -> Help ->Install new software -> click Add -> Add repository
Name: scala ide
Location : http://download.scala-ide.org/sdk/lithium/e47/scala212/stable/site
click Add.
After successfully adding the scala ide add following dependency in your project/plugins.sbt file.
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.2")
You must compile your project before running the eclipse command. You can force compilation to happen when the eclipse command is run by adding the following setting in build.sbt:
// Compile the project before generating Eclipse files, so that generated .scala or .class files for views and routes are present
EclipseKeys.preTasks := Seq(compile in Compile, compile in Test)
After compilation of project go to your project folder and type
$sbt eclipse
The plug-in generates the two files Eclipse needs, the .classpath and .project files.
Once these files are generated, go to Eclipse and follow the usual steps to import a project into the Eclipse workspace: File → Import → Existing Projects into Workspace. Your project will then appear in the Eclipse Navigator, Project Explorer, Package Explorer, and other views.
I am not sure you got the answer of this question or not, for all those people who will face similar issue, after following all step given on official documentation, still i face same issue described in question, solution is that you need to open Scala perspective in eclipse by default it is J2EE
I wanna know how can I add Java Template Project in Xcode 4.
I'm working with Eclipse and it's really fine but i want to write Java program in Xcode.
Thanks for helping. ;)
Java is not a first class citizen of Xcode anymore, so you should in my opinion stay with Eclipse.
I realise this question is 6 years old, but I have a similar problem and found what seems an easy solution. I have an old Java project (2008-9) which I maintain but has been dormant. As I prefer to keep it into Xcode I transferred the whole project (sources, project files and all paraphernalia) to a new development machine running el Capitan with Xcode 7.3.1. I opened the project (which was still in 3.1 version) with it, and tried to build it. It failed as Ant was missing. So I downloaded Ant (version 1.10.1) and copied its bin and lib directories under /usr/local/ant, then I changed the project external build tool configuration (under project, go to Info, and you'll see that parameter) which was set to /usr/bin/ant and set it to /usr/local/ant/bin/ant or wherever you put it. Build again and this time it worked.