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.
Improve this question
I'm thinking of using Java to write a program that I might try to sell one day. I'm new to Java so I have to ask, what types of tools/software/etc will I need (from development, to distribution, to user-friendly installation on users' machines) that have licenses that must be considered to make sure they allow sales and closed source code, etc.?
Should we assume the user already runs at least one Java app, and therefore has a fairly recent version of Java on their machine?
Also, do you have any recommendations for specific tools that are definitely suitable for this purpose?
It's very rare to see any development tools that restrict the way you can use software created using them. The only exception to that are libraries, and that is not a problem with standard Java libraries. Tools, IDE and so on - regardless of whether they're free or not - will not affect how you can distribute your code.
There are some weird exceptions, like BitKeeper source control software, the license of which prohibits anyone using it from trying to create software that could compete with BitKeeper - which is why I advise to stay as far away from the thing, and the company behind it, as possible. In the end, if you want to be absolutely legally clear, you'll have to hire a lawyer and have him go through licenses and EULAs for all software you're going to use in your development process, because of stuff like this.
Some specific data points: Java itself is okay (both compiler and libraries); both Ant and Maven are okay; and Eclipse and NetBeans are okay.
For development, you will likely need an IDE. The top picks are:
Eclipse (most features)
IntelliJ (non-free)
Netbeans (easiest to learn, imo)
A few others with much lower popularity
For a free installation program, I've had the best experiences with IzPack, but there are others available. Similarly, to convert to a .exe for easy launching, I recommend Launch4J.
I don't think that its safe to assume that users have Java installed. Many will, but the versions will vary fairly widely, and the few that don't will tend to cause problems. Obviously, this may vary depending upon your intended audience (and how much control you have over them).
For cross platform distribution you might want to look into launch4j: http://launch4j.sourceforge.net/
Also you might also want to obfuscate and optimize your code, for that you can use ProGuard: http://proguard.sourceforge.net/
For your development use any of the open source tools available such as eclipse or netbeans, or even emacs with jdee.
You should not assume users have Java, package a version of java with your application.
For installation you might want to search for some open source solutions, the only one I know of is install4j and it is commercial. http://www.ej-technologies.com/products/install4j/features.html
This is a question that is really hard to answer because the requirement and the preferences of the users are different from each other.
But I will tell you one entry point. Use ECLIPSE as your IDE to develop your Java code. It is an opensource one so you don't need any licence for that. When you are working on your project you will need variety of other tools to do various stuff. Fortunately most of the essential functions are implemented as plugins for eclipse. You can seperately add them to eclipse.
With time, you'll get the experience and you will have enough knowledge to swich to the necessary tools etc
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.
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
We're having huge issues with Java Web Start in production. We're afraid to release because every time we do, help desk gets calls from 1/3 users getting an "unable to launch" error. It's hard to tell whether it's because of user error, cancellation in the middle of download, poor network connection or anything. But the bottom line is:
We find it terribly unreliable.
What are the alternatives for deploying and updating a rich Swing application? Either free or commercial, I'm more interested in features and robustness.
Reliability is key, but I would also like to have the following:
Install once, update automatically from a simple HTTP hosting like JWS
Differential updates
Support for multiple configurations (think of 30 instances which may have different versions of the application or different launch parameters - would be nice not to build 30 artifacts each time)
Win / Mac / Linux support. Hopefully one that does not mean I have to maintain 3 builds for each instance.
I feel your pain, the biggest issue I've had with JWS is visibility, that is, what is it doing and why is it doing it. Most of our issues were related to internal proxies (Java seems to really not like authenticating proxies) and the wrinkles seem to be ironed out for the moment. Nevertheless, I did consider simply writing a replacement. This is not as crazy as it sounds, JWS does an awful lot of stuff that I don't really care about, namely, integrating with the web browser and checking JVM versions. Consider the following scenario:
You launch a Java application (the launch app). This application takes a single parameter which is a URL of a JNLP file.
The launch app hashes the URL and uses this as the basis for a local folder (repository) in which to store any downloaded jars for the app. If the repository doesn't exist, it will create it.
The launch app attempts to download the JNLP pointed to by the URL. If it can't download it, it will just launch whatever is in the repository (maybe warning the user)
If it can download the JNLP, parse it and list any jars that need downloading. If you already have the jars, use something like Apache HttpClient in order to determine whether the server has a newer version and download if required. The important point is that any downloads should be stored in a temporary folder. Once ALL of the downloads have succeeded, you can apply these to the local repository. Ideally, you will back up what is already there in order to allow some sort of rollback procedure.
This should provide some very significant advantages over regular JNLP:
Visibility, you can log exactly what is happening
Much better failure modes: if the download gets interrupted just launch the version that's already there (obviously, this won't work if the interrption occurs on the first download), if you feel like telling the user about it then do so.
By running as a local app you should avoid running into issues with signing of jars, I honestly don't understand the Java Web Start security model with respect to signed jars but it seems that if different classloaders are involved, JWS will complain about it (I think)
Sadly, I'm not in a position to fire you over a working version of the above, I did start a prototype but suspended it. I may have to return to it in future in which case, I'll be happy to share the finished version.
Cheers,
Phil
Currently we are using GetDown to handle distribution of our swing applications. We use Tomcat to distribute updates and GetDown to download those updates. It's really flexible and powerful, and much better than java WebStart and because it produces check sum for changes it saves bandwith and downloads just changed files.
A good tutorial : http://www.hascode.com/2012/05/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/
You could use an installer: for example Install4j.
You can find a list of installers here: What are good InstallAnywhere replacements for installing a Java EE application?
With Java Web Start being deprecated by Oracle, we are considering using Microsoft's .NET Click Once to download and launch our Java application.
We will have a Click Once .application file run a little MS program that detects Java, downloads our latest jar files and then launches our Java program using the detected version of Java and the Jar files.
Of course, this is only a solution for Windows machines, but we are customers are exclusively on Windows, so this works in that environment.
MS's Click Once: https://learn.microsoft.com/en-us/visualstudio/deployment/clickonce-security-and-deployment
You could also give Zero Install a try. It's cross platform (Linux, Win, Mac), offers jrd download and auto update and has a nice system integration.
Drawback in my eyes that its not easy to handle..
http://0install.net/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I wrote a program in Java 6.0, but it turns out that some of our client only have 5.0.
The issues is that lot of features that 6.0 has was not in 5.0 yet. For example:
JTable Sorting, Filtering feature
SwingWorker class
My Question is :
is it legal to just copy the java 6.0 source code to my own project so that my client with 5.0 jre can run it.
from technical point of view, is it hard to copy the classes source code like TableRowSorter, regexFilter to my own project and let it work?
Thanks
Probably no, the OpenJDK classes are under GPL meaning you will have to put your sources under GPL too. The Oracle Java classes are also under a "you cannot just do what you want to with our sources", so this is most likely a VERY bad idea.
You can use Retroweaver to make your source work with an earlier version of Java, but I would say that you should make your code work with Java 5, optionally using Java 6 facilities if available, and then say to your customers which things they will get from upgrading.
2021 edit: As of Java 17 the proper solution would be to include a tested JVM as part of your deployment. There is tooling for bringing just what you need.
One question you should ask is: why haven't your clients upgraded to Java 6.0? Since it's free and easy to do they must have a reason, and you should probably find out what it is before sending them code from it.
That depends on the source code you are copying from. From JavaSE? OpenJDK?
Wherever you want to copy from, check their license for the code.
The copying may be simple, copying just the classes and it’s dependencies. There may be a lot of specific dependencies though, which can make it consume a lot of time. And you’ll really have a problem when you have to copy a changed class that already existed in version 5, where you would need one version for some code, and the newer for the other. But if you’re only using Java6 code in that project it should be alright. Moving the classes into another package may also be an option, with potentially a lot of work as well though.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Since 2005 we are using MyEclipse as our standard development tool.
We use it mainly for for Java applications, but from time to time
we use it also for Groovy and may be other stuff, like DB navigator, etc.
Our licences should be renewed in a couple of months and I am rethinking
the decision of using it. A nice feature of MyEclipse was the debugger which
allows us to debug client/server applications. Also the hot deployment was a nice
feature. All this stuff can be done without MyEclipse and comparing the memory footprint
of MyEclipse 7.1 woth Eclipse Ganymede the last one wins for far.
The licence price doesn't matter.
Then the question is what I do loose not using MyEclipse anymore?
opinions are welcome.
Luis
We used to use MyEclipse but we just stopped doing so over time, and didn't really miss it. We're now on Ganymede EE and find it has everything we need, having now implemented some of the things bundled with MyEclipse. Syntax highlighting across various sources such as .css, .js and .sql is nice to have out-of-the-box. And we've always used the remote debugger built right in - it's pretty neat imo, but I didn't realise there was anything special with MyEclipse in this regard. And of course you can install Eclipse and MyEclipse side-by-side while you try things out.
I was using MyEclipse for about 3 years between 2002 and 2005. Currently, the functionality coming with Ganymede is IMHO good enough to live without it
A good JavaScript/HTML/CSS editing support, if that concerns you. It was one of the main reason I shifted to Netbeans, not Eclipse, after a using the IntelliJ for a long period.
MyEclipse 8 allows you to configure away some of the many options to improve startup speeds.
There were many problems with v7, especially to do with proxy internet connections, but these seem to be fixed now.
I was using BEA's Workshop Studio for awhile and the primary features that I ever really used was to control-click on a JSF/JSP to jump to the source code. Likewise, I wanted to be able to find all references of a given method and have the result set include JSF/JSP references. I could never get the latter to work though...possibly a config error. The JSF WYSIWYG was useful on occasion too. I let my license lapse and didn't feel like paying again what they were asking ($100 - $800).
So I believe MyEclipse is supposed to provide those features as well for much less, but the JSF/JSP link and search didn't work on my initial install. So I've reverted back to Eclipse EE, which I don't believe provides any of those features (can anyone confirm this?). Assuming it doesn't and that I could get it to work in MyEclipse, then MyEclipse would be worth it IMO for just those basic features alone.
I was also a big fan for some years, but I realized that when Eclipse has a bug, then also MyEclipse has the same bug and they wait till Eclipse fix it.
So .. why should I pay for MyEclipse? IntelliJ is much stable and cheaper in the third year.
I tried now MyEclipse under Fedora and it's not better - GUI errors, so I can not work with. Much worser than under Ubuntu :(
Netbeans for PHP is the best. It has database support as well, i.e. you can test your sql queries within the netbeans and see the results. I have been using it for quite sometime and found no problems... Give it a try when you are looking for a change.