I'm looking (if it exists) a way to import few XCode java projects into eclipse, maybe a plugin or something that starting from a pbxproj file, generates an eclipse project (.classpath + .project).
After many searches on the internet I reached this URI:
Migrating from XCode to eclipse.
There you can read this:
Migrating with a script is pretty easy and it is not a complex script, it just copies files and puts Java classes into the package structure. The script does not do everything, it just takes the drudgery out of it. You will want to convert all the frameworks before the applications as the applications will need the frameworks to build.
The first step is to create a new Eclipse project, a Wonder Application or a Wonder Framework, and give it the same name as the Xcode project. This does NOT mean you will be using Project Wonder, it just refers to a project layout developed for Wonder.
cd into your Xcode project, Run ./fleeto /path/to/eclipse/project, Refresh the project in Eclipse (select and press F5 or use the context menu), Repeat for other frameworks and applications.
For working in Eclipse you will want to have the framework projects included as required projects in the applications and frameworks that use them. For each project, Properties - Java Build Path is the central place to manage your project. Select the Projects tab and add the framework projects that this application references.
These project dependencies work in Eclipse but not for deployment. For deployment you need to reference frameworks from their installed location. Install the framework (see Install on the context menu).
Then go to the Properties - Java Build Path - Libraries tab and configure the WO Frameworks library. Expand the nodes and select the installed framework(s).
REMOVE the checkmarks beside the ERJars and ERExtensions framework if you are not using Project Wonder. Finally, adjust the order on the Order and Export tab so that required projects appear before the WO Frameworks Library. Doing this ensures that Eclipse uses the current code and not a previously installed version.
Related
i'm currently working on a Lexer in Java, i'm using jflex to do this, when my partner runs the code it works, he pushed it into a repo in github. I cloned it and when trying to run it, it says it cannot find a symbol which is Lexer, this is a class that jflex creates. I
I was expecting to be able to use the jflex library, which is stored in the lib directory in the project, also, in the .vscode directory we created a settings.json in order to be able to use it, we thought it worked but apparently when someone clones the repo it doesn't work. How can i solve this?
Download needed library
Commonly, projects uploaded to GitHub omit the various libraries needed by the app.
So you will need to manually obtain the needed library, usually a JAR file. Then place that JAR file in a location accessible by your project.
When deploying your app, you will need to either include the library within your app, or make the library available on the runtime computer.
Dependency management & build tool
Needed libraries are referred to as “dependencies”.
If doing any serious work in Java, I strongly recommend you learn how to use an IDE (such as IntelliJ, Eclipse, or NetBeans) in conjunction with a dependency management tool (such as Apache Maven or Apache Gradle).
Tools like Maven & Gradle will automatically locate a copy of your declared dependency libraries, automatically download from a repository, and then install within your project.
These tools (IDEs, and dependency managers) do come with a learning curve. But that learning time is well spent if you are invested in being a Java developer.
So I installed Apache Netbeans. Installed some of the plugins and instead of just seeing the Java folder in the categories when I want to create a new Project, I see this:
What is Gradle, Ant, and Maven? I am not familiar with Java and wanted to study the language, but I have no idea of what these are.
I keep seeing that I need to have certain plug ins installed and active.
Here they are.
Ant, Maven and Gradle are Java build tools. You don't really need to know the exact differences though.
Java with Ant
The "Java with Ant" option uses NetBeans' own internal project format (based on Ant). In older NetBeans versions this category was simply called "Java"
If you don't need to share your project with non-NetBeans users, use that option.
You will have to manage dependent libraries yourself (download, add them to the project) unless you are only using libraries and frameworks that are bundled with NetBeans. The turnaround times (the time it takes between you hit "Run" and the application actually starts) are the shortest with this option, as Maven and Gradle add substantial overhead to that.
Java with Maven
Maven is a standardized dependency and build management tool. A project defined with Maven can be used by everybody else as it automatically manages (and downloads) any dependency.
Use that option if you know you need to share your project with other people (e.g. hand it in your school or university).
Java with Gradle
Gradle is yet another build tool, which also manages dependencies for your and has more flexibility than Maven. However the build scripts are less standardized than in Maven. But that is also a good option if you know that you need to share your project with other people.
Unless you are using NetBeans 11.1 (which is currently in Beta) I would not use this option as Gradle support in older versions is not as good as Ant or Maven support.
You might want to go through the tutorials on the NetBeans homepage:
http://netbeans.apache.org/help/index.html
I'm used to Visual Studio, so Eclipse is very new for me.
I have to start (ASAP) developing a project that contains 3 subprojects:
1 - Business logic library with Hibernate support
2 - JavaFX configuration utility
3 - Spring MVC app with a lot of JavaScript inside
2 and 3 use 1 as a core.
I've tried to google manual but all of them were about parts of this task, nothing about the complete solution.
I can create all 3 projects and put them in same subdirs in a solution directory. But how to connect them to core lib? Maven looks great for it, but I can't explain him how modules have to be connected.
How to make such a structure?
At the risk of being shot down in flames, in my opinion Eclipse does not handle structured projects as well as Visual Studio. (I program Java/Eclipse at work and use VS aka Atmel Studio at home for hobbyist C++/Arduino projects).
In Eclipse, I have found to best to check out each component to the top level and compile each component separately (mvn clean install). The output of this is generally a .jar file that will be installed in your local maven repository. You then list that jar as a dependency in the pom.xml file of the higher-level components.
I suggest you install M2Eclipse or some other Maven client into Eclipse. They are not perfect, but are far more productive than doing everything manually.in my opinion.
Also Eclipse supports multiple workspaces quite well. One workspace per major multi-component project works well.
I created an IntelliJ (9) project, and it started off as a single maven pom.xml project.
This project is a spring mvc web application.
I now realize it will be better to actually have 2 spring mvc applications.
Since I use maven now to build and run the application (using the jetty plugin), should I create the 2nd spring mvc application in the same project?
If so, I guess I have to re-work the folders so it is like:
myapp-models/
myapp-spring1/
myapp-spring2/
So this way each spring app will have:
/src/java/main/webapp (or whatever it is, I used a simple web arch type)
Does this make sense?
Do I even bother setting things up in IntelliJ to build using the IDE? (using modules I think?)
Can I still build and run using intelliJ?
BTW, when browsing folders in IntelliJ, it is annoying to keep clicking through the first 3 folders since they are empty, is there a faster way?
This setup is just fine. You may choose which artifacts you want to deploy on Jetty. myapp-spring1 or myapp-spring2 or both. (Maybe artifacts were introduced after IntelliJ IDEA 9.)
BTW: I usually use "View as Package" in the Project tab. There you can select "Compact empty middle packages". At least in IntelliJ 10/11, but Im sure there is something similar in version 9.
You are correct in using multiple modules in Intellij. I create multi module projects all the time.
I need to have a Java EE project generate a WAR file automatically - preferably exploded - as opposed to choosing Export -> War file.
I have played with the various server definitions but have not been able to get either the Java EE preview or the HTTP server to work, and before installing each of the external container specific servers I'd like to hear if anybody has made this work.
So, question is: Which steps to take to have a WAR deployment automatically created and maintained by Eclipse?
EDIT: This is Eclipse 3.5 Java EE, and it is a Dynamic Web project in Eclipse. I want the WAR file/tree to be easily copyable to a network drive to be accessible for the target host. It runs an embedded Jetty, but I am interested in the generic WAR.
MyEclipse can do this, but we are standardizing on plain Eclipse.
EDIT: This particular web application will run inside an embedded Jetty. Since this question was asked we have found empirically that we need to have the complete tree containing the application with embedded Jetty, war file (exploded) and all built by the Hudson server in order to avoid human steps in the build-deploy-process. The answer for us therefore is scripting with ant (using ant4eclipse).
EDIT 2012: The ant4eclipse approach proved to be generally too inflexible and fragile in the long run, so we have switched to Maven. This solved very many problems, this one included.
Make an ant task to build the war (and copy if you like). Then add an Ant builder to the project (project -> properties -> builders). As long as your project is configured to build automatically the war will always be upto date.
This would equally work with maven, or pretty much any other build tool.
You should be able to do this with "File" -> "Export", scroll down to "Web" -> "WAR File" and follow the instructions
Have a look at this question. It refers to 3.2 version, but I believe that it still holds, until up to 3.4 version at least. It seems there is no automatic way of doing the Export - War thing.
Consider the solution given by Pablojim and drop the Export facility.