/    Sign up×
Community /Pin to ProfileBookmark

This isn’t *quite* exactly a java problem, but hopefully someone will be able to help anyway – basically I made a game a while ago in java, and since then i’ve sold a few copies ? But, now I’m going to sell it on ebay, and need to put it in a different format to use on a cd (it was in a .jar file format)

Basically, I’ve made a AUTORUN.EXE file for the cds in C++, and i need to know:

1) How to detect whether java’s installed or not and automatically open the jre installation if not.
2) How to run a .jar file from within an executable – I tried using javaw file.jar, but it doesn’t seem to open correctly.

If anyone knows how to do any of this it will be much appreciated as it will earn me lots of dosh ? ? ? ? ? ? ? ?

to post a comment
Java

16 Comments(s)

Copy linkTweet thisAlerts:
@aznchong91Oct 01.2005 — could you give me a copy of the game you are talking about ? ? and if possible, the code, because I am a newb and I want to just see how a pro does things like this. ?
Copy linkTweet thisAlerts:
@agent_x91authorOct 01.2005 — i don't give out free copies of the game and i don't give out the source to [B]anyone[/B]
Copy linkTweet thisAlerts:
@aznchong91Oct 01.2005 — ok,ok,ok, I was just asking, don't be so offended.....
Copy linkTweet thisAlerts:
@agent_x91authorOct 01.2005 — im not offended but im still not giving out free copies
Copy linkTweet thisAlerts:
@HiyaOct 02.2005 — I don't know anything about C++ but to find if java is installed search for "jar.exe". This is the most important file if you are trying to execute a .jar file.
Copy linkTweet thisAlerts:
@agent_x91authorOct 02.2005 — Actually, jar.exe is involved in the creation of .jar files. Jar files are run using javaw.exe. My problem is, I can easily execute the equivalent of "javaw" typed into a shell or command prompt, in order to test it's availability, but I don't know how to read the result of this command using C++...
Copy linkTweet thisAlerts:
@agent_x91authorOct 03.2005 — Hmm I think I'll look for a C++ forum.
Copy linkTweet thisAlerts:
@Paddy_NotemakerOct 05.2005 — While we're talking about games, does anyone know who you can sell java mobile phone games to? Are there any companies who take games from developers in general?
Copy linkTweet thisAlerts:
@buntineOct 06.2005 — I doubt games would be purchased from freelance developers. Think about the security issues. I would say most companies would out-source all development to trusted suppliers.

Regards.
Copy linkTweet thisAlerts:
@agent_x91authorOct 06.2005 — Can people please stop hijacking my threads?? I don't want email notification of your question!
Copy linkTweet thisAlerts:
@Khalid_AliOct 06.2005 — This isn't *quite* exactly a java problem, but hopefully someone will be able to help anyway - basically I made a game a while ago in java, and since then i've sold a few copies ? But, now I'm going to sell it on ebay, and need to put it in a different format to use on a cd (it was in a .jar file format)

Basically, I've made a AUTORUN.EXE file for the cds in C++, and i need to know:

1) How to detect whether java's installed or not and automatically open the jre installation if not.

2) How to run a .jar file from within an executable - I tried using javaw file.jar, but it doesn't seem to open correctly.

If anyone knows how to do any of this it will be much appreciated as it will earn me lots of dosh ? ? ? ? ? ? ? ?[/QUOTE]


use installsheild software to create your distribution copy of the game, this will create a complete folder with a jvm in the path(this increases file size to a great deal) you can put that stuff on cd and then run it from there as well(I think.. ? )
Copy linkTweet thisAlerts:
@agent_x91authorOct 06.2005 — How would I go about doing that? I don't have a clue where to begin :o
Copy linkTweet thisAlerts:
@poiuyOct 06.2005 — Hmm I think I'll look for a C++ forum.[/QUOTE]

I want to learn about programming so I'm not 100% sure but I wonder if this site might help you http://vbforums.com/index.php? Supposed to be a sister forum to this one. It has a C++ section
Copy linkTweet thisAlerts:
@agent_x91authorOct 07.2005 — Don't worry, most of my problems are solved now. Although I still want to know how to use installshield software etc...
Copy linkTweet thisAlerts:
@aznchong91Oct 24.2005 — If you want installshield software and have questions about it, pm my friend [B]cx409[/B] and tell him I told you to pm him.
Copy linkTweet thisAlerts:
@kurtsfarDec 13.2005 — could you give me a copy of the game you are talking about ? ? and if possible, the code, because I am a newb and I want to just see how a pro does things like this. ?[/QUOTE]

[B]Well, I have a very simple peer-to-peer two player Java ball game to play over Internet. It is open source:

[/B]


[URL=http://www.webpelican.com/internet-programming-1/magnificentball/]MagnificentBall - game description[/URL]

[URL=http://www.webpelican.com/internet-programming-1/magnificentball/source/MagnificentBall.java]MagnificentBall.java[/URL]

[URL=http://www.webpelican.com/internet-programming-1/magnificentball/source/Ball.java]Ball.java[/URL]

[URL=http://www.webpelican.com/internet-programming-1/magnificentball/source/Player.java]Player.java[/URL]

[URL=http://www.webpelican.com/internet-programming-1/magnificentball/source/GameArea.java]GameArea.java[/URL]

[URL=http://www.webpelican.com/internet-programming-1/magnificentball/source/Sender.java]Sender.java[/URL]

[URL=http://www.webpelican.com/internet-programming-1/magnificentball/source/Receiver.java]Receiver.java[/URL]

[URL=http://www.webpelican.com/internet-programming-1/magnificentball/source/TextWriter.java]TextWriter.java[/URL]

I will change the comments from swedish to english when I get some time over....

[B]Download this .jar file at the bottom of the post[/B] to try it. If you have noone to play against you can open it twice on the same computer by writing "localhost" in the Host field and use outgoing port as ingoing on one of the opened game instances and vice verca on the other.

[B]For example:[/B]

[B]On the first game instance:[/B]

Host:localhost

Incoming port: 2000

Outgoing port:2001

[B]And on the second opened game instance:[/B]

Host: localhost

Incoming port 2001

Outgoing port 2000.

[B]Note:[/B] If you have someone to play against over Internet you [B]don't have to use different ports.[/B] Just make sure to open the port you have choosen in your firewall.

[B]Here it is:[/B]

[B][URL=http://www.webpelican.com/internet-programming-1/magnificentball/source/MagnificentBall.jar]MagnificentBall.jar[/URL]

[/B]
×

Success!

Help @agent_x91 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...