Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Run an applet from the desktop  (Read 772 times)
0 Members and 1 Guest are viewing this topic.
Offline cheeseman585

Innocent Bystander





« Posted 2009-09-20 23:56:16 »

I am entering my game in a competition that requires the use of an installer.  I can write an executable, but my problem is that I've never needed to run an application from the desktop.

I tried to look this up, but the only JNLPs I've seen reference actual websites.  I'm not sure how to make it reference a JAR file in, say, "C:\Documents and Settings\[the user's username]\My Documents\gameName".

I've also tried using a different folder just to test it out, and it said it couldn't find the class I told it reference even though I know for a fact it was in the JAR file I told it to reference.

Here's my JNLP code if it helps at all.
<jnlp spec="1.0+"
      codebase="file:///G:/Game/"
      href="Game.jnlp">
   <information>
      <title>Game</title>
      <vendor>Someone</vendor>
      <offline-allowed/>
   </information>
   <resources>
      <jar href="file:///G:/Game/Game.jar"/>
   </resources>
   <application-desc main-class="Game"/>
</jnlp>
Offline broumbroum

Junior Member





« Reply #1 - Posted 2009-09-21 12:32:52 »

hi file://... URI aren't remote URL and therefore require no connection... if you want to test the jnlp, you could just install some local small webserver and set http://localhost:80/yourjnlp.jnlp as code base.

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2009-09-21 13:24:07 »

 Roll Eyes So... he should write an installer, that launches an http server, so that he doesn't need an installer to launch his game.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline fguy

Senior Newbie





« Reply #3 - Posted 2009-09-21 13:35:50 »

One other consideration. I don't know how you write your applets, but I try to put a much as possible of my GUI onto a JPanel, then add the JPanel to the applet. If you do that, then you should just as easily be able to add the JPanel to a JFrame (desktop version).

I'm no expert, and I'm not aware of any situations where this wouldn't be a good idea, if anyone does, I am all ears.

fchess2 - the rewrite: http://fchess2.blogspot.com/
Pages: [1]
  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.

BurntPizza (24 views)
2014-09-19 03:14:18

Dwinin (39 views)
2014-09-12 09:08:26

Norakomi (68 views)
2014-09-10 13:57:51

TehJavaDev (93 views)
2014-09-10 06:39:09

Tekkerue (47 views)
2014-09-09 02:24:56

mitcheeb (68 views)
2014-09-08 06:06:29

BurntPizza (51 views)
2014-09-07 01:13:42

Longarmx (38 views)
2014-09-07 01:12:14

Longarmx (44 views)
2014-09-07 01:11:22

Longarmx (40 views)
2014-09-07 01:10:19
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!