Flash Builder With Java Integration - java

i am trying to build a desktop application that requires no run time, therefore Flash builder seems to be the only choice.
There is a Flash Builder and Java Integration as show here
but it seems to be a server that is supporting it.
Its more applicable to website?
Is it feasible to do it , if i am building a desktop application?

Flash Builder, if used to generate a desktop app, will require Adobe AIR to be installed, which is a small runtime. If you prefer, it can accessed as a website as well, which will require the flash player be installed.
Flex, the language used by Flash Builder, has to be able to connect to Java somehow. You can use SOAP objects, BlazeDS, JSON, HTTP or even PHP/JavaBridge combo (Zend Server Community Server and PHP 5.3 have one).
The point is, there has to be an accessible server somewhere with JAR files on it. How you get to it is totally up to you.
For more FlashBuilder & Flex info, I recommend http://adobe.com/devnet/flex

Java require a VM to run, so there might not be a way to do it without one.

Related

Java - Make a java program run on a webpage

Does anyone know how I can make a java program run on a webpage? I know many browsers now days do not support Java for security risk, but say I was using an older Java version like Java 6.
What would I have to do to get it to run on a webpage? Of course saying "Allow" or "Run Program" whenever the user clicks a button is alright. I cannot use Javascript for this.
Thank you
Another option, apart from Applets, is Java Web Start:
Java Web Start software provides the power to launch full-featured
applications with a single click. Users can download and launch
applications, such as a complete spreadsheet program or an Internet
chat client, without going through lengthy installation procedures.
With Java Web Start software, users can launch a Java application by
clicking a link in a web page. The link points to a Java Network
Launch Protocol (JNLP) file, which instructs Java Web Start software
to download, cache, and run the application.
If you are planning to do something very CPU consuming is better to use Java Web Start. But if you need some JavaScript And Java interaction it would be better to use the old Applets.
If you are worried about browsers blocking or not supporting Java Applets, then Java Web Start is again a better option.
The following links may be of interest to you:
Java Web Start (Jnlp) Hello World Example
Java SE 6: Migrating Applets to Java Web Start Applications
These things are called Applets. They are considered to be a bit old technology but they are still used at some places.
You can find a tutorial here

Authenticating from PHP to Java and retrieve data via WSDL

Ok, so I inherited a project where our core program is built by another company (built in Java) and I have to build another program around it. Problem is that the Java program has to stay as is and I am only allowed to authenticate through to it and pull the findings once users go through there. I am not even sure what to ask for cause I've never cross authenticated before nor used a WSDL etc...
I am an intermediate/advanced PHP coder and would have rather built the entire thing from the ground up (it would be faster and customizable) but, i can't. this java application needs to stand on its own--maybe in an iFrame--and once our users sign into our site, they need to automatically signed in there so when they click on it from the panel, they perform their actions which mark them complete there. We read their completion and mark them complete on our side (via PHP). Their develops have a WSDL file that supposedly we pass the information and we can read their completion and status stuff. No idea how to use it.
The dev environment is IIS 7 (im more used to linux and unix environments)
Any idea where I should start? How to do this? What questions I should ask their developer for so I can develop the PHP side of things?

Use SWT Browser Widget to Write Desktop Application

I recently played around with the SWT browser widget (which is great). I am wondering if I could write a full desktop application with it (with java services behind - e.g. persistence) and what drawbacks I would have to consider. The advantage would be that people without java knowledge could work on the gui. Of course it depends on the requirements and I know that this is not a very specific question. But mabye someone already tried to build a bigger app this way and is willing to share insights.
Thanks
Marcel
I'm not sure I share your opinion of the SWT browser widget. AFAIK it's merely a shell into the default browser on your machine, merely with a few API access points. I've used it for minor things when I needed to show a web page from within the application. But writing a whole application? That doesn't make sense.
If you want to build a web-based application that runs in the browser against a Java based server framework, there are many AJAXian frameworks to do it. You'd still be doing JavaScript for your client code. And you'd still be dealing with all the complexities of different browsers. I'm not sure why you would want to host it inside an SWT application instead of just directly in the browser window.

What is "java web start" used for?

I was reading about java web start from wiki. Can someone please tell me
What is it used for?
A practical application of it; to make its use clearer.
Do other languages like C++ / C# have
anything similar?
Thanks,
Roger
Java Web Start is kind of like a successor to applets - it allows Java programs to be run from your browser (though unlike applets, they don't run within the browser). For a practical example, see the TopCoder Arena.
http://www.topcoder.com/contest/arena/ContestAppletProd.jnlp
Here, Java Network Launching Protocol (JNLP) is the protocol that defines how a Web Start application should be run (analogous to HTML telling a browser how a page should be rendered).
See the Oracle tutorials:
Lesson: Web Start
Deploying a Java Web Start Application
Java Network Launch Protocol
Java Web Start software provides the
power to launch full-featured
applications with a single click.
Users can download and launch
applications, such as a complete
spreadsheet program or an Internet
chat client, without going through
lengthy installation procedures.
With Java Web Start software, users
can launch a Java application by
clicking a link in a web page. The
link points to a Java Network Launch
Protocol (JNLP) file, which instructs
Java Web Start software to download,
cache, and run the application.
I'm quoting the Java Tutorial lesson on WebStart
For those of you who work with .Net something like Java Webstart is ClickOnce technology.
Java Web Start is used to write sandboxed desktop applications similar to Java Applets. Like applets they can be launched from a web browser, but they run in their own window - not inside the browser.
It runs just like a normal application, but started from clicking a web page instead of having to download and run an installer. An advantage is that it's very easy to get people who are afraid of all the security warnings to try your application. Another advantage is that you don't need to keep the browser open while you run your application. You can even install a shortcut to your application onto the user's desktop so they don't need to touch the browser at all once they have run it the first time.
The .NET equivalent is Click Once.
What is it used for?
To roll out and keep updated an application to clients. Clients need "only" a Java Runtime installed. This may be more interesting to read.
Java webstart is used to deploy/install Java applications over the network.
The alternative is to send an application (MyApp.jar) to the users who will run that directly. But if it is out-of-date, they could have collisions when the application talks to the server (for example, or other such badness).
It also allows you to package all of the required libraries. This is a HUGE benefit.
http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp
As mentioned above, it's a technology to allow you to 'push' an always up to date Java app to users. It's not often used on a consumer level, but has some adoption in a corporate atmosphere.
It's best used in somewhat controlled environments, and is especially useful to push a specific version of client software to control a server.
Do other languages like C++ / C# have anything similar?
Yes. Microsoft provides something called ClickOnce that provides a web-based installer.
Today i am looking for the same example about the Java web start...
I thing this link will work for you,i have used as a beginner.
Click Here
As mention With Java Web Start software, users can launch a Java application by clicking a link in a web page. The link points to a Java Network Launch Protocol (JNLP) file, which instructs Java Web Start software to download, cache, and run the application.
We had a project, a plugin for Protégé, which is an ontology editor.
Installing the plugin isn't that hard, but to give the user a quick impression how the plugin worked, we supplied a Java Web Start application on our site. The page is still active, the plugin may have some rough edges, since it hasn't been updated for a while ... http://dac.icore.at/one/solutions.
I'm currently not aware of similar products for C/++/#.
Java web start is the 0-install solution in the java world.
An application built to use Java web start (JWS) will be available as a link in a web site. This site will have the .jnlp extension.
When a user clicks this link (and clicks the "execute" button of his browser) , the javaws.exe runtime will be launched. This executable will download the application and dependencies (libraries, images, and so on) and launch the application using the provided main-class of the .jnlp file).
An extensive reference of JNLP content can be found at http://lopica.sourceforge.net/ref.html
Examples of Java web start applications can be found at Swing sightings.
Notice that, depending upon the chosen configuration, these applciations can also be automatically installed in start menu.

Java and Silverlight together forever

I want to display a silverlight web page inside my java desktop application.
Does anyone know of a plugin or browser control that I can use to do this?
Embed an appropriate browser window into the Java app and it can load the SL - there will not be any interaction / communication between the two without some hacky code. Multiple browsers support SL but you are better off using the an IE based one at present, the chrome support is not official as I remember.
How about an iFrame? In the nutshell... Alternatively you can make a request to .Net app from within your java server code using something like HttpClient and then serve markup that way - would be relatively easy thing to do (relatively since if there authentication involved things can get complicated fast. And if you want (willing) to get "sophisticated" and you are using portlet technology there is WSRP
For the desktop app I would go with HttpClient suggestion: get the content, parse it then do with it what you please unless that Silverlite app is also running as webservice then you have some additional options by utilizing components that can consume services
Eclipse's SWT provides out of the box web browser component based on IE and/or Mozilla engine. For swing application you can use one of ActiveX bridges, such as J-Integra or JDIC or EZ JCOM.
Use JDIC WebBrowser component

Categories

Resources