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.
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 8 years ago.
Improve this question
Are there any libraries or methods that would make sharing code between C++/Java and IOS/Android easier? I realize we have JNI and IOS can use C++ pretty much directly, but it seems like it could be easier.
Microsoft Universal Windows Apps and Chrome Apps are (sort of) doing this.
Open Source is preferable.
I'm using Qt Creator a lot. With the latest versions, you write your whole application in C++, using Qt toolkit, and you can compile it targetting PC, Android and iOS (never tested this last one). If you need to call some SDK functions not available in Qt API, they provide wrapper objects to create and manipulate Jni objects, and you can also execute pure Jni code (loading a java file) if you want to.
If you are looking to share Java, you could try to use this: https://github.com/google/j2objc. I am not certain I'd say that it is easier than using C++. Each option will have some challenges. The downside to j2objc is that it is a translation of Java to Obj-C. So if there is a bug in it (note the comment in the desc which indicates it is between alpha and beta quality), you will need to figure out how you deal with it.
Admittedly, I have only done limited Android dev, and for that, it used the NDK and had a C++ lib which was shared between iOS and Android. I've also developed apps for iOS that were probably 95%+ C++.
BTW, your question is actually a bit vague. If you are talking libs, you should specify what areas you are looking to solve for. Your solution will vary based on your goals.
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
I need to manipulate control flow graphs for Java code in a project. What might be a good java library to generate control flow graphs in Java. So far I have found a couple eclipse plugins (heavily dependent on eclipse APIs) and standalone tools (cannot embed in my code).
A tool to do this stuff is Soot, and this questions is a duplicate of Tool for generating control flow in Java
I'll throw another tool into the mix.
Atlas is an Eclipse plugin that enables program analysis. It has a querable graph database that includes the control flow graph (as well as data flow and other relationships).
jSonde will create sequence diagrams from your actual running code (which is arguably more useful than from source, since source analysis will not show implementation-specific functionality).
javacalltracer does something similar.
Most tools are integrated into Eclipse/similar so they have access to the AST, which makes such things pretty trivial.
It's actually not ridiculously complex to pull the information from byte code yourself (and it's an interesting exercise). Or instrument using AspectJ and create the runtime information yourself.
Edit Original answer, still valid.
JGraph is open-source, and pretty cool.
JDiagram is a Swing component, commercial product.
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?
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 5 years ago.
Improve this question
I'm looking for a library or toolkit (so I don't have to write it) that will allow me to do common things like the following in Linux:
Get the uid for a username.
Get user / group membership information.
Get information about free space on disk drives.
Any other potentially useful API calls that are not normally available in Java because they break portability.
Anyone out there have any ideas?
Not a wrapper for any specific library, but the JNA (Java Native Access) "provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code"
No JNI or native code is required. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes. Access is dynamic at runtime without code generation.
JNA allows you to call directly into native functions using natural Java method invocation. The Java call looks just like it does in native code. Most calls require no special handling or configuration; no boilerplate or generated code is required.
The JNA library uses a small native library stub to dynamically invoke native code. The developer uses a Java interface to describe functions and structures in the target native library. This makes it quite easy to take advantage of native platform features without incurring the high overhead of configuring and building JNI code for multiple platforms.
Using JNA, you should be able to call the Linux API directly (same as you would from C).
POSIX for Java sounds like a good place to start, at least. Remember that most of those things you listed are not "Linux", they are just plain old POSIX.
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 would like to read the text and binary attachments in a saved Outlook message (.msg file) from a Java application, without resorting to native code (JNI, Java Native Interface).
Apache POI-HSMF seems to be in the right direction, but it's in very early stages of development...
msgparser is a small open source Java library that parses Outlook .msg files and provides their content using Java objects. msgparser uses the Apache POI - POIFS library to parse the message files which use the OLE 2 Compound Document format.
You could use Apache POIFS, which
seems to be a little more mature,
but that would appear to duplicate the efforts of POI-HSMF.
You could use POI-HSMF and contribute changes to get the
features you need working. That's
often how FOSS projects like that expand.
You
could use com4j, j-Interop, or some
other COM-level interop feature and
interact directly with the COM
interfaces that provide access to
the structured document. That would
be much easier than trying to hit it
directly through JNI.
Have you tried to use Jython with the Python win32 extensions (http://www.jython.org/Project/ + http://python.net/crew/mhammond/win32/)?
If this is for a "personal" or "internal" project Jython with Python may be a very good choice. If you are building a "shrink wrapped" software package this may not be the best option.
Apache POI-HSMF.
You can start from the example given in below link.
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/examples/src/org/apache/poi/hsmf/examples/Msg2txt.java?revision=821500&view=markup&pathrev=821500
Further read library docs.