I started a project for a Minecraft plugin on Eclipse, i need to build a path, for the spigot jar file. When I did my first project, there was an option called "Add External Archives" that option doesn't show up for me anymore. It only says "Configure Build Path", I need help, I have been trying all day.
In Eclipse right click your project, click "Build Path" then click "Configure Build Path". Then a window like in the image attached should open.
In this window you click "Add external jar" and navigate to your spigot server jar. Wen you have selected the jar file, you click "Apply and close".
Related
My Maven project in IntelliJ Idea have no resources folder both in main and test folder. I know how to manually create those folders and update pom accordingly, but how can I do it automatically in IntelliJ Idea? In Eclipse there is an option like "Update project".
First you want to right click on your project and choose "Add Framework Support" to allow Intellij to recognize that this is a Maven project. Assuming that you have your pom.xml ready, right click on it, hover over on "Maven" choose "Reimport" and/or "Generate Sources and Update Folders"
In the Eclipse IDE, using the Java Development Tools (JDT), you can add a Java project as a reference for another Java project by configuring the Java Build Path. Go to "Project > Properties > Java Build Path". Under the "Projects" tab, add the referenced project (assuming it is in the same workspace). How can I get projects referenced in this manner to show up in the Project Explorer (or even the Package Explorer or Navigator) view(s)? If, under the "Libraries" tab, you add a JAR or Library, it shows up under the "Referenced Libraries" node. Is it possible to do something similar with projects from the build path?
Thanks.
I have a folder at the root of my Eclipse Java project to hold configuration files for the application and log4j2. The only way I can get the in IDE build to work is to add that folder to the Java Build Path of the project.
I need to exclude either this folder or the files therein from the JAR file export. This will allow it to look in the same folder for those 2 configuration files.
Right click on the project folder in the Eclipse Package Explorer.
Select "Build Path", then, "Configure Build Path".
Go to the "Source" tab that appears. (You should be automatically selecting "Java Build Path" in the left hand side of the popup window)
Open the folder for your project, and click on "Excluded", then click "Edit" on the right hand side.
From this window, you should be able to click "Add..." in the exclusion patterns. The dialogue box should have a "Browse" button that will allow you to exclude specific classes or packages. The input also accepts wildcards.
You could pack your dependencies project into jar(wihout excluded files). Then pack as previously.
I was developing some projects over eclipse, but my Eclipse crashed and I need to reinstall it. but how can I open my previous works as Project in Eclipse. I made it a zip file but its not working from Import.
Go to import>Existing Projects to Workspace>Select Root directory
uncheck the "copy projects into workspace" selectbox, and then click "refresh" button, you will be able to import the project
A very common problem.
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