I'm working on a group project using IntelliJ, but my partners are using Eclipse. In IntelliJ I was able to place my csv files in my project folder and I am able to access them by just using the name of the file. However, my partners using eclipse are unable to use the csv files this way. The only way they have been able to is to type out the whole file location which obviously won't work if we are running the program on different computers. I don't have experience with eclipse is there a solution for this?
The default location for file I/O in Eclipse projects is in the root project directory. The Eclipse users will need to adjust their project settings so the default path is set to where yours is in your IntelliJ project.
Related
I'm developing Java application on Eclipse, using Gradle. From the application I want to access the files in src/dist folder. When developing, I can access the files by using the path src/dist. But when the application was exported to "distributed" style (by using Gradle task installDist), the relative path from System.getProperty("user.dir") to the files in src/dist will change.
What it the best way to access to those files seamlessly both while developing and after distributed, either by changing my Java source code or Gradle build script? I have come up with following ideas:
Add an option that indicates the actual location of the files. When running on Eclipse I can add the options to the Run Configuration.
Check if the program is running inside jar. I can do it by checking getResources() or something.
Please tell me if you have better way to achieve this, or what is the best practice from the viewpoint of maintainability.
So I am creating a java project with a friend of mine, he is using windows and I am using ubuntu. I didn't give it much thought because java is cross-platform but I am having trouble opening the project I cloned from our git repo that he created in windows. The file browser recognizes the project but when I open the folder with the intelliJ icon it only opens the iml file and the class files, but not the folders and I don't have a hierarchy on the left tab. So I am wondering if it is a problem with our OS or if its some problem with intelliJ.
How did you set the project up with Git? You should only be pushing your source files, and all others (such as the .iml) should be ignored. That way, any person using any OS or any IDE can easily set it up on their own.
Try removing all your files from git besides the source files. Now, if you clone it and set it up with IntelliJ, any IntelliJ specific files should stay locally, and only source files will be pushed.
I am trying to import a projetc (in ZIP file) in my netbeans. It is downloaded from GitHub (link: https://github.com/varavell/OnlineBookStore). While importing the project from Zip it shows the error and no project becomes imported. At the same time, at the bottom right corner it keeps unpacking of the project (never finish it though). Why this happening and how can I run a complete project into netbeans?
The worning is:
This warning (No NetBeans projects added) can happen if the zip file was created manually. To avoid this create the ZIP file in NetBeans using File > Export Project > To Zip...
Unzip your project and then open Netbeans. Go to File > open > your project file
You need to have one of the projects that Netbeans recognizes in the zip file.
This particular project has no pom.xml, build.xml or nbproject directory.
You will need to create a new project of the appropriate type and extact/copy your sources from the zip into it.
It's not possible to know what the problem is from the information you're providing.
It might be that the zip is corrupted, that the zip is not correct, that the zip contains a project in an unrecognized format, or that it's a bug with netbeans, for example.
You need to provide the NetBeans' log at least. I'm currently on cellphone, so i can't tell you where to fimd it, but you can find it yourself after a simple google search.
As for an immediate solution, since the project is on GitHub, you can simply clone the project using Git (inside NB). Or create a new project and manually replicate the files from the source-codes and file-structure visible on GitHub.
If you try to import a web project. first of all plugin web tools JSF, RichFaces etc. and then you will import your NetBeans web files.
and then Export Project > To Zip.
You should extract your project from the zip first. Then add it from file system.
I am trying to use the integrated git in Intellij IDEA. On the first computer, everything is fine. Files are uploaded correctly.
However, when I try to pull the project on another computer, although all files are properly downloaded from GitHub, Intellij IDEA could not correctly recognize the project structure.
Only files in the root directory are recognized, the src folder and files in it disappeared.
I have two screenshots here:
Project Structure inside Intellij IDEA
Actual Files on the disk
I am using Windows 10 on both computers, running the latest version of Intellij IDEA and git.exe. The project is hosted by GitHub.
If you are using Windows....the go to your project root path and type this command
**git stash**
i am using Bitbucket and sourceTree on machine so sometimes i am getting the same situation and using this command i can able to get all the code.
Im writing a server based application and i would like eclipse to be able to interact with it.
I was wondering if eclipse PDE can handle using an external jar to interact with RabbitMQ. Also would i have access to the editor i.e. could the server respond and then update the code on the users end inside the editor pane?
Also if anyone knows any good resources for eclipse plug-in development that would be great as the only books i can find on amazon are a few years old
Thanks,
Ben
You can include any JAR in your plugin and write code that uses it.
Copy the JAR into your plugin project (usually they're placed into a lib folder in the project).
Open your plugin's manifest or plugin.xml file and go to the Runtime tab.
In the Classpath section, use the Add... button to add the JAR.
Go to the Build tab and make sure the JAR is selected at least for the Binary Build.
Save.
Now you should be able to write code that uses the JAR and when you build your plugin it will be packaged in your plugin.
If you find that you'll be writing multiple plugins that go together and all use the same JAR(s), there's a better way to package it, but I'll leave those details out for now.