How to deploy Java Communications API - java

I've been developing a java application with the eclipse RCP which requires the Java Communications API. Now as the javax.comm has to be setup first (install javax.comm.properties, win32comm.dll and comm.jar) my question ist: How should I deploy my application to make sure javax.comm will be setup on the user's machine? Should I provide an installer which does the setup or should I let the application itself export the files in their respective directories?
I have never before done such a thing, so I'd appreciate any help.
Thanks

I'm using RXTX instead of Java Comm, but the problem is the same, i think. The RXTX site has a documentation about it, please see the Wiki. The description is for Eclipse 3.3, but works for 3.5 too.

How would you like to distribute your application? As a JAR, I assume? In this case you need to setup the JAR's manifest.mf file with a Class-Path entry which contains semicolonseparated relative paths to the desired resources (relative from the JAR file itself on). You can distribute your application with the javax.comm stuff included and if necessary write a readme.txt with installation instructions.

Related

how to install a jar library in liberty web sphere IBM in default server

I am trying to install a jar library in the default server in Web Sphere liberty IBM, I already tried putting it in the folder: ..\wlp\lib but the server doesn't recognize it.
I donĀ“t knoe if I need a xml configuration or some thing like this.
any idea that I may be doing wrong?
the library that i wanna put in the server is: com.ibm.ws.webservices.thinclient_8.5.0.jar
The wlp/lib directory is intended for Liberty feature bundles. If you want to install a JAR file that can be loaded by multiple applications, you will need to create a shared library. Instructions for creating shared libraries are available here: https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_classloader.html
It is also possible to install a JAR file that can be loaded without needing to make any configuration changes - this is called the global shared library. To make that work, you would need to copy the JAR file to the wlp/usr/servers//lib/global or wlp/usr/shared/lib/global directories. More info here: https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_classloader_global_libs.html
There are other ways to add JARs to make them available to applications and/or the Liberty runtime called user features and product extensions, but that probably goes beyond what you are looking for. If you want more information on these approaches, you can find them here: https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_feat_develop.html

jsprit as backend for php web application

I might be barking up the wrong tree here as I have no experience with java programming.
I came across jsprit a java based VRP solver which looks very impressive and I was wondering if it can be used in a php based web app.
I have installed tomcat and JavaBridge, I have downloaded the jsprit source and binaries.
Is it possible...
to use the binaries directly by creating and deploying a .war file?
or
use the .jar files via JavaBridge?
or would I need some kind of java web app to act as a wrapper?
I have seen an app on github which looks to be a wrapper but it doesn't look finished or still active.
Thanks for any help...
After further research I found the anser myself.
I downloaded the JavaBridge template .war file and renamed it to jsprit.war.
I then downloaded the binaries for jsprit.
Using 7-zip I added the jsprit binaries to the newly renamed jsprit.war in the WEB-INF\lib folder.
Installed and setup tomcat.
Installed php5.cli.
Using tomcat web app manager I deployed the jsprit.war file.
Now, by including http://localhost:8080/JavaBridge/java/Java.inc in my php page I am now able to access the jsprit classes using: $location = new java('jsprit.core.problem.Location');
Hope this helps someone else in the future.

How to set a classpath automatically during the installation of an excutable java application?

I am writing down an example of what I was trying to do.
But this is just one example, I am sure there would be many. So I want a generalised answer for this.
I was trying to make a java desktop application which reads the word documents. I realized I need some Apache libraries/APIs that would help me do it.
So I downloaded the library.
But now I need to set the classpath of the files from the library.
I am a developer and I can do it, but imagine giving such instructions of setting a classpath to a complete non-developer user.
I was wondering if when I am over with the making of this java application, I would make it executable (exe) application and when someone installs it, the classpaths are set automatically during the installation and the apache library files are automatically extracted.
How can I do it? Can someone explain me in detail - step-by-step?
Please consider using some development IDE, like (free) eclipse for instance.
Then crate new folder (clled lib for example) in your project, copy the library into it,
then click on your library by the right button and select "add to build path"
As already mentioned - best way to do it is to use Manifest file in your jar. Official documentation: https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html

How to include files with NetBeans Platform Framework Application

I have a bunch of .ini files that I wish to include with my NetBeans Platform framework Java application and I do not know how to do that. What I want is to include these files with the default NetBeans Platform framework installer. Also, how do I access these files using Java code?
Please note that my question is about the NetBeans Platform framework, not NetBeans IDE.
Add the files to the application Jar. Access them using the advice seen in the info. page on embedded resources (see tag above).

Installing a game on Tomcat. Newb here

this might be a tall order or it might be ridiculously simple. I wanted to run this game on my website: https://github.com/ajanata/PretendYoureXyzzy
Unfortunately I have no clue how to make something like this work. There didn't seem to be an installation file, so I can only imagine it's painfully obvious to anyone familiar with this sort of thing. I recently ordered a trial of a shared Tomcat server, since I'm assuming that's needed to run all the Java goodies.
If there are any simple instructions I should follow to install this, it would be much appreciated if you could share them!
You need to download the source from the Github link you provided and then download Eclipse - Java EE. You then open Eclipse and choose File->Import->General->Existing Projects Into Workspace and choose the folder you just downloaded. You can then choose Export->Web->WAR file and export the WAR file.
You then download and setup Tomcat as described here (ignore the parts after Tomcat is running and you can access it at http://localhost:8080) and install the WAR as described here.
If you are feeling exceptionally lazy I have built the war here. You just need to drop it into the webapps folder in your Tomcat installation and then restart your server. You can then access it at:
http://localhost:8080/cah.
Hard to say without looking deeper into the project, if they create a .war file somehow, just copy the .war file into [tomcat home]/webapps directory and your application will be deployed. You can then acces it at yourmachine:8080/warname
where warname == the name of the war file without the .war extension.
There appears to be a SQL script with the project as well, not sure if there is some database you might need to setup which could get tricky.

Categories

Resources