Java in Visual Studio 2010? - java

Is there any way to manage/debug/compile Java projects in Visual Studio 2010?
Before you answer, please read this topic.

I'm a little late to the party, but it looks like someone has started adding support. From the description, right now it only does syntax highlighting and basic navigation within a single file. However, in the Q&A section the author mentions plans to add compilation and debugging support later in the year.

The short answer - No.
The long answer - No, because the supposed intellisense support for Java that the blog entry referred to, in the question, relies on J# support. I believe it has been quite sometime since Microsoft has discontinued J# - VS2008 does not have it.
In the long run, you're better off learning how to use Eclipse/Netbeans/IntelliJ IDEA or any other IDE for the purpose of managing Java projects.

Sure. Visual Studio works with any language so long as someone takes the time to write the plug-ins for it. Heck, Mainsoft has already added JVM debugging support to Visual Studio. They just don't support the language.
The only problem is YOU are going to have to be the one who writes it.
I won't lie to you. It won't be easy and fan-boys on both sides will hate you for it. But if you pull it off I can at least offer you some money to write about how you did it.

No, although, I long for the day when VS might possibly support building Java applications. I don't think I have yet found an IDE as fully featured. Personally, if VS supported Java development, then I would trash my installation of Eclipse and Netbeans. ... so tired of wonky Java IDEs....

Cyberduck is written in Java and developed in Visual Studio 2010, though it requires IKVM, an implementation of Java for Mono and the Microsoft .NET Framework. Here are the build instructions.

C++ syntax highlighting looks pretty good for Java. Turn this on in Options->Text Editor->File Extension.
Extension: java
Editor: Microsoft Visual C++
Now reopen a .java file and see pretty colors.

I will advise to go for Eclipse, if you have to do at least 25% Java coding. Otherwise VS is good as well. But I like Eclipse for C++ as well as Java.

A new plugin is currently being developed named IntegraStudio,
aiming at full Java development under VS. It currently supports:
IntelliSense for Java (comparable to standard C++ IntelliSense in VS)
build with Ant or Maven
direct Ant / Maven project view in Solution Explorer
Java debugger with container visualization
support for VS browsing features (Class View, Code definition, etc.)
Class View works also for classes in JARs (including standard library)
browsing Maven repositories
JDK: 1.6 - 1.8
It uses standard JDK tools and targets the real Java platform (it
is not a .NET platform solution, as VJ# was).
At the moment of writing this, the IntegraStudio plugin is beta.
It does not yet contain advanced Eclipse features, however many
of them are in current roadmap (e.g. code refactorings and quick fixes).
You can find it on Visual Studio gallery:
http://visualstudiogallery.msdn.microsoft.com/588fb167-d18c-4e61-8aeb-30baeddb00da
The product official website is:
http://www.softerg.com/integra
Current docs (with large number of screenshots):
http://www.softerg.com/integra/docs/pages/is_intro.htm

Related

How to get Scala on Visual Studio Code using Ensime Extension?

I have been able to successfully download Java on my computer. Now how do I get Scala on Visual Studio Code? I heard many people use the Ensime extension in order to get Scala on VS Code. But, there isn't much information online on how I can get Scala working on VS Code using Ensime. Does anyone know how to get Scala on VS Code?
So the tooling story is a bit sad in scala at the moment.
1) Ensime is no longer maintained (I think it's possible to get VS Code to work with it but its for sure not the primary editor). I still personally use it quite heavily in combination with emacs (which is the primary text editor). There is an official site on Ensime/VSCode but I don't know if it helps much http://ensime.github.io/editors/vscode/
2) Metals is probably your best bet on VSCode but it's still very early in development
3) ScalaIDE is Eclipse with scala flavour
4) IntelliJ with Scala Plugin is probably the easiest to get up and running and I'd guess the most widely used one.

What are the advantages of IntelliJ over Eclipse? [duplicate]

This question already has answers here:
Things possible in IntelliJ that aren't possible in Eclipse?
(41 answers)
Closed 8 years ago.
I have been working with Eclipse for quite some time and recently got several recommendations to use IntelliJ.
As I just saw that questions of the format of "Which IDE is better?" are frowned upon (not without a good reason) - I wanted to know objectively what are the advantages of IntelliJ over Eclipse.
I know what Eclipse does and frankly I'm not missing anything. But this is exactly what I said about Visual Studio 2005 (C#) before starting to work on Eclipse - and now I can't even write a Hello World in VS without getting annoyed ...
I'll narrow the question down to the world of Java SE and Java EE only. No Android, no GUI.
I'm looking for:
What does IntelliJ give me that Eclipse lacks?
What does Eclipse give me that IntelliJ lacks?
Try to be objective, and please only answer if you had substantial experience with both tools.
Thanks.
Edit: The scope of work I'm looking for is both for working on private projects and as part of a team of several developers working on the same product. But if I have to choose - I'll focus on teams only.
JUnit is a crucial part of the work (personally I started working in TDD several months ago - but lets not open that).
I'll also be interested to know about ANT/Maven related benefits if there are - although my prime motives are to know if I can benefit from things like: Quicker development (e.g. code generation, templates, auto complete etc.), Easier AUT, simpler Java EE application deployment during development (for UT) etc.
For me there are two points:
Refactorings (IntelliJ is great in the refactorings it provides)
Plugin stability, I've always found that when I have a stable install of Eclipse, I get a new plugin and everything comes down in flames and I have to reinstall everything.
IntelliJ allows me to navigate between Java, JSP, JS, CSS and pretty
must every other type of file. With Eclipse I need to install a plugin
to be able to navigate through file types other than Java.
#Rachel. Hmmm. In Eclipse Ctrl-Shift-R (on mac Command-Shift-R), open up "Open Resource" dialog where you can type whatever you want and it will match ANY file, not just Java. Ctrl-Shift-T will do the same, but limit it only to Java types.
This is the keymap of IntelliJIDEA.
Just read this article and you able to doing amazyng features with IntelliJ which you do not even dream of in Eclipse. For me, the most useful are Ctrl-Y , Ctrl-Enter, Ctrl-Alt-T, Shift-F6 and auto-completion.
Code navigation. (being able to find method and field declarations and usages.)
We have a J2EE project at work where both IntelliJ and Eclipse are in use so I have been able to compare the abilities of both.
IntelliJ allows me to navigate between Java, JSP, JS, CSS and pretty must every other type of file. With Eclipse I need to install a plugin to be able to navigate through file types other than Java.

Can I develop for Greenfoot using Intellij Idea?

I'm taking a Java course where I have to do some development for Greenfoot. I'm very accustomed to using vim for development in C / C++ and so have been using Intellij Idea with a vim plugin.
I despise the Greenfoot IDE.
Is it possible to use Intellij to develop for Greenfoot?
As you've found already you can add libraries and mess around to get some bits working, but it's not officially supported (so might change from release to release or break) and most likely never will be. It's more by accident than design that it works at all this way.
I've often wanted to use a professional IDE for doing Greenfoot work myself, but the simple answer is that Greenfoot is primarily focused for beginners, for a fun and interactive way of teaching Java to people who have never programmed previously. The developers could potentially focus their time in providing official support for coding in other IDE's, but the amount of work required means it's pretty much been decided it's not worth doing.
If you haven't noticed already, Greenfoot 2 is now out with a much improved editor that supports basic code completion and intelli-sense. It's still of course nowhere near the IntelliJ editor, nor will it ever be, but it certainly makes developing in it more tolerable if you're used to something more advanced.
I use IntelliJ and I do not think it would be supported, but I am not certain.
This site has a similar question
I was able to go into the Project Structure, dependencies tab, select add module library and do attach classes selecting the /lib/greenfoot/standalone directory. This allows me to compile the balloons scenario cleanly. However, to actually run the scenario's you still have to use the Greenfoot environment due to all the games it plays behind the scenes.
This link is about Greenfoot in Eclipse, but the steps also seem to work with IntelliJ.
Basically you add bluejcore.jar and greenfoot.jar (found in your installation directory of Greenfoot) as your project libraries and create a properties file (details in the link) for Greenfoot. Finally select GreenfootScenarioMain as main class, this allows you to launch Greenfoot programs from within IntelliJ.

Which programming languages can I use on Android Dalvik?

In theory, Dalvik executes any virtual machine byte code, created for example with the compilers of
AspectJ
ColdFusion
Clojure
Groovy
JavaFX Script
JRuby
Jython
Rhino
Scala
Are there already working versions of bytecode compilers for Dalvik available for other languages than Java?
At launch, Java was the only officially supported programming language for building distributable third-party Android software.
Android Native Development Kit (Android NDK) which will allow developers to build Android software components with C and C++.
In addition to delivering support for native code, Google is also extending Android to support popular dynamic scripting languages. Earlier this month, Google launched the Android Scripting Environment (ASE) which allows third-party developers to build simple Android applications with perl, JRuby, Python, LUA and BeanShell. For having idea and usage of ASE, refer this Example link.
Scala is also supported. For having examples of Scala, refer these Example link-1 , Example link-2 , Example link-3 .
Just now i have referred one Article Here in which i found some useful information as follows:
programming language is Java but bridges from other languages exist (C# .net - Mono, etc).
can run script languages like LUA, Perl, Python, BeanShell, etc.
I have read 2nd article at Google Releases 'Simple' Android Programming Language . For example of this, refer this .
Just now (2 Aug 2010) i have read an article which describes regarding "Frink Programming language and Calculating Tool for Android", refer this links Link-1 , Link-2
On 4-Aug-2010, i have found Regarding RenderScript. Basically, It is said to be a C-like language for high performance graphics programming, which helps you easily write efficient Visual effects and animations in your Android Applications. Its not released yet as it isn't finished.
Scala works very well.
I'm programming my Android application projects in Scala (Website written in Chinese with some screenshot, source code # GitHub), and it is pretty easy to setup the evnviroment (without IDE, using SBT as build tool).
It could access every API in Android SDK, so anything you could do in Java, you could do it in Scala too.
You may check this blog entry to see how to build Android application with Scala and SBT.
Kawa is a lovely but little known variant of Scheme that has existed quietly for many years and runs on both the JVM and Dalvik, natively. Therefore, its output includes no extra VM and only includes explicitly imported libraries. To the end-programmer, this means Kawa's performance and executable size are nearly identical to standard Java (ProGuard not required).
Kawa also includes lots of macros (including some specific to Android APIs) that make for a nice clean syntax (assuming one is not averse to parentheses), and adds some tasty goodies on top of Scheme, like "promises" (lazy eval and futures in one). The language is quite robust and well-documented, and has been actively maintained and evolving since the early days of Java.
The Java Advent Calendar summarizes Kawa's merits with some informative examples and links.
I haven't played with it but I know that Scala works.
http://www.scala-lang.org/node/160
Another JVM language that works on Android is Kotlin with Anko, both from Jetbrains.
Mercury also works on Android, using its Java backend. I've written a simple app that should help someone get started (there are still few other examples), and mercury-android-helper also for this purpose (although at this exact moment, it's short a few commits. And neither are using ProGuard yet, so the .apk size is shocking.)
Although the other posts here are cheerful about Scala-on-Android, posters in Scala forums are more concerned by Scala's ability to blow through some of Dalvik's limitations, and people who do use it say they reserve it for non-production code. (Some discussion about Scala's problems here.)
I can't say yet if Mercury has its own problems with Dalvik, but I've switched to it from Scala for the time being.
The dynamically typed languages wont be possible until Dalvik supports JIT (Just In Time) compiling. I believe there is JIT support in one of the experimental Eclair branches, but it is not yet officially available/supported in Android.
1) Angular + nativeScript
2) Reactnative

How do I "decompile" Java class files? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
What program can I use to decompile a class file? Will I actually get Java code, or is it just JVM assembly code?
On Java performance questions on this site I often see responses from people who have "decompiled" the Java class file to see how the compiler optimizes certain things.
Update February 2016:
www.javadecompilers.com lists JAD as being:
the most popular Java decompiler, but primarily of this age only. Written in C++, so very fast.
Outdated, unsupported and does not decompile correctly Java 5 and later
So your mileage may vary with recent jdk (7, 8).
The same site list other tools.
And javadecompiler, as noted by Salvador Valencia in the comments (Sept 2017), offers a SaaS where you upload the .class file to the cloud and it returns you the decompiled code.
Original answer: Oct. 2008
The final release of JSR 176, defining the major features of J2SE 5.0 (Java SE 5), has been published on September 30, 2004.
The lastest Java version supported by JAD, the famous Java decompiler written by Mr. Pavel Kouznetsov, is JDK 1.3.
Most of the Java decompilers downloadable today from the Internet, such as “DJ Java Decompiler” or “Cavaj Java Decompiler”, are powered by JAD: they can not display Java 5 sources.
Java Decompiler (Yet another Fast Java decompiler) has:
Explicit support for decompiling and analyzing Java 5+ “.class” files.
A nice GUI:
It works with compilers from JDK 1.1.8 up to JDK 1.7.0, and others (Jikes, JRockit, etc.).
It features an online live demo version that is actually fully functional! You can just drop a jar file on the page and see the decompiled source code without installing anything.
There are a few decompilers out there... A quick search yields:
Procyon: open-source (Apache 2) and actively developed
Krakatau: open-source (GPLv3) and actively developed
CFR: open-source (MIT) and actively developed
JAD
DJ Java Decompiler
Mocha
And many more.
These produce Java code. Java comes with something that lets you see JVM byte code (javap).
To see Java source code check some decompiler. Go search for jad.
If you want to see bytecodes, just use javap which comes with the JDK.
I tried several, and Procyon seemed to work the best for me. It's under active development and supports many features of the latest versions of Java.
These are the others I tried:
CFR
Promising, but often failed method decompilation. I'll be keeping my eye on this one. Also actively developed with support for the latest Java features.
Krakatau
Takes a different approach in that it tries to output equivalent Java code instead of trying to reconstruct the original source, which has the potential of making it better for obfuscated code. From my testing it was roughly on par with Procyon, but still nice to have something different. I did have to use the -skip command-line flag so it wouldn't stop on errors. Actively developed, and interestingly enough it's written in Python.
JD-GUI
Worked, but Procyon's output was much better. Here's a page comparing Procyon output to the original and JD-GUI. JD-GUI is also available as an Eclipse plugin, which didn't work for me at all. Doesn't seem to be open source and development seems sporadic.
JAD
Worked, but only supports Java 1.4 and below. Also available as an Eclipse plugin. No longer under development.
I use JAD Decompiler.
There is an Eclipse plugin for it, jadeclipse. It is pretty nice.
Procyon includes a decompiler. It is FOSS.
Soot is an option for newer Java code. At least it has the advantage of still being recently maintained...
Also, Java Decompiler is a decompiler with both a stand-alone GUI and Eclipse integration.
Lastly, Jdec hasn't been mentioned, though it's not as polished as other options.
JD-GUI is really good. You could just open a JAR file and browse through the code as if
you are working on an IDE. Good stuff.
Here's a list of decompilers as of Feb 2015:
Procyon, open-source, https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler
CFR, free, no source-code available, http://www.benf.org/other/cfr/
JD, free for non-commercial use only, http://jd.benow.ca/
Fernflower, open-source, https://github.com/fesh0r/fernflower,
JAD – given here only for historical reason. Free, no source-code available, http://varaneckas.com/jad/
Outdated, unsupported and does not decompile correctly Java 5 and later.
You may test above-mentioned decompilers online, no installation required and make your own educated choice.
Java decompilers in the cloud: http://www.javadecompilers.com/
There are a few programs you can use. You will get the actual Java code, but sometimes the code will have been obfuscated so methods are named by one letter or number or a random mix of letters and numbers.
DJ Decompiler
Mocha
Most decompilers for Java are based on JAD. It's a great tool, but unfortunately hasn't been updated for a while and does not handle Java 1.5+ classes very well. I have not seen any tools that will properly handle 1.5+ classes.
Take a look at cavaj.
All of the JAD links listed so far far seem to be broken, so I found this site. Works great (for Linux, at least)! On Ubuntu 11.10 I had to download the static one for whatever reason.
http://www.varaneckas.com/jad
JAD is one that works and is simple.
Also, if you just want to see the methods, use javap.
If you want to see how the Java compiler does certain things, you don't want decompilation, you want disassembly. Decompilation involves transforming the bytecode into Java source, meaning that a lot of low level information is lost, and if you're wondering about compiler optimization, this is probably the very information you're interested in.
Anyway, I happen to have written an open source Java disassembler. Unlike Javap, this works even on highly pathological classes, so you can see what obfuscation tools are doing to your classes as well. It can also do decompilation, though I wouldn't recommend it.
JAD doesn't work for me (Ubuntu 11.10 issue) so I've moved forward and sopped on JODO. At least it has Open Java source code and been able to decompile my .class properly.
I recommend to check out 'branches/generic' branch first. The trunks is not stable.
On IntelliJ IDEA platform you can use Java Decompiler IntelliJ Plugin. It allows you to display all the Java sources during your debugging process, even if you do not have them all. It is based on the famous tools JD-GUI.
With AndroChef Java Decompiler you can decompile apk, dex, jar and java class-files. It's simple and easy. AndroChef JD is based on FernFlower. You can evaluate it in 10 free uses.
AndroChef supports Java language features like generics, enums and annotations. According to some studies, AndroChef Java Decompiler is able to decompile 98.04% of Java applications generated with traditional Java compilers - a very high recovery rate. It is simple but powerful tool that allows you to decompile Java and Dalvik bytecode (DEX, APK) into readable Java source.
For OSX I recommend: jarzilla or JD-GUI
They both allow you to view jar,war,etc. file content and decompiles any class files inside of them.
Jarzilla: https://code.google.com/p/jarzilla/
JD-GUI: http://jd.benow.ca/

Categories

Resources