Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Java games on PC's with no Java?  (Read 3909 times)
0 Members and 1 Guest are viewing this topic.
Offline mike_bike_kite

Senior Member


Medals: 1
Projects: 2



« Reply #30 - Posted 2013-08-30 23:40:40 »

What is the problem in particular?
The statement that it can be done in C++ doesn't necessarily indicate how it is done. This is further compounded by the fact I don't do C++. I can state that you can write a chess program in Java, I could even talk about game trees, alpha beta pruning, transposition tables and zorbrist hashing but I'd guess it wouldn't help you produce the program. I'm afraid I just don't have enough info to move forward.

Arcade swarm
Board Chess - Checkers - Othello
Offline Jeremy
« Reply #31 - Posted 2013-08-31 01:43:34 »

What is the problem in particular?
The statement that it can be done in C++ doesn't necessarily indicate how it is done. This is further compounded by the fact I don't do C++. I can state that you can write a chess program in Java, I could even talk about game trees, alpha beta pruning, transposition tables and zorbrist hashing but I'd guess it wouldn't help you produce the program. I'm afraid I just don't have enough info to move forward.

Huh

No, I mean, you said you can't get Launch4J working because you are stuck trying to include the JRE in the build. What is the problem there? There is a tab, just browse to it and select where the JRE is you'd like to package.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline mike_bike_kite

Senior Member


Medals: 1
Projects: 2



« Reply #32 - Posted 2013-09-01 00:04:20 »

Sorry, totally misunderstood the direction of your previous post. I'll gather the error msgs s I'm getting and post them shortly.

Arcade swarm
Board Chess - Checkers - Othello
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mike_bike_kite

Senior Member


Medals: 1
Projects: 2



« Reply #33 - Posted 2013-09-02 14:01:04 »

It's saying that it can't find the bundled jre. I've tried various combinations but I guess I've yet to find the right combo. I'm pretty uselss at this stuff and tend to resort to guesswork until something works.

I have an AlienSwarm directory that contains my jar, classes, images etc. It now also contains a jre7 directory that is a straight copy of the standard jre7 directory. I comile the program using the following:

1  
2  
3  
4  
5  
E:\Dropbox\Projects\AlienSwarm>javac AlienSwarm.java
Note: AlienSwarm.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

E:\Dropbox\Projects\AlienSwarm>jar -cfm AlienSwarm.jar Manifest.txt *.class *.wav *.png *.dat *.ico jre7

And then I use the Launch4J app to package the lot. I'm pretty sure it's including the jre7 directory because the exe size has now jumped to around 50MB from around 1.5MB. Within the Launch4J app it asks for a bundled jre path and I enter "./jre7" I also tried "../jre7" but with the same results. Obviously without the quotes.

Any ideas?

Mike

PS the error message is "This application was configured to use a bundled Java Runtime Environment but the run time is either missing or corrupt"

Arcade swarm
Board Chess - Checkers - Othello
Offline mike_bike_kite

Senior Member


Medals: 1
Projects: 2



« Reply #34 - Posted 2013-09-02 21:07:38 »

I didn't know whether to edit this into the last post or add a post but I just found the log file:
1  
2  
3  
4  
CmdLine:   E:\Dropbox\Projects\AlienSwarm\AlienSwarm.exe --l4j-debug
WOW64:      yes
Bundled JRE:   ..\jre7
Check launcher:   E:\Dropbox\Projects\AlienSwarm\..\jre7\bin\javaw.exe (n/a)


There is directory E:\Dropbox\Projects\AlienSwarm\jre7\bin that contains the file javaw.exe but I'm not sure if I've set the right bundled JRE directory.

If I change the dir to ./jre then it runs on a machine that has a current version of java but fails with the error message in my previous post.

Arcade swarm
Board Chess - Checkers - Othello
Offline Jeremy
« Reply #35 - Posted 2013-09-03 05:05:08 »

Which OS are you using? It should be as easy as selecting the JRE directory - where it is installed on your OS.

Windows installs under Program Files/Java/jre7 (not sure for linux)

I got mine no greater than 10MB, so you shouldn't be getting anything around 50MB (unless that is due to your game's resources)

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline mike_bike_kite

Senior Member


Medals: 1
Projects: 2



« Reply #36 - Posted 2013-09-03 08:07:34 »

I'm developing on Win 7 (64 bit) but the PC's that will run the game are likely to be anything from Win 7 to DOS (yea really). The PC I tested on and where I got the error msg was XP. Linux doesn't matter for this release - those who run Linux and want to run the program are quite likely to have the latest JRE anyway.

My game is a little over 1MB in the original Jar and this was mostly due to a music clip. When I copied the jre7 directory into the local direcortory of the game and included it in the jar - the file size jumped to 50MB. Is it just the bin dir within the jre7 dir I should include?

On the win 7 PC the normal dir is E:\Program Files\Java\jre7\bin
The dir containing the game is E:\Dropbox\Projects\AlienSwarm
The dir now continaing the copied jre7 is E:\Dropbox\Projects\AlienSwarm\jre7\bin
On the XP machine there isn't such a dir as Java isn't installed.

It's difficult explaining things when you're not quite sure how things function - I assume there isn't a log file I can show that list all the info required?

Mike

Arcade swarm
Board Chess - Checkers - Othello
Offline xsvenson
« Reply #37 - Posted 2013-09-03 08:26:22 »

"E:\Dropbox\Projects\AlienSwarm\..\jre7\bin\"
evaluates to
"E:\Dropbox\Projects\jre7\bin\"

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Offline mike_bike_kite

Senior Member


Medals: 1
Projects: 2



« Reply #38 - Posted 2013-09-03 10:12:52 »

You spotted my deliberate mistake Smiley I think I had that originally but then accidentally left that in while trying various random changes to see if I could make it work.

Unfortunately the change didn't fix things though and I still get the same error but oddly:
  • I can run the exe locally on my Win 7  machine but then I have the latest JRE so it wouldn't look for the bundled JRE
  • If I copy the exe to my NAS device I can't run it from there on my local machine (see error above in red)
  • Same thing happens if I use my XP machine with no on board java
  • If I copy the exe to my XP machine and run it then I still get this error
Huh

Obviously the file size is still a very hefty 50MB.

Mike

Arcade swarm
Board Chess - Checkers - Othello
Offline deathpat
« Reply #39 - Posted 2013-09-03 13:27:17 »

Hi,

you should take a took at the windows package for Droid Assault or for my game Daedalus to have an idea of the final file structure of a java application packaged with a tool like launch4j.

There is something you obviously missed: the JRE should not be inside the jar. At the end you should have an exe file that contains or not your code + resources depending on what you choosed in launch4J config file. And next to the jar you will have the JRE folder. The exe will try to run the system JRE or the one you provide again depending on your config.
Take a look at my game package, I think it will become obvious to you after seeing it Smiley

cheers

work in progress : D A E D A L U S
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mike_bike_kite

Senior Member


Medals: 1
Projects: 2



« Reply #40 - Posted 2013-09-03 17:53:54 »

OK things have progressed to a new error message now.

I have the jar without the jre included.
I have an zip that includes both the new exe and the jre7 directory.
But I now get the following error popping up "An error occurred while starting the application %1 is not a valid Win 32 application".

The only reference I see to 32/64 bit is in the Launch4J app on the JRE page and I have it left unticked as 32 bit.

Arcade swarm
Board Chess - Checkers - Othello
Pages: 1 [2]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (16 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (34 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (20 views)
2014-08-16 06:20:21

Tekkerue (31 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (44 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!