Xcode beginner (from Eclipse to Xcode) - eclipse

I want to learn Xcode in order to use its Obj-C, C, Java etc. project development facilities. I'm trying to start from the tasks I've done easily in Eclipse. For instance:
In Eclipse I used to create a new project and add a .java file with a main() whenever I wanted to test a snippet or a short algorithm that writes on standart output or console. I tried to create a java project in Xcode, but the templates given are ready-to-code complete mac apps, hence they are an overkill for a simple test. Starting out from an empty project, I began to notice that I had to write some shell scripts and some ant lines, also those codes had to be associated with "targets" and many other things that are not natural in Eclipse... It was overwhelming... so:
Does Xcode provide a simple solution like a Eclipse java project to aid those problems?
Where can I find (besides apple.com) an easy introduction to Xcode?
texeditor, java y javac are better options, and then is better to remain in Eclipse?

Stick to Eclipse for Java applications, use XCode for Objective-C or otherwise native Mac OS X applications.
XCode is no match to Eclipse when it comes to Java support: there's no such thing as a Java project, ant isn't there, it knows nothing about JVMs (e.g. you cannot use JVM version X for project Y), there are virtually no plugins for XCode (things you take for granted in Eclipse such as the web services tools, tomcat integration, etc).
XCode is the ultimate tool for Mac OS X applications as it's very well integrated with Interface Builder, which you'd use to build and manage the graphical resources of your application. It does a great job at managing Objective-C and C code, recent version have built in static analysis and all versions are integrated with GDB (the C debugger).

Related

How to tell which (java) build system eclipse uses?

When working with software projects that employ the Java programming language, there are 3 commonly employed build systems:
Apache ANT-IVY,
Apache Maven,
and Gradle.
Looking through the jungle of the Eclipse Interface each of those build buzzwords occur, yet this IDE gives me no clue what build system it actually uses?
How can I find out what Eclipse thinks should happen when I tell it to build the project?
If you don't set up any special then none of these system is used to build a Java project. The Eclipse Java compiler runs automatically as you type. Other builders written as Eclipse plugins run when resources change, you can see information about these in the 'Builders' page of the project Properties.
There are Eclipse plugins that add support for all the build systems you mention. They are used if you create a project specifying which system you want to use.

ANTLR and Eclipse (or any decent IDE)

I have been using ANTLR with Eclipse for some time using the ANTLRv3IDE plugin. While it is not perfect, and a bit outdated, it does its job reasonably well.
Now I am looking to switch to ANTLRv4 for another DSL that I am creating. However, Eclipse support seems to be extremely thin. I decided to try out ANTLRWorks, which is a NetBeans plugin, but I could not get it to install (it seems to be locked to specific dated versions (201302132200 while I have something newer, still 7.3 as docs say) of dependencies).
So, the question: Has anyone set up any Java IDE (preferably Eclipse, but I could be persuaded to switch if support is good for something else) to integrate with ANTLR? With integrate, I mean: code generate on save/keyboard shortcut and syntax coloring (at the very least). Code completion and other features are of course nice to have, but I could live without them for now.
I am well aware of Xtext and I have had great success using it for some projects, but unfortunately it does not fit the needs here (need no IDE support, need my own DSL model not based on ECore, etc).
I know ANTLRWorks can be run as a standalone application without a Java IDE, but that I consider to be a last-resort solution as it is extremely cumbersome to work this way (switch between application, files out of sync, no VCS support etc). I tried the other way around: to install the Java parts into ANTLRworks (which itself is a NetBeans distro), but it did not end well (it seems basic project support etc was stripped out of ANTLRworks).
Antlr4 plugin for Eclipse is here:
https://github.com/jknack/antlr4ide
ANTLRWorks 2 uses many non-public interfaces from NetBeans, which means it will always be bound to a particular version. The standalone download will always work because it bundles the dependencies itself.
The standalone build of ANTLRWorks 2.1 is available. This build includes support for ANTLR 4.1.
A new plugin build of ANTLRWorks 2.1 will be available once NetBeans 7.4 is released.
Moving forward, the code for ANTLRWorks post-2.1 is open-source under an LGPL license.
I think you have downloaded Netbeans 7.3.1.
Try download 7.3 from https://netbeans.org/downloads/7.3/ and install the ANTLRworks plugin there. (Link to the ANTLRworks Update Center: http://tunnelvisionlabs.com/downloads/nbupdates/nb73/aw2/updates.xml ).
Note that ANTLRworks v2 contains ANTLR v4.0, which is not the current version of ANTLR (4.1). So also download ANTLR v4.0 from the ANTLR download folder (The antlr-4.0-complete.jar file) and use it as library for compilation.
Now you can use nearly all things you wanted.
ANTLRv3IDE was opensourced. It should be compile-able for Juno. For stringtemplate (ST4) look at the Hastee plugin. It supports some of ST4 constructs.

Share java and android sdk versions in intellij

We have IntelliJ project and module files checked into version control. They great, but if we switch java or android sdks, everyone needs to do something on their own machine (update the sdk, add it to IntelliJ, etc.).
I found http://leolabs.org/blog/making-intellij-portable/, which explains how to set up configuration paths in IntelliJ, which allows us to share things like SDKs. My current plan is to follow that guide and check the IntelliJ install directory into our version control so everyone can run it from there, and it will have sdks all set up.
The problem I see with this technique is then other options are shared as well. That's great for coding style (though you can make coding style project specific, so that's not a real win), but not as good for things like visible white-space.
So my question is: Is there a more granular way to share java and android SDKs and have IntelliJ correctly point to them? Thanks.
SDKs and Global Libraries are referenced in the project files by names, like 1.7 for Java or Android 4.2.2 Platform for Android SDK.
The easiest solution is to agree about the common names for the SDKs and ask all the developers to configure the SDKs using these names (needs to be done only once and when you have to switch to the new major version of the SDK).
This configuration allows the developers to have actual SDK installations in different locations and is also OS independent.
If you decide to share global IDE configuration files (like jdk.table.xml), all the team members will need to have SDKs installed in the same place and it will fail between different operating systems.

Netbeans 7.3 annoyances

I recently switched from Eclipse to Netbeans 7.3 and experiencing a lot of quirks and i'm wondering if anyone else experienced them and/or got a solution. Because of these 'problems' i'm considering switching back to Eclipse again but i'm in doubt because NB has a lot of good things too !
These are the quirks:
when creating a new Java class, and make some typo's e.g. somewhere in a method, NB does not recognize / display the errors directly, but after a very long wait or a restart of NB.
This also happens to existing classes.
background scanning tasks is sometimes stuck at 100%
code completion does take forever. Don't even think about refactoring or renaming a class because it takes >3 minutes to scan the classpath (why, it's a new class for crying out load)
hot-deployment: changes are not always synchronized correctly with the (Glassfish) server.
Sometimes a complete undeploy and deploy is needed to reflect the changes made in the source.
NB manipules my pom.xml and glassfish-web.xml: it adds a deploy hint to the pom.xml and also changes or removes the context-root in the glassfish-web.xml. Please stop doing this!
Why o why can't i do a 'Fix imports' on my entire project. You can do a 'organize import' on the entire project, but this won't add the missing imports. See http://netbeans.org/bugzilla/show_bug.cgi?id=167031#c2
Running NB 7.3 on Windows XP, 3GB RAM, 2+GHz cpu
The project is a Java 7 maven project containing 12 modules / sub projects
I strongly recommend that you DO NOT attempt to install the ScanOnDemand plugin. It completely trashed my Netbeans, forcing me to use the Task Manager to kill the process. No existing projects were found; they were all listed as "unrecognized project; missing plug-in?". I had to re-install Netbeans.
One thing to look for is max heap allowed. Try adding "-J-Xmx2000M" to the Netbeans startup.
ref: Setting Heap Size
I suggest stick to your favourite IDE. Eclipse is still popular and Juno packages are doing good and Kepler is already available. You can try around latest packages.
IntelliJ IDEA looks better than other Java IDEs (light weight, faster, nice integration with SCM(source configuration) tools, possibility of easy cloud deployment, except that if you have freedom to choose your IDE whether you are part of a big/small teams, Otherwise there is no need to shift from one to other.
IntelliJ is the first IDE to give nice in-built support to Play framework
Google Android ADT is completely moving towards AndroidStudio based on community version of IntelliJ IDEA for faster and better GUI and app development.
As a Java developer it is not bad to try the other IDE to do some experiments or for any reason it strikes your mind.
Eg: Netbeans comes with sample apps in Java EE,Java7/Java2EE which looks better, nice examples for websockets, Servlet3.0, NIO examples etc,...but just try it or just ignore if it does not work. It is very easy to generate Entities from Database Tables, creating REST Endpoints in NetBeansIt may come with lot of in-built plugin-support for various java frameworks like RESTful webservice frameworks, JSF2.x, Primefaces3.x, SpringMVC, Struts but you may not sure to use the same version of framework. Some plugins may not work sufficient according to your business needs. Even if you okay with existing version it is not very friendly to develop Rich real-time UI development because Netbeans with Primefaces, instead you need to manually create XHTML templates.
Netbeans comes with nice support for Glassfish and tomcat, (other servers I am not sure but support is in-built). You can remote deployment with ease. Netbeans learning tutorials on JavaEE nice for beginners in the subject.
Netbeans also available as zipped bundle, hence no need to install even on Windows machines.
Eclipse has got better support with Java RoboCode learning tool (initiated by developed by IBM long ago.).
Also Netbeans comes with nice support for HTML5, Groovy, PHP, C++ as well (according to posts by users community, because I did not use them).

How to build a stand-alone scala executable

I am trying to create a standalone .exe file (or something equivalent) from a scala project I have started. I need to create this in such a way thet the person using the application has to do the least amount of work possible (double-click an installer or just the .exe file). What are my options?
Have a look one OneJar. There is also a sbt plugin here
Take a look at ej-technologies the creators of JProfiler, they have a couple of products that might be useful to you, quoting from their product page:
install4j A cross platform Java installer
that generates native installers and application launchers for your
Java applications.
exe4j A Java exe maker that helps you integrate your Java applications into the Windows operating environment.
These are both commercial products and although I haven't used them, I have used JProfiler for many years.
I've heard of this one: Lauch4j.
According to the site:
It's possible to wrap applications on Windows, Linux, Mac OS X and
Solaris
IzPack plugin for SBT might be useful.
Even scala itself uses it: They use IzPack