Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11855 Posts in 1569 Topics- by 3045 Members - Latest Member: lensreslai

10. February 2012, 07:31:15 AM
Xith3D CommunityProjectsGames production pipeline (Moderator: clilian)Java Web Start
Pages: 1 [2] 3 4
Print
Author Topic: Java Web Start  (Read 15074 times)
kukanani
Fierce Warrior
****
Offline Offline

Posts: 504


My game is coming along fairly smoothly...


View Profile WWW
« Reply #15 on: 19. July 2007, 12:38:23 AM »

Yay! I'm back from a busy week and a half of work, so, no, Amos, you didn't scare me away  Smiley.

When I was talking about small files, I was not meaning to say that the COLLADA demo was large.  I meant that even though it was small, it still took considerable time to load.  And, I am using the Fiber-Optics technology (how do you spell that?), and that's extremely fast.

But...

Do I understand correctly when I think that OneClick automatically installs Xith to your computer, and that if Xith is already installed, then it does not have to again?
Logged

xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #16 on: 19. July 2007, 11:18:25 AM »

Yay! I'm back from a busy week and a half of work, so, no, Amos, you didn't scare me away  Smiley.
Phhewww Smiley Great !

When I was talking about small files, I was not meaning to say that the COLLADA demo was large.  I meant that even though it was small, it still took considerable time to load.  And, I am using the Fiber-Optics technology (how do you spell that?), and that's extremely fast.
Actually I do think that the COLLADA demo *WAS* large. And it was due to the fact that I was using XMLBeans, and that the full Xith3D/Xith-tk were included in there, including some unneeded dependencies...
So I expect the following demo to be <300Kb. (240Kb for a jar containing the .dae file + the .png file, + about 40Kb for the code itself... no, less, since this code will be transferred to Xith3D).

For the long loading time, only now I understand what you were meaning. So yeah, the loading time is on some PCs (mostly windows boxes, from what I've tested personally) is awfully slow. Wanna know what's happening during loading ? Every file is extracted to a temporary directory and THEN the app is launched. The extraction is slow that's why the loading time is so long.

This approach will be solved in the following versions (which I'm working on, and really enjoying it). There will be two things you can do with a package :
- Execute it from the jar : Nothing (huh.. maybe excepted the natives.. this will have to be tested, if natives can be used from a jar) is extracted, the One-Jar classloader will probably be used to load classes/data from jars-inside-jars. Loading time inexistent (instant start), runtime penalty not too important (but still a bit worse than installed).
- Install it somewhere... Which means extract it somewhere and add an icon / launch it if it's executable (e.g. not a library). For where to install it it's still not clear in my mind cause you could put it anywhere as long as you have a file, which you know the location, which contains the path of the program. The question is then where to put the file. In the user home directory ? No, because that would annoy other users of a machine who would want to run the application. I'll search through the java properties to see if a directory is ok with that (maybe the java.home but what if the user upgrades ?).

Do I understand correctly when I think that OneClick automatically installs Xith to your computer, and that if Xith is already installed, then it does not have to again?
Currently, no. In a near future, it'll be like that. In fact you will have the choice.
Either you could include all you need in one, big, fat, jar Smiley (as I did with the first colladademo). Either you could just say "my package includes only what's specific to my game and depends on some other packages". You see ? I want to keep always an "offline" way of doing things, cause sometime people like to play in their rooms where they have no internet... So when a package depends on another, of course it knows where to download it (and to update it, if ever) but it'll tell you what to download by hand if you ask. Which means, to take an example, that the following is/would be possible :
- Guy A. Random Hacker creates a wonderful game. He builds a OneClick package from it (where the hell did he hear of that ?) and makes it depends shamelessly on xith3d, xith-tk, joode, javagamenetworking, and blah blah blah.
- Guy John Player wants to play ARH's game but on an offline PC : he downloads the OneClick package from his site and launch the OneClick package, then choose the menu option "Build an all-in-one install jar" and then it downloads all needed jar and package them. Then John Player copy this file to his PC, install everything and he's fine Smiley
- Guy Chris Player wants to play ARH's game too but he has Xith3D and Xith-tk installed on his PC via OneClick. He then choose only to download the missing packages... He chose the option "Download the missing packages" from the OneClick package menu and uncheck Xith3D and Xith-tk, which he already has. The missing files are downloaded in the same place where the OneClick package is and Chris Player can copy them to his PC (without internet) and launch the same OneClick package, choose "Install", and the package will detects automatically 1. that there's no internet connection available, and 2. that the OneClick packages for Joode, JavaGameNetworking and BlahBlahBlah are in the same directory. So it installs everything and Chris Player can play happily, too.
- Guy Bob Player has an internet connection. He goes on ARH's site and discover his game. He downloads the OneClick package, choose "Install" from the option menu, the installer detects that an internet connection is readily available and downloads everything and installs (asking the user first, of course.. you wouldn't install something without its authorization, would you ?), and Bob Player discover's ARH's wonderful work.
- A. Random Hacker releases the sequel to his game, using the exact same technology. The OneClick package is uploaded to his site.
- Our brothers John, Chris and Bob can all play to his game just with the OneClick package on his website, cause it will detect that Xith3D, Xith-tk, Joode, JavaGameNetworking and BlahBlahBlah are already installed.


That's a kind of my ideal vision of a packaging/installer software. It will take some time to come to this point, of course, which is why I go slowly forward.

With a system like that, there is in my opinion no further need for something like Java Web Start. However, I can conceive that some users/devs find it reassuring, to have JWS. Which is why the OneClick package builder should be able to generate the necessary files for a JWS launching of the OneClick package. The dependency system (and updates, and so on) would still be handled by OneClick, not by JWS.

I'd appreciate comments on that, new ideas also, and so on.
Logged
kukanani
Fierce Warrior
****
Offline Offline

Posts: 504


My game is coming along fairly smoothly...


View Profile WWW
« Reply #17 on: 19. July 2007, 01:49:08 PM »

Very cool!

Make sure that the "install the missing packages" option has "(for experienced users only)".  Smiley

Of course, I will use it... Grin
Logged

xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #18 on: 19. July 2007, 02:30:04 PM »

Make sure that the "install the missing packages" option has "(for experienced users only)".  Smiley
Sure.

Very cool!

Of course, I will use it... Grin
Smiley Are you also interested in developing it or does the "bare user/tester" status feels comfortable ? Though, I don't know if other developers would speed up or slow down the development process, in this case Cheesy
Logged
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #19 on: 26. July 2007, 08:21:32 PM »

OneClick news here, mixed with COLLADA thread : http://xith.org/forum/index.php/topic,311.msg4557.html#msg4557

The ideas exposed above are not all implemented. Read the thread for more details.
Logged
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #20 on: 27. July 2007, 11:11:45 AM »

See this thread : http://xith.org/forum/index.php/topic,311.msg4563.html#msg4563

Wait, kukanani, a thought just strike me : why not packaging OneClick with OneClick ?

Well, here it is Smiley Go on the SourceForge page, click "Download OneClick", it's the alpha-1 release (not that you have much choice).

Just to notice : the front-end (e.g. what the users get when they launch the jar) is the same old crap, only the back-end (the interface you have when you, developer, create a package).

In its current version, OneClick is perfectly suited to small-to-medium-sized offline packages, e.g. OneClick is perfect for packaging itself.

For heavy Xith3D projects (e.g. Stratagem, and all your games, friends), the dependency/repository system will be a good thing.

Note that the oneclick-in-oneclick.jar is unnecessarily huge because of the xstream usage, which I'll replace with JiBX whenever I've finished COLLADA skeletal animation support.

Enjoy !

P.S : You *can* submit bug reports and feature requests
Logged
kukanani
Fierce Warrior
****
Offline Offline

Posts: 504


My game is coming along fairly smoothly...


View Profile WWW
« Reply #21 on: 27. July 2007, 01:48:07 PM »

Wow, Amos, very cool.

I have a problem at the package definition page.  When you press the "Build" button, a window immediately comes up that says "Saved!"  and when I press ok, the program exits automatically.  Is this a "bug or a feature"? If it's a feature, then what do I do next?
Logged

xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #22 on: 27. July 2007, 07:24:31 PM »

Wow, Amos, very cool.
That's the goal.

I have a problem at the package definition page.  When you press the "Build" button, a window immediately comes up that says "Saved!"  and when I press ok, the program exits automatically.  Is this a "bug or a feature"? If it's a feature, then what do I do next?
What next ? Try the new release, doc. Smiley
New features :
 - Refreshed logo for the front-end (what the users get when launching)
 - When the lauched program crashes, it displays a dialog with the whole program output from the very beginning.
 - There is no longer a "saved" dialog when you just want to build a project
 - I've made the switch to JiBX : the oneclick-in-oneclick.jar file is now only 537.4Kb
 - Amazing feature !! OneClick can upload the built jars to Sourceforge.net. If you ever did a file release on sourceforge by hand, you know how it works. If you don't know, it's not for you. (more customizable features, such as updating on your own ftp site, will come later).

Enjoy !

(downloadable on SourceForge, as well).

Unfortunately, guys, I'm off for the week-end and then for the next week and then for the week after Smiley So I'll work when I can. I didn't avance that much with COLLADA, but I couldn't help improve OneClick (when users ask for it Smiley ).
Logged
kukanani
Fierce Warrior
****
Offline Offline

Posts: 504


My game is coming along fairly smoothly...


View Profile WWW
« Reply #23 on: 29. July 2007, 12:34:12 AM »

Oh, no...(I know it's a lengthy error report, but I don't know whether most of it matters or not)...I get this error when trying to build a project.

java.util.NoSuchElementException
   at java.util.StringTokenizer.nextToken(Unknown Source)
   at org.oneclick.packager.xml.Preferences$PreferencesValues.stringToSsMap(Preferences.java:74)
   at org.oneclick.packager.xml.Preferences$PreferencesValues.JiBX_binding_unmarshal_1_0(Preferences.java)
   at org.oneclick.packager.xml.JiBX_bindingPreferences$PreferencesValues_access1.unmarshal()
   at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2537)
   at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2694)
   at org.oneclick.packager.xml.Preferences.<init>(Preferences.java:120)
   at org.oneclick.packager.xml.Preferences.get(Preferences.java:92)
   at org.oneclick.packager.ProjectChooser.initGUI(ProjectChooser.java:245)
   at org.oneclick.packager.ProjectChooser.chooseProject(ProjectChooser.java:148)
   at org.oneclick.packager.OneClickPackager.askProject(OneClickPackager.java:106)
   at org.oneclick.packager.OneClickPackager.main(OneClickPackager.java:66)
Path = file:/C:/Documents and Settings/sam wozniak/Local Settings/Temp/oneclick_org.oneclick.packager.OneClickPackager1185668767406/org/oneclick/launcher/OneClickPreparator.class
DIRECTORY PATH = /C:/Documents and Settings/sam wozniak/Local Settings/Temp/oneclick_org.oneclick.packager.OneClickPackager1185668767406/org
Adding entry : /C:/Documents and Settings/sam wozniak/Local Settings/Temp/oneclick_org.oneclick.packager.OneClickPackager1185668767406/org
Path = file:/C:/Documents and Settings/sam wozniak/Local Settings/Temp/oneclick_org.oneclick.packager.OneClickPackager1185668767406/org/jibx/runtime/BindingDirectory.class
DIRECTORY PATH = /C:/Documents and Settings/sam wozniak/Local Settings/Temp/oneclick_org.oneclick.packager.OneClickPackager1185668767406/org
Adding entry : /C:/Documents and Settings/sam wozniak/Local Settings/Temp/oneclick_org.oneclick.packager.OneClickPackager1185668767406/org
Unknown classpath entry : org.eclipse.jdt.launching.JRE_CONTAINER

...(((a bunch of classpath stuff and OS guesses)))...

org.jibx.runtime.JiBXException: Expected "classpathentry" end tag, found "attributes" start tag (line 12, col 15)
   at org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:792)
   at org.oneclick.packager.xml.JiBX_MungeAdapter.JiBX_binding_unmarshal_1_3()
   at org.oneclick.packager.xml.Classpath.JiBX_binding_unmarshal_1_1(Classpath.java)
   at org.oneclick.packager.xml.JiBX_bindingClasspath_access.unmarshal()
   at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2537)
   at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2694)
   at org.oneclick.packager.JarBuilder.packageProject(JarBuilder.java:112)
   at org.oneclick.packager.JarBuilder.packageProject(JarBuilder.java:122)
   at org.oneclick.packager.JarBuilder.buildJar(JarBuilder.java:58)
   at org.oneclick.packager.PackageEditor$7.run(PackageEditor.java:570)
   at java.lang.Thread.run(Unknown Source)
Logged

xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #24 on: 29. July 2007, 09:51:16 PM »

Most interesting.

I need the content of your ".classpath" file from the project you're trying to build. The thing is, I don't have the schema of the ".classpath" files for Eclipse projects so I just built the JiBX bindings from my own observation of these structures.
Your classpath seems to contain something I didn't encountered on my own projects, thus needing to adapt the JiBX bindings.
Logged
horati
Global Moderator
Getting respectable
*****
Offline Offline

Posts: 393


View Profile
« Reply #25 on: 30. July 2007, 03:39:40 PM »

As I am working on an Eclipse plug-in, I thought I might be able to help here.  I posted a question to one of the lists full of Eclipse developers to which I subscribe, got some pointers to some source code, poked around for a few minutes and combined that with stuff I already knew.  I think I might be able to give some good advice on this topic now.

Eclipse is structured such that all configuration files (including .classpath) be maximally flexible and extensible.  Fully parsing .classpath is likely to lead to no end of headaches.  Since your goal is not, in fact, to parse a full .classpath but rather to glean enough information from .classpath to ask the developer for additional input, I suggest the following:
  • accept elements in absolutely any order; i.e., JiBX map a collection A or B or C to List< Object > and perform instanceof checks as needed
  • be sure to include the xsd any element in the list of things you allow so that future additions to .classpath won't mess you up unless they make the tags you use obsolete.  Use of the any element also means you don't need to map the elements you know about today but ignore.

This approach strikes a middle ground between parsing everything and randomly string searching the file for what you need.  It applies enough structure to read the file reliability without so much structure that you have to join 5 Eclipse mailing lists just to keep up with the changes necessary to update the JiBX definition for every version, including a front-end parsing routine to choose which of the 35 JiBX file versions you should use to read this user's .classpath because they are running Eclipse version ABC with plug-in XYZ installed.
Logged

Kevin
"It may not seem like a big deal, but ignorance of character encoding issues leads to insidious code rot akin to y2k."
http://stackoverflow.com/users/3474/sylvarking
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #26 on: 02. August 2007, 12:54:27 PM »

Horati, thanks for your advice.

JiBX doesn't use xsd schemas, but I can bind an XML element to nothing (it's just ignored), and I can also use the "flexible" attribute on the binding, which will allow unknown tags.
Logged
horati
Global Moderator
Getting respectable
*****
Offline Offline

Posts: 393


View Profile
« Reply #27 on: 02. August 2007, 02:11:41 PM »

JiBX doesn't use xsd schemas, but I can bind an XML element to nothing (it's just ignored), and I can also use the "flexible" attribute on the binding, which will allow unknown tags.

There is an xsd2jibx tool in the JiBX extras.
Logged

Kevin
"It may not seem like a big deal, but ignorance of character encoding issues leads to insidious code rot akin to y2k."
http://stackoverflow.com/users/3474/sylvarking
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #28 on: 02. August 2007, 08:01:46 PM »

There is an xsd2jibx tool in the JiBX extras.
Yeah but first the xsd:any element isn't supported by xsd2jibx IIRC, and second, I see no reason to use xsd over jibx, excepted if we had an existing xsd schema, which is not the case.

Just to clarify my previous answer : solving this problem is as simple as changing an attribute in the JiBX binding file. Smiley
Logged
horati
Global Moderator
Getting respectable
*****
Offline Offline

Posts: 393


View Profile
« Reply #29 on: 03. August 2007, 12:26:37 AM »

Ah.. I've never used xsd2jibx myself as I always hand-code the mapping files too LOL  From your comment, I just thought you didn't know it existed.  Did you get it working for the new .classpath files now?
Logged

Kevin
"It may not seem like a big deal, but ignorance of character encoding issues leads to insidious code rot akin to y2k."
http://stackoverflow.com/users/3474/sylvarking
Pages: 1 [2] 3 4
Print
Jump to:  

Theme orange-lt created by panic