Java Cool Dude
|
 |
«
Posted
2004-03-07 20:22:46 » |
|
and successfully create an .exe that loads up insanely fast on my computer (woah  ), but when I send the exe to a friend of mine, it just doesn't work as in a console appears and then disappears instantely... Any Ideas?
|
|
|
|
swpalmer
|
 |
«
Reply #1 - Posted
2004-03-07 20:36:26 » |
|
run it from the command line to see any errors that are printed to the console.
|
|
|
|
Java Cool Dude
|
 |
«
Reply #2 - Posted
2004-03-07 20:40:40 » |
|
Ok I got it to work now on a computer that doesn't have Java installed on (sweet), but now the size is 5 mb... Doh the jar that I used is barely .5 meg and you can verify it by dlding the zip linked in the other thread; it has absolutely no ties or whatsover with AWT/SWing. On a side note, should I omit including a JIT from excel with the exe? Lemmie see
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Java Cool Dude
|
 |
«
Reply #3 - Posted
2004-03-07 21:11:06 » |
|
Down to 3.9 but still that's too damn f***** big I only include the dll and exe
|
|
|
|
Java Cool Dude
|
 |
«
Reply #4 - Posted
2004-03-08 01:17:59 » |
|
This post is pretty much oriented towards those who use Jet: When I create an exe file (size 866 k in my case including 7 targa image files, so it's not bad at all) and run it locally, everything goes smooth as a baby's bottom. Now problem is, when I send it to someone with no java installed, it won't work at all. When I reached that point, I tried packaging my demo using JetPack II, and to my horror, the file size jumped to 3.9 megs... I installed the my newly packed demo on some random machines here on campus, and this time around, things worked (even though geforce cards had a bug in doing texture cube mapping, but that's another problem) When I checked the installation directory I was surprised to see a JET RT folder right there which contains a set of HUGE dll files. Deleting that folder resulted in the demo not runing any longer... Now that I look at Aliens Flux installation directory, it doesn't contain any reference to the JET RT, f****, it's only got an OpenAL and LWJGL dll files in there.. Question is; how do I go about getting rid of the highly annoying JET RT?
|
|
|
|
Matzon
|
 |
«
Reply #5 - Posted
2004-03-08 03:26:37 » |
|
I was under the impression that only the non evaluation edition could create runtimes without the runtime files. I am sure Cas will give his response, when he wakes up.
|
|
|
|
Matzon
|
 |
«
Reply #6 - Posted
2004-03-08 03:29:45 » |
|
hmm and from what I am seeing, the evaluation IS the proedition with a timeout... oh well, will let Cas have a go at it...
|
|
|
|
kevglass
|
 |
«
Reply #7 - Posted
2004-03-08 04:45:00 » |
|
As a side note, I noticed there was a "Personal Edition" of Jet available. Is it possible to makes .exe with that (although actually I'm going to want to support AWT in it)?
Kev
|
|
|
|
princec
|
 |
«
Reply #8 - Posted
2004-03-08 07:05:42 » |
|
As if by magic, the shopkeeper appeared. JetPack is a bit of a red herring - it's not very granular at all. The whole of java.lang and several other etc etc. is compiled into a really fat dll - it makes no attempt at "linking" like in a C++ build. What you really need is JetPerfect, which is the super-expensive difference between Std and Pro editions. JetPerfect is the linker you are looking for  About the smallest exe that JetPerfect produces is about 500kb for Hello World, which is JVM startup class overhead mainly and all the other little runtime gubbins. I never actually tried JetPack myself as it didn't do what I wanted. Cas 
|
|
|
|
Java Cool Dude
|
 |
«
Reply #9 - Posted
2004-03-08 12:29:27 » |
|
But how do I use JetPerfect? The evaluation version itself is the pro edition as far as I know, and JetPerfect is said to be included in the Pro edition,and yet I can't put my hand on it...
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Java Cool Dude
|
 |
«
Reply #10 - Posted
2004-03-08 12:31:52 » |
|
Off topic: Now that I'm liking LWJGL alot, can I test your software that supposedly converts Java into an exe,and for which you're asking 99 Dollars of our US currency? I know there is no chance I can have AWT/SWING bundled into and application converted by your little util, but that doesn't really matter to me. please get back to me on that one, thanks 
|
|
|
|
princec
|
 |
«
Reply #11 - Posted
2004-03-08 12:57:35 » |
|
Well, said product does not exist yet but it's on the Horizon of Possibility. If you chuck me your jars I can build you an exe tonight with any luck. Cas 
|
|
|
|
Java Cool Dude
|
 |
«
Reply #12 - Posted
2004-03-08 14:07:51 » |
|
Link to TextureCubeMap.jar + lwjgl.jar (I fixed the mouse clipping in it). Hey if you don't mind I can help beta test your product since I have 8-10 applications that I intend to port to lwjgl  Now can you please address the JetPerfect question I asked in my previous post?
|
|
|
|
princec
|
 |
«
Reply #13 - Posted
2004-03-08 14:46:18 » |
|
JetPerfect is a really complicated and fiddly procedure  Can't tell you right now. I'll post my old JetPerfect project file for AF. (It's out-of-date now). Cas 
|
|
|
|
dleskov
|
 |
«
Reply #14 - Posted
2004-03-11 10:09:42 » |
|
But how do I use JetPerfect? The evaluation version itself is the pro edition as far as I know, and JetPerfect is said to be included in the Pro edition,and yet I can't put my hand on it... It is right in the Evaluation Package, but we have not implemented a GUI for it yet (it needs to be very well thought over and we are somewhere in the middle of that process...). You have to use it from the command line. Refer to the User's Guide for details. You may wish to use the sample project from samples\JetPerfect under your JET installation directory as a basis for your project. Note: You may need to change -Djet.default.classloader:bootstrap to -Djet.default.classloader:application in the build.bat file.
|
|
|
|
dleskov
|
 |
«
Reply #15 - Posted
2004-03-11 10:15:33 » |
|
As a side note, I noticed there was a "Personal Edition" of Jet available. Is it possible to makes .exe with that (although actually I'm going to want to support AWT in it)?
Kev Yes, and it does support AWT and Swing and all of Java 2 except custom classloaders and dynamic loading of classes unknown at compile time (e.g. dynamic proxies), but there is one little problem - you cannot distribute the executables it creates. You can use it, for instance, to accelerate a third-party Java program you run on the same system.
|
|
|
|
kevglass
|
 |
«
Reply #16 - Posted
2004-03-11 10:50:37 » |
|
Damn it, looks like I'll have to fork out for the Standard Edition. I take it I can distrbute the .exe produced with that.
Kev
|
|
|
|
Java Cool Dude
|
 |
«
Reply #17 - Posted
2004-03-11 11:39:24 » |
|
Used the sample "hello world" provided with the eval pro version, and the executable produced was of size 2.1 mb... Man this is such a joke 
|
|
|
|
princec
|
 |
«
Reply #18 - Posted
2004-03-11 12:32:10 » |
|
That's where JetPerfect comes in. Cas 
|
|
|
|
Java Cool Dude
|
 |
«
Reply #19 - Posted
2004-03-11 13:57:11 » |
|
/me was using JetPerfect
|
|
|
|
princec
|
 |
«
Reply #20 - Posted
2004-03-11 14:10:09 » |
|
What is actually in the sample hello world? Is it just a sop("Hello World") or what? There are a load of tuning options in JetPerfect that it makes sense to try to get to grips with. Turn inlining down substantially for a start. Remove bounds checking and NPE checks. A few other things like that. Cas 
|
|
|
|
Java Cool Dude
|
 |
«
Reply #21 - Posted
2004-03-11 14:33:24 » |
|
1 2 3 4 5 6 7 8 9 10 11 12
| jc =p =a hello.prj -compile_in_perfect:-
REM Create .USG file
set JETVMPROP=-Djet.usage.list -Djet.default.classloader:application hello.exe
REM Compile project in perfect mode
jc =p =a hello.prj -compile_in_perfect:+
set JETVMPROP= |
Direct copy from the build.bat file included in the samples
|
|
|
|
dleskov
|
 |
«
Reply #22 - Posted
2004-03-12 04:40:09 » |
|
Used the sample "hello world" provided with the eval pro version, and the executable produced was of size 2.1 mb... Man this is such a joke  Well this is due to the bloated 1.4 API which has too many interdependencies. 1 2 3 4 5 6 7
| >java -version java version "1.4.2_03" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02) Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
> java -verbose hello | grep "\[Loaded" | wc -l 259 |
As you may see, the 1.4.2_03 VM has to load 258 Java 2 API classes just to execute "Hello, World". Anyway, that EXE 7zips to about 750K, which is much less than the size of the JRE. You can save extra 60K by disabling inlining completely in the project file: Then, 2MB is just the minimum overhead for J2SE 1.4.2. Alien Flux 1.5 compiles to less than 5MB EXE without resources (images, sound, security provider classes, etc.), which 7zips to about 1.5MB. If you choose to bind resources, the result will be 13MB EXE (7zips to 9.5MB), which only needs two LWJGL native method DLLS to run. With Java 2 1.3, the EXE would be much smaller. When running the hello sample on JRE 1.3.1_10, only 181 platform API classes get loaded. I would therefore suggest that you try JetPerfect on a bigger project.
|
|
|
|
princec
|
 |
«
Reply #23 - Posted
2004-03-12 06:29:02 » |
|
Worth mentioning that the AF *demo* (which I no longer build) actually compiled to under 5Mb *with* graphics and sounds. (The full version uses RMI which brings in a fair chunk of code) Cas 
|
|
|
|
|