Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I've used DJ Java Decompiler, which has a handy GUI, but it seems as if the latest version is only a trial and forces you to purchase the software after some period of days (I recall using an earlier free version about a year ago at a previous job).
I'm aware of Jad and Jadclipse, but what I loved about DJ Java Decompiler was that it integrated with Windows Explorer - so I could simply open up a JAR in something like WinRAR, navigate thru the packages, and double-click on a .class file to view it's decompiled source.
Can anyone suggest other good, free, .class viewers? The criteria I have in mind for these would be:
GUI-based
Integrates to Windows Explorer (so I don't have to run some command-line options like with JAD)
optional - can also show raw JVM bytecode commands
In other words - I'd like to find the closest thing to .NET Reflector for Java as possible.
JAD is one of the best Java Decompiler today. This is one brilliant piece of software. Nevertheless, the last JDK supported by JAD 1.5.8 (Apr 14, 2001) is JDK 1.3.
DJ Java Decompiler, JadClipse, Cavaj and JarInspector are powered by Jad.
The last version of Decafe Pro has been released on 2002-01-03.
These viewers can not display Java 5 sources.
So, I use JD-GUI : logic, I'm the author :)
Procyon is a new open source decompiler that already beats JD-GUI in most cases. It's written in Java and comes in a self-contained jar. It is actively developed by StackOverflow's own Mike Strobel.
Eclipse will allow you to view the bytecode for classes, if the source is unavailable (search for 'disassembled bytecodes').
It seems there is also a third-party plugin that uses asm here.
There was another thread on StackOverflow which linked to http://java.decompiler.free.fr/
Try JDGUI simple, lightweight and fast
I use cavaj
I've used Decafe Pro (can't find the official site anymore) in the past, but the free version won't let you cut-n-paste.
Both of them are front ends to JAD, so they have the same features and limitations with respect to decompilation capabilities.
JarInspector
Jar Inspector is an easy to use yet powerful jar file editor for Mac OS X. It allows you to effortlessly view, edit and decompile the contents of jar files.
Many of these decompilers are based on Jad:
http://www.kpdus.com/jad.html
I like the JadClipse Eclipse plugin:
http://sourceforge.net/projects/jadclipse
I just published a stand-alone Java Decompiler GUI (based on Jad) which you can get from Util Java Decompiler (JAD based) v1.0
This is a Windows based .NET 4.0 application, which supports the drag n'drop of *.jar files.
It doesn't integrate with Window Explorer, but since this is based on a simple C# script, and the code is Open Source, maybe you could add that feature :)
Another idea would be to also add support for the other free java decompilers.
i use cavaj, simple to install and gives your very good overview of the class, eclipse style.
There is a free Java Class Viewer, we can check the Java .class file binary data byte by byte interactively. When clicking each tree node of the class file structure on the left, the corresponding byte data would be highlighted on the right.
Here is an article describes the source code of the Java Class Viewer in detail.
Related
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 3 years ago.
Improve this question
When I install a new JDK, I follow similar procedures as described here.
For example, like that link, I too like to have a local copy of the javadocs. See that link's "Step 7: (Optional) Download JDK API Documentation, Demos and Samples" section.
My only use for these javadocs is to point my IDE (IntelliJ, of course!) at them. I will not be doing anything commercial with them, like redistributing them, developing my own JDK, etc.
In the past, I always downloaded Sun/Oracle's JDK, and a javadoc .zip file was also downloadable from the same web page as the JDK.
Starting with JDK 11, there are now many new 3rd party builds to chose from.
I have no strong preference among them. I have selected Azul's Zulu for now simply because I respect their technology in general.
My problem is that every 3rd party JDK 11 build that I looked at, including Azul Zulu, seems to only offer you just the JDK. None of them seem to have a javadoc download (e.g. a jdk-11.0.3_doc-all.zip file).
Did I overlook where to get this?
Or is Oracle still the only source for this? And is Oracle's license for these javadocs a problem?
Of course I did a web search before posting this question, as well as I manually searched thru all the 3rd party build web pages. The only source that I found for downloadable javadocs was Oracle.
So, I downloaded my current copy of jdk-11.0.3_doc-all.zip from Oracle
by clicking on this link, then accepting the license agreement, then clicking on the jdk-11.0.3_doc-all.zip link, then logging in to Oracle.
I am concerned about getting this documentation from Oracle because I assume that the license that I agreed to is no longer a free one as in the past.
If I only use Oracle's javadocs locally, by pointing my IDE towards them, will that violate Oracle's license? I will be using my IDE to develop commercial software.
Yes, I have skimmed thru that license. But it is legalese, and I do not really understand it. It has concerning language like "Specification Lead hereby grants you a...license...to view, download, use and reproduce the Specification only for the purpose of internal evaluation".
Or is Oracle still the only source for this?
I am not aware of any such 3rd-party download1
And is Oracle's license for these javadocs a problem?
That would be for you to decide after reading the license2. Among other things, it would depend on how you intend to use the documentation.
Yes, I have skimmed thru that license. But it is legalese, and I do not really understand it. Eetcetera
See footnote 2. Seriously. We can't answer your legal questions with any confidence. And even if we did, you should have no confidence in our answers!
One alternative is to download the OpenJDK source tree and build the javadocs for yourself. Your usage of the resulting javadocs will be (only) limited2 by the terms of the GPL v2 + Classpath license for OpenJDK.
A second alternative is to view the Oracle javadocs via the web.
A third alternative is to point your preferred IDE at the appropriate source code bundle (in your Oracle JDK or OpenJDK installation) and search / view the docs via your IDE.
1 - If such a download does exist, you should be able to find it with a Google search.
2 - I am not a lawyer! If you are concerned about this, you should get legal advice from a practicing lawyer.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am working on a Java project together with a collaborator, and we are both using the Eclipse editor. What I want to do is to be able to share the .java files with him so that we can both edit it separately but see what has the other has written. Currently, I am doing this is an ad-hoc way by sharing a Dropbox folder that contains the project. However, this approach does not work well because he is using a different version of Java (as he runs a Mac while I am using Windows). For me to run the project, I would have to clear all the .class files that he has created which will appear on my computer since Dropbox just shares all the files.
I have heard of CVS as a way to manage file sharing among developers, but it sounds like a lot of work. I don't know for example how to get a CVS server or what to do to get it to work. Is there an easy and straightforward way to enable us to work together on the same Java project? Is GitHub the answer?
This is definitely the job of source control, as other answers have mentioned, Git or SVN are probably your best choices. Git is the newer one and is gaining a ton of popularity (probably thanks to GitHub).
GitHub is pretty easy to learn and can even take care of a lot of the more difficult tasks for you with their new GitHub for Windows client. They also have a GitHub for Mac client. Once you are more familiar with the tool you can get the EGit plugin for eclipse so you can control the source control directly from your IDE.
Additionally, GitHub created an online interactive tutorial for learning git.
As for clearing out class files (and also your .settings and .project and .classpath files from eclipse), you can instruct git to ignore these types of files using a .gitignore file. You can find templates for various languages (including Java) here.
you could spent the time to learn git at: https://help.github.com/articles/set-up-git
it's a very valuable tool and once you get used to it it will be very easy to share code.
Or better yet, Mercurial. It follows the same approach as Git, but is way simpler and works without hassle. To start a repository within the current directory, just run:
hg init
Have a look at the documentation for more information.
I recommend "Subversion"
Google it and look at the information.
You can easily check out files and check in.
I wish you luck.
Depending on what your future plans are the Git or Subversion would be fine. I finally made the switch to Git after years of using SVN.
Note that in addition to Github (which is great) there are also some other repository hosting services, some of which offer free "personal" accounts (most make your code public, but I think a few still give you a limited amount of space for free).
CVS is getting old and people are moving out of it to other source code control tools
The most famous tools are SVN and Git. There are other tools but less famous I believe
You definitly need a software revivision tool if you are going to work in a team(or even alone for that matters), as it marks the changes that have been made, when and by whom, etc...
google code for example offers an easy way to setup your svn repository in one minute. there are also alot of companies offers such a service online for free or for small money, depending on your need. So if you just need a sandbox, then setup a svn on google code and try it out
a code revision tool is almost a must for every programmer
good luck
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
The following link states that "A Java or RCP version of Eclipse is recommended. For Eclipse 3.5, the "Eclipse Classic" version is recommended."
http://developer.android.com/sdk/installing.html
However, Eclipse 3.6 is available and as a total newbie I am not sure whether the recommendation for "Eclipse Classic" over RCP (or Java) still holds true.
Can you clarify?
Thanks you.
Just follow the recommendation and download and install eclipse classic 3.6 for a start, then add the android. You can always add additional eclipse functionality (plugins) later without breaking or loosing something.
Here is a page to compare the distributions.
Classic is a good choice. Alternativly I'd choose not RCP but 'Modeling' because it includes Mylin (task management) and install the XML tools later on (nice XML viewer/editor).
For the record, I decided to go with the Classic package.
I am detailing my decision considerations, hoping that this could be helpful to future Android newbies:
Aside from the ubiquitous RCP/Platform, the only plugin common to all 3 Android recommended packages (Java, RCP and Classic) is JDT.
In the near term, I don't expect to develop Eclipse plugins (PDE), but I do use version control (CVS). The "Java package" seems to best fit this.
On the other hand, the "Java package" also includes EMF, GEF, Mylyn and XML Tools. In my android project, it is unlikely that I will need EMF, GEF and XML Tools. Mylyn, on the other hand, sounds very interesting, perhaps even useful. :)
It is unknown to me how clean or easy a plugin un-installation is. I always prefer leaner & cleaner environments (lesser probability for contention), so the easiest route seems to be installing "Classic", removing PDE, then adding Mylyn.
Hence, Classic.
Those of us who create products and/or plugins based on Eclipse usually start with Eclipse Classic. It has the PDE (plugin Development Environment) already integrated. It's also a lot bigger.
If you want to do Android development and nothing else, you can start with the Java SE edition or Pulsar and add in the plugins you need.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for a lightweight java reporting engine to be embedded in an applet application.
My first option was Jasper Reports, but the jar is over 2Mb, a little too heavy (and too bloated) for my needs. I don't know if there is modular jasper distribution, with funcionalities split in several jars (like html rendering, pdf, excel, compilation, runtime, etc).
I need to preview the report using Swing and print it. PDF export is a plus.
Jasper Reports does include a jar with basic funcionality to preview and print reports. It's packaged as jasperreports-x.x.x-applet.jar, with around 350k.
I know this is a bit late, but with your requirements it seems like a perfect fit would be the reporting solution the company I work for puts out: i-net Clear Reports (used to be i-net Crystal-Clear).
Lightweight and simple viewer (similar to a PDF viewer)
Very simple-to-use API
Can export into a bunch of different formats including PDF
Supports any JDBC data source, or also manual setting of data
Can run Crystal Reports templates
We also offer a free and fully functional report designer
Check it out and tell us what you think.
See NextReports Engine with around 300k. NextReports Designer is FREE to use.
If you can find no better solution, it should be possible to create a stripped down JAR file for Jasper Reports. The GenJar tool is supposed to be able to build a JAR file based on its static dependencies.
A long time ago, I used to use Zelix's "Classmaster" obfuscation tool which gave you the option of stripping out classes that were not used. I think it might even have stripped unused methods, though my memory is a bit hazy. (I used it on a closed source product ... that has since disappeared down an IP "blackhole".)
EDIT: another option is ProGuard, which does obfuscation and stripping like Classmaster, except that it is open source. (Sadly, they seem to have misconfigured their SF website link. But the link above works.)
Of course, if Jasper Reports uses Class.forName() you would need to identify all the relevant classes add them as "root" dependencies for the stripping tool that you use. In addition, you would need to look at the Jasper Reports license to make sure that you are allowed to "distribute" a stripped JAR file.
Why is 2Mb too big for a server-side library? Docmosis has a jar size under 500k, but requires OpenOffice on the server, so it is smaller in one way and bigger in another. Java won't load the 2Mb Jasper into memory unless you use all the features/classes.
IMHO Chunk Templating engine is the best. The jar file only has 180 KB! and support IF and iteration. How cool is that !
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 4 months ago.
Improve this question
I am quite new to Java and would like to learn Java using an interactive shell, like I did with Python using IPython.
I have tried a few interactive shells, such as beanshell, jython, jythonconsole, and JyConsole. Most of them don't have tab completion like IPython does. Is there anything similar to IPython for java?
groovysh:
http://groovy.codehaus.org/Groovy+Shell
Rich cross-platform edit-line editing, history and completion thanks to JLine.
ANSI colors (prompt, exception traces, etc).
Simple, yet robust, command system with online help, user alias support and more.
User profile support
If you want an interactive option for use with java try using Dr Java or JGrasp, they both provide the same interactive option as does IDLE for python, plus being a fully based IDE with a debugger I prefer JGrasp to Dr Java. They also have a Dr Python so if you get used to Dr Java you can also use it with Python.
Also Dr Java has a feature in which you can select from beginner, intermediate, advanced and full Java in order to limit what you can do with the language as you learn it. I never use that feature as I dont see the point in restricting parts of the langaue but I guess some teachers utilize it while teaching their students.
You probably won't get much use out of using java interactively, as that language is strongly oriented toward compiling. The best route will probably just get a nice IDE, like eclipse, and get started with breakpoints and the debugger.
what beanshell have you used ? the old one ?
Look at this
they claim to provide completion
Gayan Weerakutti already mentioned in a comment what I think should be the correct answer, too:
JShell is part of the JDK since version 9.
Try jshell on your terminal.
Check out docs from Oracle about it.
I think I find a good enough alternative: JPype. JPype allows python programs having full access to java class libraries. With JPype and IPython, I can use all java functions while having very nice tab completion for the java classes.(After the class is imported though)
Although I agree with TokenMacGuy saying:
The best route will probably just get a nice IDE, like eclipse
As Im also coming from environment where tool like interactive shell was essential. So I can also suggest you simply using tool like ipython directly from jython/JPype.
That can be achieved or using JPype as suggested by i-freaker of through jython:
Getting jython (check its running jython -c 'import os; print "Python meets %s" % os.name')
Getting readrline (In case Mac sudo port install readline)
Fallowing the steps from this blog or jython documentation to make java-readline work
So you have jython with readline by now(Ctrl+R in jython results in reverse-i-search like you know it from the shell). In order to get tab-completion like you know it form ipython fallow the steps from this blog
That should be it! In case you need patch for ipython 0.10 you can get it from here.
Give a look at https://github.com/Bachmann1234/java9_kernel you can install a Java kernel for IPython and use it (also via the notebook).
IntelliJ IDEA has a groovy console with tab completion.
open it: Tools -> Groovy Console...