I'm using Netbeans version 15 and JDK 11.
When I want to open a class referenced in a project that belong to another project, by Ctrl + click on that class Name, Netbeans open a read only version of this class, that appears to be located in Netbeans cache in:
C:\Users\myUser\AppData\Local\NetBeans\Cache\15\packageName\myProject.jar
The project of the class I want to open is in my project list and in my .m2 repository, and I built it (clean and build).
Why can't Netbeans open the class from my sources? Is there a configuration setting that I have missed?
This worked perfectly with my previous version of Netbeans (12) on a laptop.
What I have already tried: Clean and build the project of the class that I want to open.
Related
Just a beginner in android,
Was trying to learn Android and socket IO interaction. So picked up a opensource hello world project as mentioned. But I am not getting how to run such gradle project to my virtual AVD. I have eclipse and Android sdk on ubuntu 14.04. Thanks
You can generate eclipse project by using gradle eclipse plugin.
In your build.gradle,
apply plugin: 'eclipse'
and with running the following gradle task,
$ gradle eclipse
eclipse project will be generated. Another solution would be just using the gradle plugin for eclipse.
But I strongly recommend you to switch your IDE to AndroidStdio when it comes to Android development.
I have a simple trick to import Android Studio Projects in Eclipse.
Create a new Android Project on Eclipse with default settings.
Go to the workspace folder and open the project folder.
Now in parallel, open the gradle project in another folder.
Open the main application folder where the following folders/files will be there: java, res and AndroidManifest.xml
In you eclipse project (that you just created) folder, open the src folder and delete the contents of the folder. Now paste the contents of the java folder (the one mentioned in step 4) (it will contain the complete source code)
In you eclipse project (that you just created) folder, open the res folder and delete the contents of the folder. Now paste the contents of the res folder (the one mentioned in step 4) (it will contain all the resources of the project)
In you eclipse project (that you just created) folder, you will also see the AndroidManifest.xml. Now replace it with the AndroidManifest.xml of the gradle project (the one mentioned in step 4).
Now go back to Eclipse, select the project you just created, hit F5 (to refresh the contents). Clean the project.
Note: If there are any library dependencies for the project, you will have to locate it on the internet (or locate them if available in the gradle project) and copy it in the libs folder for you eclipse project. If the library is given as another project, follow the above steps again, right click on the library-project, and check the is Library option and import it as library in the application project.
Hope this helped. Cheers :)
I have a project ProjectA in Eclipse that is checkout through SVN. What I want to do is remove this SVN project locally and create a new, purely local project also called ProjectA. So I disconnect first, then delete locally, then try to create a new ProjectA. However upon creating this project the connection re-opens!
You could go to the project in you file explorer / outside of eclipse and delete all the .svn folders. If you are using svn 1.7 client or above then you're lucky and have only one folder in the first level of your working copy, otherwise you'll have to delete that folder from each sub directory in your working copy.
Import the project back to eclipse as java project.
I downloaded and extract jmeter's source code: http://jmeter.apache.org/download_jmeter.cgi
How do I go about opening this project in IntelliJ?
I tried to 'open project' and navigated to the directory, but it doesn't seem to pickup any of the files to open the project.
Do I have to import or something?
Create a new project over existing source--you can't open a project when there's been no project set up.
IntelliJ will pop up a window with the source directories it discovers; by default they'll all be checked.
You can add the Ant build file in the "Ant Build" tool window to make Ant builds easier.
UPDATE
Since JMeter 5.2 it uses Gradle instead of ant, you can easily import the project into IntelliJ like so:
You require IntelliJ 2018.3.1 or newer.
Open the build.gradle.kts file with IntelliJ IDEA and choose Open as
Project Make sure Create separate module per source set is selected
Make sure Use default Gradle wrapper is selected
In the File already exists dialogue, choose Yes to overwrite
In the Open Project dialogue, choose Delete Existing Project and Import (if IntelliJ project already exists)
ORIGINAL
These are the steps I followed to get the JMeter source code into IntelliJ. I've included some screenshots on my blog.
Import project from Git: https://github.com/apache/jmeter.git
Select "Create project from existing sources"
Name the project
Select all source file directories
Deselect any libraries, (add them later)
Select all of the discovered modules
Select the SDK (you might need to add one if you've not used IntelliJ before)
Press Next and then Finish
Click the "Ant Build" menu in IntelliJ
Press add and add the build.xml file
Run the download_jars target
Open project settings (Ctrl+Alt+Shift+S) then add the downloaded jars to the project
Notes:
You can compile and start the GUI by executing the run_gui ant target
If there are any errors in IntelliJ when viewing files (or pressing build project) you can usually solve them by pressing alt+enter on the offending code and making the appropriate 'module' a dependency - however this shouldn't stop you developing or running things via ant.
I've also created a screencast of the above steps:
https://youtu.be/r0Z79PjEb80
I had a Java project in Netbeans IDE, which I had to move to the Eclipse IDE. As we all know, the folder structure of both these IDEs is different. I already had the Netbeans version of my project checked-in on SVN repository.
Now, I want to use the same SVN location to check-in the Eclipse version of the same project with the same name. Since I created a brand new Eclipse Java project on my local and just copied the source files from Netbeans to Eclipse, I obviously do not have the '.svn' folders in my project.
How to do this?
Thanks!
just take your "eclipse" project and copy it back over the netbeans one - then commit the result
you will get both in 1 folder (if i understood your setup correctly)
(HELIOS Eclipse, m2eclipse is installed from the update site)
I am creating a new web application: File->New->Other->Maven->Maven Project, Next, Next, then selected maven-archetype-webapp, added a Group Id and Artifact Id. Now in the newly created project I want to add a new java package: right click on , new -> package. Inserted package name and click on finish.
And I'm getting a new folder. Eclipse does not recognize this as a package.
What should I do to make Eclipse recognize that folder as a package?
Many tia,
DHR
The maven-archetype-webapp does not generate a src/main/java folder by default and if you want to add Java sources in your webapp, you need to create src/main/java yourself.
Once this directory has been created, right-click on your project and then use Maven > Update Project Configuration and it will get added as source directory. Then you'll be able to add sources.
Last thing, either use the maven-eclipse-plugin or use m2eclipse, not both, they are mutually exclusive.
It should work. You can mark the folder containing the package as "source folder" in eclipse, but only as a fast solution...
I usually work with eclipse wihout m2eclipse, and I run mvn eclipse:eclipse to generate the eclipse project. Maybe you can manually fix this running the command now (from eclipse with the plugin or from mvn directly).