javafx communicate with serial port with javax.comm - javafx-2

In JDK 8 u 5 I have sample project that uses comm.jar and win32com.dll to communicate with a serial port.
I setup javax.comm correctly and put the related files in the JDK and JRE and was able to run sample code with out error.
I then created a JavaFx project with netbeans and used the sample source code, and also generate Key and set netBeans to sign my code. I also imported the cert to my system and this file to the java exception list.
When I run this with JavaFx it works correctly and communicates with the serial port.
but when run it on a browser I get a javax.comm.NoSuchPortException. If I click on the jnlp file and run it on web start the same things happens.
What is wrong? I'm sure javax.comm is correctly setup on my computer, the jar file is self signed, and the generated cert file is imported. Why does it work on desktop mode but do not work on browser and web start?

Related

Download Settings for Text Files in JSF PrimeFaces

We have a web application hosted on Linux server running Apache Tomcat 6. The application provides a feature of downloading text files through fileDownload tag of PrimeFaces. If we run the application on Eclipse and "download" the file (located on my Windows 7 machine) through the web browser, everything works fine. But when we deploy the application on the Linux server and download the file and open it in Notepad, it doesn't have any line breaks i.e. everything is shown in one line.
Notepad++ shows the file as it should be but we need the same for Notepad too. Is there any setting for Linux or PrimeFaces to make sure that the file transferred to the client side with line breaks for Notepad?
I have Googled but could not find anything related to this.

IIS does not start .net core 1.0 executable

so after .net core 1.0 got published I started a new console project and imported the code from a small prototype that is supposed to run without IIS. Besides having to use net46 in my project.json due the not-yet updated MongoDB.Driver, that worked fine. When I build the app in Visual Studio a small App.exe with a lot of dll is build and can be run fine locally without IIS.
I then noticed the option to build for IIS Express and thought that I can use the IIS on our server (IIS 6.2, Windows Server 2012 R2) too. It publishes fine with WebDeploy, but nothing happens after that. I was following this official guide. I installed the .NET core Windows Server Hosting bundle and everything appears to be in order, but when I browse to the url, I get a ERR_NAME_NOT_RESOLVED. Theapp.exedoes not appear in the Task Manager and I can't find any log file, although it is enabled in theweb.config. I can execute the app manually, but then it only listens on the defaultlocalhost:5000` address.
If I understood it correctly, the IIS is supposed to act as a reverse-proxy to the dotnet tool which starts a dll, but in my case it's already a compiled exe that works standalone. But I can't figure out how to build a dll from this app..
What am I doing wrong?
If you target full .NET Framework the application will be .exe and not .dll and it is fine. ERR_NAME_NOT_RESOLVED indicates that the url you provided in your browser could not be resolved and the request to the application was not made. AspNet Core Module starts the application on the first request and because the host could not be resolved the request was not made and the application was not started. Once you figure out why the name could not be resolved and you still have issues with making your application work with IIS take a look at my post which explains how things work and how to troubleshoot issues. This, however, only applies after the request can reach your application.

Unable to connect to ODBC data source when running application from another PC

I have an application, that when running off my main computer, works fine, but when i attempt to run the application off my laptop, the connection to the database fails. Its using this connection string :
Dsn=XAMPP;description=USB Server;server=localhost;uid=root;database=mod_manager;port=3306
When i attempt to connect i get the message:
Data source name not found and no default driver specified
is there a specific .dll that i must include with the executable?
EDIT:
I have tried installing the ODBC driver supplied by oracle, and also tried packaging all the .dlls related to the .exe file. Also tested it on a 3rd computer, this one running windows 7, as my laptop was running win8, and my main pc is running 7. Still getting the error. I appears my main PC has something that the others do not...
I would use the ODBC Control panel and check you have created a DSN called XAMPP, thats what the connection string is telling the driver manager to look for and its reporting back it can't find it.

Why netbeans is trying to connect to a debug proxy?

I'm trying to setup netbeans 7.3 with xdebug 2.2.1 on a Debian wheezy. I'm trying to make it work on a localhost-basis, it is, only one xdebug user connecting from the same machine (the most common configuration). After some hours I have this:
Xdebug is working: I execute the debugclient included with the Xdebug sources and it works (i.e. when I type in the Chrome address bar http://localhost/file.php?XDEBUG_SESSION_START=netbeans-xdebug the debugclient receives a XML response and I can interact with it sending the appropiate commands.
Other debug clients can connect: I have checked that it works with Sublime Text 2 (but ST2 is not an option to substitute netbeans by the moment).
Netbeans is blocking when using the debugger: If I press F6 (Run the project) the projet main page is launched on Chrome, but if I press CTRL+F5 (Debug project) a "Waiting for connection (netbeans-xdebug)" message appears and the project main page is not launched in Chrome until I press on Finish debug session. Then the page is launched but without debugging support, obviously.
Netbeans seems to be trying to connect to a debug proxy: I have captured the port 9000 packets and when the other debuggers (debugclient and ST2 plugin) send XML formatted requests, netbeans receives a weird proxyinit -p 9000 -k netbeans-xdebug -m 0 string. Proxyinit seems to be an informative request in order to setup multiuser system (but I only need a user).
This is the capture when using debugclient
and that's the same when using netbeans
I'm a bit confused because it is supposed that the XML message is sent by xdebug agnostically, it is, without any information about who is waiting to receive this message...
So the question is: why netbeans or xdebug (I don't know who) is trying to connect to a debug proxy?
The problem is that Netbeans is configuring the projects by default as a remote project. To disable this, you have to go to project properties / Run configuration / Advanced and here you have to remove Debugger Proxy: Host and Port. Click Ok and everything will work as expected.

Setting up Eclipse with Tomcat 7 in Arch Linux

I have recently installed Arch Linux and using Pacman I installed Eclipse and Tomcat 7 using the relevant guides in the ArchWiki. I followed the guide Apache Tomcat Eclipse Integration, An Illustrated Quick Start Guide to integrate the two together.
To sum it up, I did the following:
Installed WPT from the Eclipse Install New Software feature.
Opened the new Dynamic Web Project wizard
During the wizard I selected Apache Tomcat v7.0 and set the Tomcat installation directory to /usr/share/tomcat7
Completed the wizard
Right clicked on the server tab (located at the bottom of the IDE) and clicked on the new server dialogue
In this dialouge is were I encounter an issue. When I choose Tomcat v7.0 Server the error Cannot create a server using the selected type pops up.
I'm suspecting that it might be a permission issue since I am not running Eclipse via root, but I am not sure how to set them up for this scenario. Other than that I am not sure if maybe it is a directory issue, that is, Eclipse is trying to locate a specific folder which is located somewhere else.
I am uncertain if this is an Arch Linux question specifically or Linux in general.
As mentioned before this sounds very much like a permission issue. Ensure that the user running Eclipse has read and execute privileges for Tomcat. Also you should check that the Tomcat server can start properly without running from Eclipse. Verify that it can bind to the default 8080 port, etc.
You can check the Tomcat logs for the details and the configuration file for Tomcat is usually in the <tomcat base>/conf/server.xml.
As you already suspect, it is probably a permission issue. Check that your user is added to the tomcat group and make sure that scripts in /usr/share/tomcat7/bin are readable and executable by tomcat group members. Also it is important that tomcat group has read access to /usr/share/tomcat7/conf files and of course the permission to enter the directories itself.

Resources