What is the name of javaw.swing bundle in eclipse plugins folder - swing

I try to run OSGi application as a standalone application but it fails because it can not find the javax.swing bundle.

OSGi is typically used for web-based "thin" clients.
Java Swing is exclusively used for desktop-based "thick" clients.
Q: Is your UI intended to run in a web browser? Are you sure you need Java Swing at all?
If so, please do this:
1) Look at these links:
http://eclipse.dzone.com/articles/dynamic-swing-osgi-demo
How to create Swing OSGi bundles on AWT EventQueue with Spring DM
2) Please post:
a) the exact error message you're getting
b) Your Java version
c) You Eclipse version (if applicable; otherwise give us some information about your build environment)

Related

Services and env in manifest file?

I have a web (online calculator for an example) which developed by my fellow tem members. Now they want to deploy in PCF using manifests.
Languages used : python, php and javascipt.
I gone through the docs about pcf with manifest.yml
In that I don't have any idea about services and env.
What is that services and how can I find the services for the above project and also how can I find the environment variables?
And tell whether these fields are mandatory to run the project in PCF.
To your original question:
What is that services and how can I find the services for the above project and also how can I find the environment variables? And tell whether these fields are mandatory to run the project in pcf.
Does your app require any services to run? Services would be things like a database or message queue. If it does not, then you do not need to specify any services in your manifest. They are optional.
Similarly, for environment variables, you would only need to set them if they are required to configure your application. Otherwise, just omit that section of your manifest.
At the end of the day, you should talk with whomever developed the application or read the documentation they produce as that's the only way to know what services or environment variables are required.
In regards to your additional questions:
1)And also I have one more query...like in our application we used python ok! In that we use lots of pacakages say pandas,numpy,scipy and so on...how can I import all the libraries into the PCF ??? Buildpacks will contain version only right?
Correct. The buildpack only includes Python itself. Your dependencies either need to be installed or vendored. To do this for Python, you need to include a requirements.txt file. The buildpack will see this and use pip to install your dependencies.
See the docs for the Python buildpack which explains this in more detail: https://docs.cloudfoundry.org/buildpacks/python/index.html#pushing_apps
2)And also tell me what will be the path for my app name if Java I can enclose jar files
For Java apps, you need to push compiled code. That means, you need to run something like mvn package or gradle assemble to build your executable JAR or WAR file. This should be a self contained file that has everything necessary to run your app, compile class files, config, and all dependent JARs.
You then run cf push -p path/to/my-app.jar (or WAR, whatever you build). The cf cli will take everything in the app and push it up to Cloud Foundry where the Java buildpack will install things like the JVM and possibly Tomcat so you app can run.
what should I do for application devloped using pyhton , JavaScript and php....
You can use multiple buildpacks. See the instructions here.
https://docs.cloudfoundry.org/buildpacks/use-multiple-buildpacks.html
In short, you can have as many buildpacks as you want. The last buildpack in the list is special because that is the buildpack which will set the start command for your application (although you can override this with cf push -c if necessary). The non-final buildpacks will run and simply install dependencies.
3) we were using postgresql how can I use this in pcf with my app
Run cf marketplace and see if there are any Postgres providers in your Marketplace. If there is one, you can just do a cf create-service <provider> <plan> <service name> and the foundation will create a database for you to use. You would then run a cf bind-service <app> <service name> to bind the service you create to your app. This will generate credentials and pass them along to your app when it starts. You app can then read the credentials out of VCAP_SERVICES and use them to make connections to the database.
See here for more details:
https://docs.cloudfoundry.org/devguide/services/application-binding.html
https://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#VCAP-SERVICES

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.

Web.config gone in Asp.net 5 mvc6, how about non web config?

Context
In asp.net 5 vNext MVC6, Web.config is gone, in favor of json file as config. However, in my web.config, I have settings of WCF clients, trace listeners of System.Diagnostics and Essential.Diagnostics, and these components (WCF clients and trace listeners apparently could not read json at startup). So in vNext Microsoft has abandoned System.Configuration apparently.
Question
Are there some migration path so I don't have to totally rewrite in order to make these components read config info at startup?
Short answer: It works fine in ASP.NET Core MVC on .NET Framework (4.5.1+), put your settings in app.config, but doesn't work in ASP.NET Core MVC on .NET Core.
Longer answer:
ASP.NET Core can run on both .NET Framework and .NET Core, so I guess the migration path is to continue using .NET Framework for now.
For System.Diagnostics, and Essential.Diagnostics (which I contribute to), I have been able to at least get a demo of this working in ASP.NET Core running on .NET Framework (not .NET Core).
In the .NET Framework, TraceSource, etc still load from the config. In an ASP.NET Framework project there will be an app.config file (not web.config) where you need to put the configuration sections.
Note: Just Building (Debug > Start new instance) does not update the .exe.config file in the bin directory; you need to do a Clean or Rebuild, and then Debug (or delete the output bin folder).
You can write to TraceSource either directly (for legacy code), or via the new Microsoft.Extensions.Logging, with the Microsoft.Extensions.Logging.TraceSource provider configured. (The new interface includes some nice hierarchical support features.)
Either way, it will load and write to the configured TraceSource, which can output to system TraceListeners.
You can also configure additional listeners from Essential.Diagnostics (although the RollingFileTraceListener wasn't correctly handling the {AppData} token in the filename, so I had to hard code the path to C:\Temp\Logs).
The above also works in a console app (simpler), with the .NET Framework 4.5.1 and above.
There is some example code in Essential.Diagnostics: https://essentialdiagnostics.codeplex.com/SourceControl/latest#Examples/TestAspNetCoreOnNetFx/Controllers/HomeController.cs
I suspect it may be similar with WCF: the .NET Framework version should continue to work, using app.config, but the .NET Core implementation may be a shell only.
On .NET Core:
Note that Essential.Diagnostics will not work on .NET Core (it doesn't support it yet, as at Feb 2017), and most system TraceListener classes are also not supported.
The only one that is is the TextWriterTraceListener, which I have got working with a manually created TraceSource, however from looking at the .NET Core source code, I don't think there is a way for TraceSource to automatically load configuration yet.

Windows Universal App SQLlite in Portable DLL

My project structure is defined like this:
LIB Com basic communication, (requests and responses)
LIB Com.BackgroundTask background task that will fetch new messages from server
LIB Com.Mediator background logic that will handle every exchange of information and interaction between Com and the ViewModel
LIB Model all Models for the Project, also the Databases should be defined here.
LIB Settings App settings.
Windows App Views/Controls for Windows
Windows Phone App Views/Controls for Windows Phone
Shared Basic App logic, Mediator init, ViewModels
the Problem is that you cannot reference the SQLLite extension in the (Portable) LIB Model but this is essentialy for the project structure to work. Otherwise the BackgroundTask would never be able to update the Database, am i right?
You can refer SQLite in a portable class library project using Portable Class Library for SQLite. This project has been initiated by Microsoft Open Technologies, Inc. working with the community.
This portable class library for SQLite available as NuGet package
simplifies the installation and development experience for .NET
developers by providing a single interface across Windows Phone,
Windows Store and .NET Framework 4.5.
With this solution .NET developers can develop against one portable
class library and do not have to worry about what assembly is loaded.
Drawback: Targeting x64 platform architecture is not supported at the moment.
Targets supported: x86, and AnyCPU (with "Prefer 32-bit" option marked).
Pre-requisites:
1) The developer visits http://sqlite.org/download.html, and downloads the required precompiled binary for Windows v3.8.5 (http://sqlite.org/2014/sqlite-dll-win32-x86-3080500.zip), extracts the sqlite3.dll file, and adds it as Copy-Always Content to the root folder of the project.
2) In Visual Studio, the developer uses NuGet Packet Manager Console to install the SQLitePCL wrapper package.
Inside the Package Manager Console, type: Install-Package SQLitePCL

Enabling Ant Tools in a new Eclipse Galileo installation

I have recently installed Eclipse Galileo with the PHP Developers Tools. I plan to install the Flash Builder 4 Plug-in to do ActionScript development as well.
I want to use Eclipse to both create an ant build script and execute it to compile ActionScript docs from an ActionScript 3 code library.
The problem is that when I try to run a build.xml file (which every site that answers the ant build questions says it should handle automatically) I never see an option to run it as an Ant Build, not can I find any way to associate XML files to Ant in the Preferences or External Tools dialogs.
I;ve seen numerous tutorials on build Ant build files, but never anything about running the actual build script.
Try to install "Eclipse Java EE Developer Tools" component. It's in "Web, XML, and Java EE Development" of "Galileo - http://download.eclipse.org/releases/galileo" repository.