JNLP and WEBSTART newbie
Hi All,
I have a few queries on this technology.
1) What is the relationship of JNLP and WEBSTART. I thot that WEBSTART is a reference implementation of JNLP api from SUN. Heard that other companies also have implementation of JNLP. Is it true ?
2) In the JNLP api(s) whats the use of the classes ?
BasicService, ClipboardService, DownloadService, FileOpenService, FileSaveService, PrintService, and PersistenceService
3) Do we have to use these classes to make an application available thru WEBSTART ? if not then when will they be used ?
4)Does webstart and jnlp used only if your application is published on the webserver(HTTP). Can I use webstart to start an application from a shared drive/mapped drive on another PC via File protocol ?
Pls. advise.
Thanks,
Net5nuts
Hi net5nuts,
check out the Lopica Web Start Paradise for answers to your question @ http://lopica.sourceforge.net
I good place to start is the Web Start Link-opida @ http://lopica.sourceforge.net/links.html
- Gerald
Similar Messages
-
JAXB v1.0.2 and Webstart
Hi,
I'm trying to use JAXB within an app that is started via JNLP and WebStart.
If i add all the JAXP jars to the JNLP file the app fails to start when JAXB calls into some xerces code that tries to access java.home.
java.security.AccessControlException: access denied (java.util.PropertyPermission java.home read)
/* stack trace */
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:95)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.getXMLReader(AbstractUnmarshallerImpl.java:80)
If i dont put in the JAXP jars then i get the following:
Caused by: java.lang.RuntimeException: Installation Problem??? Couldn't load messages: Can't find bundle for base name org.apache.xerces.impl.xpath.regex.message, locale en_US
at com.sun.msv.datatype.xsd.regex.RegexParser.setLocale(RegexParser.java:132)
at com.sun.msv.datatype.xsd.regex.RegexParser.<init>(RegexParser.java:122)
If i put the jaxp jars in jre/lib/endorsed, then everything works - except that isnt going to work for a remote client.
So, question is why does xerces require access to java.home ?I am getting essentially the same exception when running my app from command line:
java.lang.RuntimeException: Installation Problem??? Couldn't load messages: Can't find bundle for base name org.apache.xerces.impl.xpath.rege
x.message, locale en_US
at com.sun.msv.datatype.xsd.regex.RegexParser.setLocale(RegexParser.java:132)
at com.sun.msv.datatype.xsd.regex.RegexParser.<init>(RegexParser.java:122)
at com.sun.msv.datatype.xsd.regex.ParserForXMLSchema.<init>(ParserForXMLSchema.java:71)
[ snip ]
The same code works find when running inside a webapp on Tomcat 5.
Did you ever find the source of your problem, and indeed a solution? -
User access control and WebStart
I'm considering tools and utils for a new project and WebStart looks like it could suit our needs just perfect.
Just one little question:
If I have a system with multiple applications controlled by WebStart, is it possible to restrict user access?
I need to be able to present different selections of applications to different types of users, is this possible to configure/code for WebStart?
Thankful for pointersAt what point do you want to treat different users
differently (like allowing access to different apps)?
Possible points could be:
- at the webserver level (different download pages,
that are access protected)
- different Web Start application caches (as far
as I understand under Win32 all users share
one cache - but this seems subject to some
property configuration in WebStart)
- within the application (the app expecting different
license keys, passwords or such)
- within Web Start (Web Start utility asks for password,
this could be achieved by writing a custom jnlp
client - think openjnlp as example
http://openjnlp.nanode.org/)
I think the first two options are not useful, as
users might get the application somewhere else
and just copy it onto their box - this is also
true for the last option.
So I would put access control into the applications
themselves. -
Can the JNLP and the jarred application be on different servers
Can the JNLP and the jarred application be on different servers? If so, how would I alter my JNLP file to include the url of the second server?
The reason I ask this is that my app is being uploaded to a shopping cart, to be available for purchase. The problem is that this shopping cart allows ONLY one upload for each item that's available for purchase, and the vendor of my shopping cart say that for security reasons I cannot store files in other places on that server. The problem is that I need the JNLP and the JAR for download. I thought that the simplest solution is to put the JAR on a different server, and in the jnlp specify the URL of the jar. Is that possible? Or, do you see another solution?
I appreciate your help - I REALLY need to take care of this ASAP!
Here's my jnlp:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp
spec="1.0+"
codebase="http://server_where_jnlp_is/subdir/"
href="myjnlp.jnlp">
<information>
<title>Title</title>
<vendor>vendor</vendor>
<homepage href="http://www.homepage.com" />
<description>bla bla bla</description>
<icon href="icon.gif"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.2+" />
<jar href="myapp.jar"/>
<nativelib href="libs.jar"/>
</resources>
<application-desc />
</jnlp>I worked it out! What I did was I changed the jar href and the nativelib href to point to a different server
eg:
changed <jar href="myapp.jar"/>
to
<jar href="http://www.otherserver.com/myapp.jar"/> -
Hi
I would like to know how to protect the jnlp and jar files against anyone who just types the URL in the browser Address bar.
Thanks
StevenHaven't tried, but if your jnlp app must check for updates on every startup and your files (both jnlp file and jars) are in a password protected folder (using digest or plain authentication over a SSL connection, for example) then you may be in trouble. Will JWS recognize this situation on an update check and prompt for login/password? (related to web server's folders).
Regards -
Jar, jnlp, and documentation
i have three questions.
1. Can image files go into a jar file?
2. What goes into a jnlp file?
3. Is there documentation on swing that can be downloaded and tell you about all of the different objects you can use? I downloaded one but there were know pictures and i need pictures to see what it is that i would be using.alright i got the above code so that it no longer displays the error. but now i get a new one. this time the error says:
An error occurred while launching/running the application.
Title: Text Editor
Vendor: Justin Lafferty
Category: Security Error
Unsigned application requesting unrestricted access to system
Unsigned resource: http://crazedragon.awardspace.com/TextEdit.jar
so i changed my code to this:
<?xml version"1.0" encoding="utf-8"?>
<!-- JNLP File for LottoMadness Application -->
<jnlp
codebase="http://crazedragon.awardspace.com"
href="TextEdit.jnlp">
<information>
<title>Text Editor</title>
<vendor>Justin Lafferty</vendor>
<homepage href="http://crazedragon.awardspace.com" />
<offline-allowed />
</information>
<security>
<j2ee-application-client-permissions/>
</security>
<resources>
<j2se version="1.5" />
<jar href="TextEdit.jar" />
</resources>
<application-desc main-class="TextEdit" />
</jnlp>and i get the same error. how can i ifx it so i can get a prototype on the web ? -
Hi all,
I'm a newbie to the JNLP stuff. My situation:
I have achieved to start a applet with JNLP. It seems to work. Now my questions:
1) The Java-Window in which the applet runs shows the default java cup of coffee icon (left upper icon, taskbar icon). Is there a way to change this icon?
2) When the java applets ends, the window containing the applet does not close by itself. Is there a way to tell the container window to close if applet execution ends?
3) When the applet is started the status bar of the container window shows "Applet running...". Is there a way to get rid of that?
Thank you in advance.
Best regards
Andreas MockFirst of all: Thank you for your reply.
1) The Java-Window in which the applet runs showsthe
default java cup of coffee icon (left upper icon,
taskbar icon). Is there a way to change this icon?get access to this Frame (using sequence of
getParent() calls) and then call
Frame.setIconImage(image)I have an applet binary and no chance to change the source.
I assume that all your hints are valid only if I could change the
source code, isn't it?
Would it be possible to start a kind of wrapper-applet which does all the settings and calls the "real" applet afterwards?
what do you mean by "ends" - unlike in plugin you can
call System.exit() in a webstart appletI really don't know what the last statement of the applet is.
Can I query the state with javascript in a Browser using Java-Plugin?
call Applet.showStatus("");
on your applet (to make blank)see 1)
Thank you
Andreas Mock -
Generated JNLP and closing the original browser window
Hi All, This is my first post so bear with me. Here is my problem.
I am using Web Start for an application.
I need to check to see if web start is installed or not.
If it is NOT I need to auto-install
if it is I need to call a servlet that dynamically generates the jnlp with the user that I passed in as <arguments/> maybe other arguments in the future also
I need to shut the original browser window
I will use this servlet in multiple web apps
I have it working like this but I don't think it is clean enough
I call a servlet with the syntax checkJREServlet?USER=username
this servlet writes out:
<html>
<body>
<h1>Installing Java Runtime</h1>
<OBJECT
CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="0" height="0"
codebase="http://<myservler>/<plugins folder>/j2re-1_4_2-windows-i586.exe#Version=1,4,2,0">
<PARAM NAME="code" VALUE="redirectAndClose.class"> //my applet class
<PARAM NAME="archive" VALUE="RedirectUtil.jar"> //the jar where my applet class is stored
<PARAM NAME="archive_cache" VALUE="RedirectUtil.jar">
<PARAM NAME="type" VALUE="application/x-java-applet">
<PARAM NAME="where_to_next" VALUE="http://<myservler>/<mywebapp>/openAppServlet?USER=username">
You did not install Java.
<p>Please use the <b>Back</b> button to return to the previous page.
</OBJECT>
</body>
</html>
I have redirectAndClose which is:
import java.applet.Applet;
import java.net.URL;
import java.net.MalformedURLException;
import netscape.javascript.*;
public class redirectAndClose
extends Applet
java.util.Timer timer = null;
int seconds = 5;
public void start()
try
getAppletContext().showDocument(
new URL(getCodeBase(), getParameter("where_to_next")), "_blank");
//now we have to close ourselves in 5 seconds
timer = new java.util.Timer();
timer.schedule(new java.util.TimerTask()
public void run()
timer.cancel(); //Terminate the timer thread
destroy();
, seconds * 1000);
catch(MalformedURLException e)
throw new RuntimeException(e);
public void destroy()
super.destroy();
//close this window because we don't need it
JSObject win = (JSObject)JSObject.getWindow(this);
win.eval("window.opener=self;self.close();");
If try to close without a timer my entier session gets killed, including my webstart app that the openAppServlet wrote out the jnlp for
I hate this because it is not definite. I want to DEFINITELY know when my webstart app is open and I can close this original window. Like a whenWindowExists then close me but I have no clue how to do this.
The "where_to_next" location is a servlet that will dynamically build a jnlp file specific for each web app building it from parameters in web.xml for each individual web app. Basically I will have to store the actual name of the class, the jar href's I will be needing, title, vendor, description, basically everything that can be different.
So what I need is some kind of library so I can include it in multiple web apps EASILY. I don't want to have to write a document on how to include this thing. It should be self explainatory. I originally just mapped to the first servlet in my web.xml and then included the jar file but it appears to be non-existent in my project. Maybe some suggestions on what others would do may help me.
Thanx in advanceI don't want to use a timer because who knows if the servlet that writes out the dynamic jnlp will get hung up for a little while or any number of other reasons. If that did happen the timer would kick off and close my web start app. I cannot have this.
-
Hi,
I have read some docs on WebStart and the various services (Basic, Persistence, Download etc.) and have a basic question.
Do I have to use these services even if my application is signed?. I am kind of lost whether I can simply convert my Swing application (that has clipboard handling and file IO etc.) to WebStart enabled without changing any code and without having to use the Persistence, clipBoard service etc.
Thanks,
TahirIf you sign your jar files and request all-permission in your jnlp file, you don't need to change your code.
-
i am new to webstart. i made a test application with package of webstart and a wsdemo.jar. when it runs, webstart complains that "Could not find main-class webstart.WSDemo in http://127.0.0.1:8080/webstar/wsdemo.jar". i put wsdemo.jar under ../webstar folder. i just can't figure out why. another thing is i run keytool -selfcert -alias mykeys -keystore testkeys with tow different keystore. so how can i get rid of one certificate or both? any help is appreciated.
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for WebStart Demo Application -->
<jnlp spec="1.0+" codebase="http://127.0.0.1:8080/webstar/" href="wsdemo.jnlp" >
<information>
<title>Web Start Demo</title>
<vendor>JavaPro</vendor>
<homepage href="docs/help.html"/>
<description>Simple GUI demonstration of Java Web Start</description>
<description kind="short">WSDemo</description>
<description kind="tooltip">WSDemo</description>
<offline-allowed/>
</information>
<security>
<j2ee-application-client-permissions/>
</security>
<resources>
<j2se version="1.4+" initial-heap-size="32m" max-heap-size="256m" />
<jar href="wsdemo.jar" main="true" />
<!--jar href="other_stuff.jar"-->
</resources>
<application-desc main-class="webstart.WSDemo" />
</jnlp>From this description it seems you need only:
<application-desc main-class="WSDemo" />
but to check, just run "jar -tvf wsdemo.jar" and see if it contains WSDemo.class, or webstart/WSDemo.class.
(or is it webstar/WSDemo.class).
To remove signatures, just unjar (jar -xvf WSDemo.jar), remove the manifiest (META-INF directory) and then re-jar up the contents.
/Dietz -
Warning popup for jnlp and all-permissions security, recent java update
We have a java program running with java webstart. The jnlp includes the all-permissions security level.
All jar files have a manifest with Permissions: all-permissions and all jar files are signed with our trusted certificate.
When the program is started we get a popup saying something like:
"This application will run with unrestricted access which may put your computer and personal information at risk. Run this application only if you trust the locations and publisher above."
This popup is coming _everytime_ the program is started... which is very annoying for the user and causes support issues for the organization.
This has started to happen in the recent java update. First the program did not start at all until we included the Permission attribute in every jar's manifest.
How can we get rid of this popup?
Best regards,
EmilIf we add the following to the manifest of the jar files:
Permissions: all-permission
Application-Library-Allowable-Codebase: *
Caller-Allowable-Codebase: *
It seems like the "checkbox" to only show the warning message once is back again (without those two last lines above in the manifest there is no checkbox at all). -
Is it possible to call javascript functions within a jnlp? Or to call a method that is inside a JNLP from Javascript??
No, and no.
A JNLP file is an XML description of an application that is loaded by a JNLP client (in most cases: Java WebStart). JNLP does not include any scripting support (although of course JNLP files can be created using server-side scripting). -
I would like to JConsole my webstart application. I tried adding com.sun.management.jmxremote as a system property to JNLP file, but I could not find a way to make webstart applications run through the JDK's JRE (which is what JConsole needs).
So is there a nice way to JConsole webstart applications?It is possible to attach a debugger to a JVM started by Web Start. I got the following batch file from another thread and I made it to work for me.
@echo off
setlocal
rem *** The following parameters must come from the JNLP file ***
set VM_ARGS=-ea -Xincgc -Xmx96m -Dcom.sun.management.jmxremote
set URL=http://mywebsite/downloads/myapp.jsp
rem *** This path must be absolute because javaws uses a simple string-compare against the expected path ***
set JAVAW_PATH=C:\Program Files\java\jdk1.5.0_04\bin\javaw.exe
rem *** Enable the following line to have Webstart dump all possible logs ***
rem set WS_DEBUG=-XX:TraceBasic=true -XX:TraceNetwork=true -XX:TraceCache=true -XX:TraceTemp=true -XX:TraceSecurity=true -XX:TraceExtensions=true
rem *** Enable the following line create a JNLP session on startup ***
set JDPA=-Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n
set DEBUG=-Xdebug -Xnoagent -Djava.compiler=NONE %JDPA% -Dcom.sun.management.jmxremote
set WS_OPTS="-Xbootclasspath/a:%JAVA_HOME%\jre\lib\javaws.jar;%JAVA_HOME%\jre\lib\deploy.jar" "-Djnlpx.vmargs=%DEBUG%" "-Djnlpx.jvm=%JAVAW_PATH%" "-Djnlpx.splashport=-1" "-Djnlpx.home=%JAVA_HOME%\jre\bin" "-Djnlpx.remove=false" "-Djnlpx.offline=false" "-Djnlpx.heapsize=NULL,NULL" "-Djava.security.policy=file:%JAVA_HOME%\jre\lib\security\javaws.policy" "-Djnlpx.deployment.system.home=C:\WINDOWS\Sun\Java\Deployment" "-Djnlpx.deployment.user.home=C:\Documents and Settings\hxue.FRACTAL\Application Data\Sun\Java\Deployment" -DtrustProxy=true -Xverify:remote
echo on
"%JAVA_HOME%\jre\bin\java.exe" %VM_ARGS% -esa %WS_OPTS% -classpath "%JAVA_HOME%\jre\lib\javaws.jar" com.sun.javaws.Main %WS_DEBUG% %URL%Save the content in a .bat file (I assume you use Windows) and run it from the command line. After your web start app starts running, attach your debugger to port 8888. -
What is iLife (and other newbie questions
googled this and went to several other sources (wikipedia, apple search) but could not find any good definitions for these terms (at least that a mac newbie could understand) what is: 1) iOS 2) iLife 3) since i don't own any apple devices other than my mac, could i assume that iOS wouldn't apply to me.
I just recently went from OS X 10.8 > 10.9.1 Maverick and from garage band 10.6 > 10.9.1 GB 10.9 is a whole new world - hardly anything's the same. there were plenty of tutorials and videos for GB 10.6 but i'm having trouble finding one for 10.9. can anyone point me in the direction of a tut or video . a link would be most app.
as always thanks in adv
5stringI just recently went from OS X 10.8 > 10.9.1 Maverick and from garage band 10.6 > 10.9.1 GB 10.9 is a whole new world - hardly anything's the same.
GarageBand 10 is a very different program, it is more similar to Logic than to GarageBand '11. Also it does not (yet) support the same functionality as GarageBand '11, as you noticed. If you have GarageBand '11 projects, that you want to continue to work with, don't delete the GarageBand '11 installation. The installer will have moved it to a subfolder of Applications. You can continue to use it, even with GB 10.0 installed.
There is not yet much documentation on GB 10.0.
Start with the GarageBand online Help: GarageBand 10.0 Online Help
There is also a short tutorial on the Bullets & Bones GarageBand FAQ:
http://www.bulletsandbones.com/GB/GBFAQ.html#multitrackrecordinggbv10
A "must have" for GarageBand 10 is HangTime's terrific effect finder:
http://www.bulletsandbones.com/GB/File%20Pages/GBEffectFinder.html
This neat utility will tell you, which effects are available for which kind of instrument track.
I'd be lost without this tool.
-- Léonie -
How to View by Collection AND Tag - Newbie Needs Good Documentation
I am a self-study student trying to decide whether upgrading to Elements (or better) is worth it. I am comparing Adobe and Microsoft products.
In Album Starter 3.2, all I want to do is one simple task: View pictures by Collection AND category. (I've been looking for help for over an hour - aaaagh!)
1. For ex., I have a collection called Abstract. I also use color tags. I'd like to view only the photos in the Abstract collection that are Pink.
Is this possible?
ALSO before I buy any product I have to be convinced that the value I'll receive is worth the price.
2. Can I view the documentation of the Adobe software package before I purchase it?
3. Do the Adobe products have software documentation help that doesn't require going online? I'm looking for help files similar to those provided on Word, Excel, etc. 3a. Do they exist?
4. Is there a list of specific Features/Benefits that compares the different versions of Adobe? (I have looked on the product sales sites and what I found was far too general.)
Thank you so much for your time. I think this software might be what I'm looking for BUT since I don't take classes, good documentation is something I can't live without. It'd be great if you could add a "newbie section on your website. I think more "newbies" like me would either buy or become "devoted users" if they knew what they could do. Thanks again!There is a site on Adobe.com that has online video of various training sessions of using the products. Most clips are 2-3 min. Look for video workshop. If you have Vista Advanced Find (shortcut windows key and F) works good for sorting.
Maybe you are looking for
-
Windows 7 64 bit driver in Macbook Pro 13"
Hi i had install Windows 7 Home Basic 64 bit into my Macbook Pro 13" early 2011 i7, after installing Windows 7 no Right click working, no Keyboard Shortcut Key working, No DRIVERS of Windows 7 found in no Wifi Network , No Face time working ....... n
-
How do I upgrade my Mac OS X (10.5.8) so I can download iTunes 11
I need to upgrade my Mac OS X so that I can download iTunes 11. The software that I have is 10.5.8. I just bought a new iPod and ccannot sync it as yet.
-
Sharepoint 2013 Intigration with SQL 2012 (REPORTING SERVICES)
Issue : Reporting services is not functioning with sharepoint 2013.. I want to integrate the sql server 2012 with sharepoint 2013 Following features are not connected Report Server Mode : Native ( IT SHOULD BE SHAREOINT) Report Service Status : sta
-
Multiple sized pages in the same book?
I have a 40 page book to design using InDesign. The challenge is that the last 6 pages need to be stagered so that each sheet is .25" wider than the rest of the book. Amy one have an idea how to change the page size? Thanks
-
In New iTunes how do I play a whole album - stops after first song
In iTunes 11.0.1 (12) I select Music in upper left of window, select Albums, click on an album, click on > to play and get the first song and then it stops.