views:

1333

answers:

4

Hey All.
I have created some simple app in Java, and 'deployed' it using Java Web Start (and jnlp) on my local machine. Now I would like to put it on the web, to have some feedback from various people.
I was thinking about embedding my app in Google infrastructure (pages.google.com/sites.google.com/blogger.com - whatever).

Question: How do I do that? What do I change in my .jnlp file (now i have there local path hardcoded - 'jnlp codebase="file:/D:/Projects/SomeApp/dist"...')?
How to embed file structure (/../dist/somefiles and /../dist/lib/somefiles) into (mentioned) Google infrastructure?

A: 

Sun has a tutorial which covers how to set up the files.

Your problem will be the limitations of Google's systems. I can't confess to in depth knowledge about the services, but looking at the ones you've mentioned, I can't see any way to upload arbitary files - which would make it tricky to deply the .jars.

You might have to look at getting normal web hosting instead.

David Dorward
I am aware of Sun tutorial, and I know it might be better with normal hosting. But the point of question is 'how to do that with google'.
yoosiba
It looks very much like: "You can't."
David Dorward
A: 

If you need to deploy everything in a WAR file, the JnlpDownloadServlet system may be just what you need as it allows you to do exactly this.

http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/downloadservletguide.html

Thorbjørn Ravn Andersen
A: 

Hey.
I was looking for an answer but I couldn't find it anywhere. Maybe everyone are hosting on sourceforge.net or Java Web Start is not popular at all. First I have found post on newsgroup saying that on code.google.com you can call .jnlp file directly form SVN. This encouraged me to play with sites.google.com and it occurs to be very simple.
1) Create page and embed all files there – for this purpose 'file cabinet' page type will be the best. So you will have page http://sites.google.com/site/MyPage with bunch of jars attached to it.
2) In your launch.jnlp file put following edits:
for codebase

<jnlp codebase="http://sites.google.com/site/MyPage" href="launch.jnlp" spec="1.0+">

for any jars referenced:

<jar href="http://sites.google.com/site/MyPage/SomeLibrary.jar"/&gt;

3) Attach launch.jnlp to MyPage and that is all.
4) Clicking on launch file will start application.
Organizing everything in more structured way doesn't break anything as long as you remember to update links in launch.jnlp.

yoosiba
If you have your base set, you can use relative paths in your hrefs. Makes it much easier to relocate.
Thorbjørn Ravn Andersen
I agree it is easier to maintain when you don't have to edit 20 lines with links but just one base line and relative paths stay the same.
yoosiba
A: 

The apparently is a way that doesn't require the file to be in the downloads, but in the svn To do it you need to set the "svn:mime-type" property for the uploaded jnlp, otherwise the link will not work.

I think this works because the svn apache module (that google must use) sets the right content type if it finds this property.

the svn:mime-type is application/x-java-jnlp-file obviously.