NetBeans and One-Jar Creation for Stand alone application - swing

Please help me out,I have developed the simple application with two external jar files.While clean and build,it's creating a jar file for the application and the library folder in dist directory. When I try to execute as a jar,it's executing perfectly
But When I converted the jar into exe file using launch4j,after conversion,the execution is reporting NoClassDefFoundError.
I Hope, One-Jar is a solution for ma problem, But How to do One-Jar in Netbeans IDE or how to wrap all the dependency libraries with the application?

There are yet answers to this question here:
NetBeans - deploying all in one jar
Put external library to the JAR?

Related

How do I import Primefaces 6.0 source as maven project in Eclipse?

I followed Building From Source https://github.com/primefaces/primefaces/wiki/Building-From-Source instructions. Building the SNAPSHOT version project from command works well.
However, importing it into eclipse using the Existing Maven Projects wizard gives me a lot of errors in the Problems view. I fixed the lifecycle mappings by setting all to ignore.
I realized the generated source code in the target/generated-sources/maven-jsf-plugin directory but it was not picked up by the m2e plugins as a source folder automatically. So I included it into the eclipse build path manually. But then again, many compile errors show up in the generated code.
Does anybody use eclipse as IDE for primefaces development? How do you setup the eclipse project to develop primefaces?
The eclipse project uses Java Compiler compliance level 1.5 derived from the pom.xml maven-compiler-plugin settings. Setting the Java Compiler compliance level to 1.6 solved the issue for me.

ServiceStack as Windows Service with Razor - Setup Project

I have a servicestack project using razor exposed through a windows service, and need to create a setup project to install it (as opposed to the batch files in the demo's I've seen).
Any suggestions on how to accomplish this with a packaged setup project? Looking at the folder where the windows service files were installed, it only has the dll's, not the razor views... so I coped those over, and now I see this:
Not sure why you're getting that error, can you double-check that you're deploying the orignal Razor source files and not some interim build.
Otherwise some other options for hosting Razor is to change them to Embedded Resources, that way the original Source files get compiled into your .dll so you don't need to deploy them to your project.
Or you can pre-compile Razor Views that way the implementation is compiled into the .dll.

Compiling sqlite-winrt for using SQL in WinRT/WP app with SQLite

I'm trying to use the sqlite-winrt library at https://sqlwinrt.codeplex.com (cf. http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/05/30/sqlite-winrt-wrapper-for-windows-phone.aspx) because I need to access an SQLite database via SQL commands in a WinRT 8.1 and a WP8 app and this library seems the only available option.
Anyway, there is no binary release and if I try compiling the source I get several link errors for unresolved externals against the SQLite DLL. I posted an issue at codeplex but got no reply yet, so I was wondering if anyone had already managed to successfully compile this lib and how (or if you know of any viable alternative for RT8.1 and WP8). Here is what I did:
downloaded the latest source from the site.
downloaded and installed 2 VSIX from http://www.sqlite.org/download.html: sqlite-winrt81-3080002.vsix for RT 8.1 and sqlite-wp80-winrt-3080100.vsix for WP.
executed the powershell scripts in each subfolder of the source code solution, which are required to update the projects with newer releases of the SQLite for WinRT extension. The current versions of the scripts refer to SQLite for WinRT 8.1 (prerelease) which is the same I downloaded above.
opened the VS2013 solution and removed the RT project (I just need RT8.1 and WP, this was for WinRT 8.0).
5) built the solution, which failed with link errors.
If I see the RT8.1 project properties, I can confirm the reference to SQLite is under C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\SQLite.WinRT81\3.8.0.2.
Did anyone manage to use this lib? Thanks!
I also once had that problem. I fix it by editing the project file manually. At that time, the powershell script updating the wrong path. That's why I always failed when compiling my project. After I edit the project file using external text editor (I use sublime text), the projects are linked correctly.
You can try DatabasesCx. It is another SQLite Wrapper using Windows Runtime Component technology. It is freeware distributed as precompiled binary. You can find the details at http://www.almanacsoft.com/databasescx

Glassfish Applications Not Starting

I was just reading about using libraries in glassfish. That is, put jar files in a 'centralized' location so that it can be accessed from different web applications. domains-dir/lib/ext is one of such locations. I put some jar files there and restarted the server. The restart was successful but no application would load; not even the admin console. I investigated this and found the culprit to be the primefaces jar file I put. On removing it, glassfish worked properly. I've tried versions 3.1 and 3.2 of primefaces and the results are the same. On checking the server log, I find that, with primefaces in the ext folder, the class javax.faces.context.PartialViewContextFactory fails to load. Any idea what might be causing this. I should probably try the other library locations like domains-dir/lib/ but I'm curious.
By the way, I'm working on a windows 7 OS and using glassfish 3.1.1
Thanks.
Just put the libs in domains-dir/lib/.
From the Glassfish manual:
To use the Common class loader, copy the JAR files into the domain-dir/lib or as-install/lib
directory or copy the .class files (and other needed files, such as .properties files) into the
domain-dir/lib/classes directory, then restart the server.
Using the Common class loader makes an application or module accessible to all applications
or modules deployed on servers that share the same configuration.However, this accessibility
does not extend to application clients.
More information about classloading in Glassfish can be found here.

How do I include MySql.Data.dll when deploying C# console App

I am just rewriting the question here:
I am building a console app that uses MySql connector. So I add reference to the dll in the project. When I compile the solution, I get an exe that runs fine on my own machine, but when I copy the exe to another machine, it doesn't work, because it can't find the Mysql dll. I have tried to copy the dll into the same folder as the exe on the other machine but no luck.
I also tried putting the dll in the same folder on same machines, but that didn't work either.
How do I deploy the dll correctly with my exe?
I had some different errors in the setup. It has to be the correct assembly dll (6.3.0) to work and also I needed to create the user#server and grant him privileges. But the dll is accessible when it's in the same folder as the exe.