How to create an installer using Java? [closed] - java

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 years ago.
Improve this question
How to create an own installer using Java? I am not asking about any Java installer software. Anyone knows the logic or method please tell me. Is there any API available for these?

In windows you can use Advanced Installer .
Advanced Installer is the only Windows Installer authoring tool with built-in support for Java applications, integrating them fully into the Windows OS and making them look and feel just like a native application.
Using Advanced Installer you can create MSI packages for your Java applications, and allow your application to use the Windows Installer features.
http://www.advancedinstaller.com/java.html

This is such a vague question. What do you want to install ? Options include:
the JRE ?
your application (a .jar) ?
Registry entries ?
Configuration files ?
There's no such Java API. If you need to install the JRE, then you could look at an existing deployment mechanism such as .rpm (others exist) and declare a dependency on a JRE. That way your chosen package manager will deploy all your pre-requisites.

This is a highly specialized topic, and I would be very surprised to see an answer here that satisfies your need for knowledge. If you are serious about this, you should be prepared to do your own work to research the concepts and implementation strategies.
Suggestions:
Survey what the existing tools do; e.g. by reading all of the available user documentation. It should be pretty obvious how they achieve most of the things that they do, at least from a high-level perspective.
Download the source code for one or more of the open-source products and read the code to figure out how it works / they work.
Start designing and building your own tool and develop your own practical knowledge.

Maybe start with the Windows Installer MSDN reference?

Related

Reading from USB port [duplicate]

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 years ago.
Improve this question
I'm trying to write a java application that accesses the usb ports to read from and write to a device connected through usb. The problem I face is that I don't know what exactly to use in java to do such a thing. I searched online and found something called JUSB but all the posts seem fairly old.
Currently I'm using the RXTX libraries but I sometimes run into some sync error. When I use C# to do the equivalent it requires far less code and I don't face any of the same sync error.
My question is, is there anything built into the latest version of the JRE I can use to access the usb ports (that is just as easy as the equivalent C# code)?
Been using usb4java for a year on cross platfom (Linux and Windows) and it works great.
See:
http://usb4java.org/
They are very active and have a very good javax USB front.
There is nothing equivalent to C#'s USB support in Java. Both jUSB and Java-USB are severely out-of-date and likely unusable for any serious application development.
If you want to implement a cross-platform USB application, really your best bet is to write an abstract JNI interface that talks to Linux, Mac and Windows native libraries that you'll have to write yourself. I'd look at LibUSB to handle Mac and Linux. Windows, as you've seen, is pretty straightforward. I just came off a year-long project that did just this, and unfortunately this is the only serious cross-platform solution. If you don't have to implement on Windows and your needs are limited, you may get by with one of the older Java libs (jUSB or Java-USB). Anything that needs to deploy on Win32/Win64 will need a native component.
You might want to have a look at usb4java - http://usb4java.org/index.html it appears to support Windows, Linux and Mac OS's and appears to be reasonably current at the time of posting. Is unfortunately under the LGPL so may not be suitable for commercial development.
See the jUSB or usb4java libraries.
The Java Communications API. This should provide similar functionality to the C# System.IO.Ports namespace.
If you're on a mac, USB's can be accessed with the /Volumes/ directory.
Example:
You want to write to a file in "Drive", so the filepath would be:
/Volumes/Drive/file.whatever
Not sure how it's accomplished on other platforms, but this is the simplest way I've found on a mac

Is it possible to Create Enterprise Archetict Extensions using Java? [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 8 years ago.
Improve this question
I am wondering if it is possible to build an AddIn Extension for Enterprise Architect in Java.
I am searching, but I have not found any concrete answers. Could someone give me a recommendation for this situation?
Well it looks like, you can't build Enterprise Architect AddIns just using plain java code. There's a readme.txt file to be found in your EA installation's Java API directory:
Enterprise Architect Java API Readme
The files in this directory can be used to access Enterprise Architect's COM automation API from Java. To use this API, please observe the following set-up procedure.
Copy the file SSJavaCOM.dll into any location within the Windows PATH. For example, the windows\system32 directory.
Copy the eaapi.jar file to a location in the Java CLASSPATH or where the Java class loader can find it at run time
Limitations and known issues:
1. You cannot currently use this API to write plug-ins for EA. It is only suitable for accessing the automation server API.
2. Due to the nature of Java interacting with native methods and COM, garbage collection is not optimal. Native COM classes and memory allocated for these is not seen by the Java garbage collector, so you should explicitly invoke a garbage collection from time to time when working with many objects using the Java API. This will ensure native memory is freed in a timely fashion.
You may be able, to provide a java code based .NET assembly. I'm not so well versed with this, but IIRC I've been reading it's possible.
IMHO the most straightforward way to build an AddIn is to use c#. Have a look at Geert Bellekens Blog: "Tutorial: Create your first C# Enterprise Architect addin in 10 minutes"
Here are some more opinions, why java doesn't seem to be a good choice as the core language to develop an Enterprise Architect AddIn.

Looking for (free) Java code editor (IDE) for Windows [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 8 years ago.
Improve this question
Not to be open-ended I will list my requirements.
Must have native UI (or at least .net the backend can be Java I don't care)
Must work with Ant (basic functionality is enough, as long as it shows Ant's output and double-clicking on [javac] errors inside ant outputs jumps to the referenced line)
Must have code completion (including my source code and third party .jars, no just JFC classes)
Extras (function which would help a lot):
Showing my classes and methods in a treeview
Alert for undefined symbols before compiling
Unicode support
Some form of integration with javadoc style documentation (reading JFC and other on-line documentation which was made by javadoc)
I think these are pretty down-to earth requirements.
Why don't you just use Eclipse? Then you could've listed about 200 more extras in your requirements...
Eclipse?! http://www.eclipse.org
Eclipse IDE is the best free Java IDE that I have used.
Visual J++ was an IDE from Microsoft that was shipped with Visual Studio until it was discontinued a few years ago. You might be able to get your hands on it and it should be able to follow your requirements to a certain point, but it is a discontinued product. (I don't think you mentioned it has be free.)
There has been Borland's JBuilder and possibly several other IDE's but I do concur with previous posters that Eclipse, Netbeans or IntelliJ will most likely do the job very well.
There's also Oracle's JDeveloper but since it's been rewritten I think it's also written in Java.
The only requirement that will be hard to meet is 'must have native UI'.
I long for the responsiveness of a native app
I doubt that you would settle for an online IDE then :-)
Googling for 'native java IDE' brings up (among others) Optistic. Might be worth a visit.
Lots of choices but not so many 'native UI' ones. Good luck making the right choice :-)
All the most popular IDEs should do what you have listed and a lot more. I prefer IntelliJ CE which is more productive for me. Eclipse and Netbeans are also excellent free IDEs.
In terms of screen update, I use a 2100x1600 window, sometimes locally and sometimes via VNC on our LAN and screen update speed is not an issue. Sometimes I have projects with a total of over 10,000 classes open. ;)
Update: I now use a 4K screen with over 30K classes in project with IntelliJ.
That would be either Netbeans or Eclipse if you are looking for something featurefull with nice graphical stuff, of vim or emacs if you are looking for something slimmer (with a much steeper learning curve)

How to write software for Windows using Java? [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 6 years ago.
Improve this question
I have just learned Java in my college. However, in that I can just write programs that are run in the command line. How can I create GUI softwares using Java, something like Notepad? I'm really sorry for asking such a basic question on this forum, but I am really interested in writing real-world software. Also, I've heard a lot about Python. How can I develop similar software using Python?
Java: Trail: Creating a GUI With JFC/Swing
Python: GUI Programming in Python
And since you mentioned creating a simple text editor, here's an example.
You can use Eclipse to develop Java GUI/desktop applications for Windows.
http://www.eclipse.org/downloads/
NetBeans is also an option.
For Python, check these links:
GUI Programming in Python
Is Python any good for GUI development?
Start by using an integrated development environment such as Eclipse or Netbeans. Both of them are free.
Both have visual editors to graphically design your program and assist you writing the actions performed in the code when you e.g. click a button or so. Personally I prefer Netbeans for this purpose as the gui designer does not need to be added as an optional plugin (maybe this is also not necessary any more for Eclipse).
Of course, to go beyond the first steps, you will need to read some documentation on how to build GUIs as suggested in other answers.
If your goal is to write native windows apps you might also consider switching to .Net (c#) which is not too hard to learn when you know programming basics in java.
.net is much better integrated in the windows environment and I think visual studio has a notepad example lying around somewhere.
Not saying you can't do this in java, sure you can.
Use netbeans, it has a old but good visual development mode. I cannot remember perfectly but it uses swing library i guess. Also it lets you develop not for only windows, but for mobile phones etc if you install the right plugin.
i think for beginners netbean is good because its interface is user friendly.
it manages the code in well define manner and make code easy to understand
You can use IntelliJ:
https://www.jetbrains.com/idea/
This is a very good Java IDE if you want to become,
going to become, or are already a developer.

Are there any open source command line tools to refactor java code? [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 8 years ago.
Improve this question
I use vim as my editor but I would like to get some of the same power of the IDE's for java when it comes to refactoring. Are there any commandline tools for refactoring java? I could probably hack something together using perl or vim scripting but if there is something already out there I'd rather use that.
You could try Eclim. The goal of Eclim is to expose the functionality of Eclipse within Vim. In particular, there are a few commands for refactoring that are supported.
Check out jrefactory, and its command line option.
Code refactoring is a very context-sensitive and interaction-heavy process which doesn't lend itself very well to command-line interfaces. There can be dozens of types of refactorings you could do to a particular file (or set of files) and coming up with a vim interface to integrate all of this would be a major challenge.
If you want IDE functionality, why not use an IDE? Especially with Java, which lends itself so well to automatic refactoring by a complex piece of software like Eclipse.
I would strongly advise you to use VIM within an IDE (e.g. VIMPlugin and Eclipse - this is the combination I use and it works very well).
I used to be a VIM diehard. However the refactoring and code analysis within a modern IDE will far surpass any capabilities that VIM will provide (with plugins etc.).
Don't get me wrong. I love VIM and still use it for all sorts of stuff. Modern IDEs are the most productive route forward, however.
I know this is an older question, but I was asking myself this question a bit back and decided to write one. It's new and it not "super awesome yet" but it's written in GOLANG and it's open source. DISCLAIMER, this is my project but I am not self promoting. I just thought I'd share with others that care about something of this nature.
https://github.com/asharif/ref

Categories

Resources