Webstart and permissions

I have a rimscape.php file to load my rimscape.jar via webstart, it looks like this:

<?php  header("Content-type: application/x-java-jnlp-file");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";?>

<jnlp spec="1.0+" codebase="http://www.gamelizard.com/webstart" href="rimscape.php">
 <information>
    <title>Rimscape</title>
    <vendor>GameLizard</vendor>
    <homepage href="http://www.gamelizard.com" />
    <description>This is a special game.</description>
    <offline-allowed />
  </information>
  <security>
  <all-permissions/>
  </security>
  <resources>
    <j2se version="1.4+" />
    <jar href="rimscape.jar" />
  </resources>
  <application-desc main-class="com.gamelizard.games.rimscape.RimscapeRunner" />
</jnlp>

However when I run my code, I get permission errors when trying to switch to fullscreen mode. I have my jar signed as well. What am I doing wrong?

Thanks!

oh, and another problem. I had a version of my jar uploaded, and I ran it. I uploaded a new version of the jar, but every time I opened the webstart page, the old jar loaded, never the new one. I refreshed about 5 times, closed IE and started again, and tried 5 more times. I even tried with other browsers, but it would only load the old jar, not the new one. I had a friend try the link, and it loaded the new jar.

Isn’t one of the main points of Webstart to make sure that doesn’t happen? Am I doing something wrong?

If offline mode is allowed () an update doesn’t need to happen in each case.

I don’t see a problem with the permissions.

but why wouldn’t it at least check for a newer version and get it if I’m running it from the site?

I took out the “” and it still won’t download the new version. It’s been over 12 hours and it’s not even checking for the new version. I’ve lost count of how many times I’ve tried reloading it.

Stupid question, but this is Newless Cluebies, so … what version of java are you running?

Java 5.

I tried typing the jnlp url directly into Webstart and that worked… but I STILL can’t get Internet Explorer to find the new file loading from the php file. I even cleared the cache after removing the “allow offline” thing and no success. So loading through IE loads the old jar, but loading through Webstart (since now it re-downloads EVERY SINGLE TIME even though it’s just getting the same thing over and over again) works.

Also, I read in another post that doesn’t work… and no one offered help for that situation. Any updates on that?

Oh, and I tried figuring out how to add parameters to the call to the class? IE, I run my jar locally with:
java -jar rimscape.jar highres fullscreen
But I can’t figure out how to do the same with the Webstart. Sun’s page for the 1.5 enhancements to webstart says that they’re adding “VM arguments” as a new feature. Does that mean I can’t put in the arguments I want now? I can pass parameters to Applets, what’s the equivalent process for my Webstart applications?

I found one site that said one of the problems with Webstart is that you can’t force updating even if you have an urgent/important update to release… which might explain my problem. So if that’s true, then to whoever says that the only thing Applet’s can do that webstart can’t is embedd in a browser can add this one to the list.

[quote]Java 5.
[/quote]
There’s your problem (probably). Try upgrading to the latest JVM. It’s version 1.4.2_05.

Although I strongly suggest fully uninstalling 5 first, and crossing your fingers and hoping it does indeed uninstall properly. It has ahem “issues” with installation.

[quote]I found one site that said one of the problems with Webstart is that you can’t force updating even if you have an urgent/important update to release… which might explain my problem. So if that’s true, then to whoever says that the only thing Applet’s can do that webstart can’t is embedd in a browser can add this one to the list.
[/quote]
Sigh, you cannot force people to update an applet either. Why the heck should YOU be allowed to delete stuff (or install new stuff I didn’t ask for) on MY computer? Exactly; you shouldn’t. You can’t. The difference with an applet is that unless I explicitly save it to my hard disk it’s reloaded every time (modulo caching) - if I do save it to my hard disk, you have LESS influence than with webstart, since a saved class file doesn’t have ANY chance of being updated unless I manually download it again, save it again, and overwrite the original.

using 1.4.2 fixed it, thanks!

My deal with the Applet difference is that it clears once your browser closes or you tell it to clear yourself. I feel that if you come to my site, and traverse my pages to my game page in order to load the game I have on my web site, then you want the latest one. If you open up webstart and go to your “downloaded applications” folder to run it, then you can surely load the version you already got. However I do think if you’re loading an application from some site it should get the one ON THAT SITE.

Also, with applets, since you don’t HAVE to have everything in a jar, most resources can be downloaded as the latest by simply pressing “refresh” and not have to clear the cache.

But anyways, I have permissions working, and IE is loading the latest version of my webstart app… so my only question left is about how to do what I would normally do with command line arguments in webstart. Anyone have the answer to that one? Thanks!

[quote]using 1.4.2 fixed it, thanks!
[/quote]
When 1.5 goes gold, I bet it’ll work there too. It’s just that the betas are usually very buggy in places, and this one has particularly bad webstart problems.

cool :slight_smile: Good advice, I’ll only use 1.5 when I really wanna tinker with one of the new features then :slight_smile:

Also, I finally found the answer to my vm arguments question. Instead of this:

    <application-desc main-class="com.gamelizard.games.rimscape.RimscapeRunner" />

I use:

  <application-desc main-class="com.gamelizard.games.rimscape.RimscapeRunner"> 
    <argument>highres</argument> 
    <argument>fullscreen</argument> 
  </application-desc>

And that does it!

new problem! I could always work fullscreen at home, but it was with Webstart that I couldn’t do it. Now that I have the permission thing working, I know I can do it. However, I also just uninstalled 1.5… and then you went and jynxed me with your mentioning the uninstall problems :slight_smile:

I uninstalled that then I installed 1.4.2_05 and now fullscreen mode now just gives a white screen and no rendering. I uninstalled 1.4.2_05 and still the problem. I uninstalled the 1.5 SDK, no worky. I uninstalled all of my java JRE’s and SDK’s, then reinstalled 1.4.2_05… and still the same problem.

What do I do???

Edit: Balls.jar still works in full screen mode, so surely it’s not that my JRE is busted. I tried reverting to code from yesterday which was fine, and it still gave me the same white screen. I’m so confused!

Edit 2: Heeeellllppp!!! :stuck_out_tongue:

I had a really similar problem (whitescreen fullscreen) and I really didnt think it was my code. I tried alot of things like uninstalling/installing various java stuff… nothing worked. I got so frustrated I wrote a really pointless fullscreen app just to see if webstart would run SOMETHING fullscreen, and it turned out it did run. If you wanna see if theres SOMETHING that webstart will run in fullscreen, you can try to run that app I coded. But I warn you, it’s very pointless and… colorful:

http://java.woogley.net/Trippy/Trippy.jnlp

it’s sooo pretty…

Yeah after I got Balls.jar to run I figured I might as well try tinkering with my code. Unfortunately it didn’t have the complete source included, so I looked online for some help.

What I WAS doing was embedding a Canvas in a Frame and using that for my drawing surface. I don’t remember why but I do remember it was because of some advice I got on either these forums or the one at Sun :slight_smile: So I ditched the canvas… and now it works.

However this isn’t a complete solution I don’t think. I now frequently get errors printed out that there was an “error in native code” and it prints out to a log file. This happens maybe 1 out of 4 times. It seems that 05 is a lot more buggy than 04. I installed it and immediately proceeded to have all these troubles mentioned here. I don’t think it’s was 1.5 that was my problem because I had uninstalled it before to do some more 1.4 work. I think the problems are coming from installing 1.4.2_05

ok I have a version online that’s working, and typing the URL of the jnlp into webstart works. However the same stuff working via PHP does not work. The bar with the title and company name shows up… but nothing else. It disappears when I click on it. It never gets anywhere else. Any ideas why that might be happening?

Edit: I think I’m losing my vision (and sanity) because I keep loading up your Trippy thing ;D

what do I do about these native code errors? I keep getting them very frequently with traces like these:

Current Java thread:
at sun.java2d.loops.MaskFill.MaskFill(Native Method)
at sun.java2d.pipe.AlphaColorPipe.renderPathTile(Unknown Source)
at sun.java2d.pipe.DuctusShapeRenderer.renderPath(Unknown Source)
at sun.java2d.pipe.DuctusShapeRenderer.fill(Unknown Source)
at sun.java2d.pipe.PixelToShapeConverter.fillRect(Unknown Source)
at sun.java2d.pipe.ValidatePipe.fillRect(Unknown Source)
at sun.java2d.SunGraphics2D.fillRect(Unknown Source)

Thanks!

What error? All you have shown is a stack trace, no error.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x5C00FB33
Function=[Unknown.]
Library=C:\WINDOWS\System32\D3DIM700.DLL

NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.

Current Java thread:
at sun.awt.windows.D3DBlitLoops.Blit(Native Method)
at sun.java2d.pipe.DrawImage.blitSurfaceData(Unknown Source)
at sun.java2d.pipe.DrawImage.renderSurfaceData(Unknown Source)
at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
at com.gamelizard.util.GLApplet$LoaderProgressBar.render(GLApplet.java:855)
at com.gamelizard.util.GLApplet.renderLoader(GLApplet.java:629)
at com.gamelizard.games.rimscape.RimscapeRunner$2.refreshLoader(RimscapeRunner.java:275)
at com.gamelizard.util.GLApplet.runLoader(GLApplet.java:343)
at com.gamelizard.games.rimscape.RimscapeRunner.init(RimscapeRunner.java:313)
at com.gamelizard.games.rimscape.RimscapeRunner.main(RimscapeRunner.java:110)

Dynamic libraries:
0x00400000 - 0x0040B000 C:\Program Files\Java\j2re1.4.2_05\bin\javaw.exe
0x77F50000 - 0x77FF7000 C:\WINDOWS\System32\ntdll.dll
0x77E60000 - 0x77F46000 C:\WINDOWS\system32\kernel32.dll
0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78087000 C:\WINDOWS\system32\RPCRT4.dll
0x77D40000 - 0x77DCC000 C:\WINDOWS\system32\USER32.dll
0x7E090000 - 0x7E0D1000 C:\WINDOWS\system32\GDI32.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
0x76390000 - 0x763AC000 C:\WINDOWS\System32\IMM32.DLL
0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL
0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll
0x08000000 - 0x08139000 C:\Program Files\Java\j2re1.4.2_05\bin\client\jvm.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll
0x10000000 - 0x10007000 C:\Program Files\Java\j2re1.4.2_05\bin\hpi.dll
0x00830000 - 0x0083E000 C:\Program Files\Java\j2re1.4.2_05\bin\verify.dll
0x00840000 - 0x00859000 C:\Program Files\Java\j2re1.4.2_05\bin\java.dll
0x00860000 - 0x0086D000 C:\Program Files\Java\j2re1.4.2_05\bin\zip.dll
0x02C50000 - 0x02D62000 C:\Program Files\Java\j2re1.4.2_05\bin\awt.dll
0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV
0x771B0000 - 0x772D4000 C:\WINDOWS\system32\ole32.dll
0x5AD70000 - 0x5ADA4000 C:\WINDOWS\System32\uxtheme.dll
0x02DD0000 - 0x02E21000 C:\Program Files\Java\j2re1.4.2_05\bin\fontmanager.dll
0x51000000 - 0x51047000 C:\WINDOWS\System32\ddraw.dll
0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll
0x5C000000 - 0x5C0C8000 C:\WINDOWS\System32\D3DIM700.DLL
0x74720000 - 0x74764000 C:\WINDOWS\System32\MSCTF.dll
0x03120000 - 0x0314B000 C:\WINDOWS\System32\msctfime.ime
0x031E0000 - 0x03218000 C:\Program Files\Trillian\events.dll
0x77340000 - 0x773CB000 C:\WINDOWS\system32\COMCTL32.dll
0x763B0000 - 0x763F5000 C:\WINDOWS\system32\comdlg32.dll
0x70A70000 - 0x70AD4000 C:\WINDOWS\system32\SHLWAPI.dll
0x773D0000 - 0x77BCA000 C:\WINDOWS\system32\SHELL32.dll
0x71950000 - 0x71A34000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1515_x-ww_7bb98b8a\comctl32.dll
0x03500000 - 0x03522000 C:\Program Files\Java\j2re1.4.2_05\bin\dcpr.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
0x6D510000 - 0x6D58D000 C:\WINDOWS\system32\DBGHELP.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 1728K, used 823K [0x10010000, 0x101e0000, 0x104f0000)
eden space 1600K, 50% used [0x10010000, 0x100d9890, 0x101a0000)
from space 128K, 13% used [0x101a0000, 0x101a4428, 0x101c0000)
to space 128K, 0% used [0x101c0000, 0x101c0000, 0x101e0000)
tenured generation total 21392K, used 15876K [0x104f0000, 0x119d4000, 0x14010000)
the space 21392K, 74% used [0x104f0000, 0x11471398, 0x11471400, 0x119d4000)
compacting perm gen total 4096K, used 3592K [0x14010000, 0x14410000, 0x18010000)
the space 4096K, 87% used [0x14010000, 0x143921e0, 0x14392200, 0x14410000)

Local Time = Tue Aug 24 22:06:23 2004
Elapsed Time = 8

The exception above was detected in native code outside the VM

Java VM: Java HotSpot™ Client VM (1.4.2_05-b04 mixed mode)

An error report file has been saved as hs_err_pid3676.log.

Please refer to the file for further information.

Just a guess, but perhaps that means you need a new graphics card :stuck_out_tongue:

i.e. your graphics card D3D (Direct3D/DirectX) driver is crap and contains bugs, and presuming you already upgraded to the latest version, then you’re doomed - your card manufacturer is lazy or incompetent, and you need to get a new one. Or, possibly, you’re using TOO NEW a driver, and it’s buggy, and you should downgrade a bit (often happens with nVidia drivers, sigh).

Or wait until java stops using d3d and uses only OGL instead? ::slight_smile:

A friend got this:

An unexpected exception has been detected in native code outside the VM. 
 Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x2CA77C6 
 Function=Java_sun_print_Win32PrintJob_endPrintRawData+0x1622 
 Library=D:\Program Files\Java\j2re1.4.2_03\bin\awt.dll 
  
 Current Java thread: 
      at sun.awt.windows.Win32BlitLoops.Blit(Native Method) 
      at sun.java2d.pipe.DrawImage.blitSurfaceData(Unknown Source) 
      at sun.java2d.pipe.DrawImage.renderSurfaceData(Unknown Source) 
      at sun.java2d.pipe.DrawImage.copyImage(Unknown Source) 
      at sun.java2d.pipe.DrawImage.copyImage(Unknown Source) 
      at sun.java2d.pipe.DrawImage.copyImage(Unknown Source) 
      at sun.java2d.SunGraphics2D.drawImage(Unknown Source) 
      at sun.java2d.SunGraphics2D.drawImage(Unknown Source) 
      at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source) 
      at javax.swing.JComponent.paintDoubleBuffered(Unknown Source) 
      at javax.swing.JComponent.paint(Unknown Source) 
      at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source) 
      at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source) 
      at sun.awt.SunGraphicsCallback.runComponents(Unknown Source) 
      at java.awt.Container.paint(Unknown Source) 
      at sun.awt.RepaintArea.paint(Unknown Source) 
      at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source) 
      at java.awt.Component.dispatchEventImpl(Unknown Source) 
      at java.awt.Container.dispatchEventImpl(Unknown Source) 
      at java.awt.Window.dispatchEventImpl(Unknown Source) 
      at java.awt.Component.dispatchEvent(Unknown Source) 
      at java.awt.EventQueue.dispatchEvent(Unknown Source) 
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) 
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) 
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
      at java.awt.EventDispatchThread.run(Unknown Source) 
  
 Dynamic libraries: 
 0x00400000 - 0x00407000      D:\Program Files\Java\j2re1.4.2_03\bin\javaw.exe 
 0x77F50000 - 0x77FF7000      D:\WINDOWS\System32\ntdll.dll 
 0x77E60000 - 0x77F46000      D:\WINDOWS\system32\kernel32.dll 
 0x77DD0000 - 0x77E5D000      D:\WINDOWS\system32\ADVAPI32.dll 
 0x78000000 - 0x78087000      D:\WINDOWS\system32\RPCRT4.dll 
 0x77D40000 - 0x77DCC000      D:\WINDOWS\system32\USER32.dll 
 0x7E090000 - 0x7E0D1000      D:\WINDOWS\system32\GDI32.dll 
 0x77C10000 - 0x77C63000      D:\WINDOWS\system32\MSVCRT.dll 
 0x08000000 - 0x08138000      D:\Program Files\Java\j2re1.4.2_03\bin\client\jvm.dll 
 0x76B40000 - 0x76B6C000      D:\WINDOWS\System32\WINMM.dll 
 0x10000000 - 0x10007000      D:\Program Files\Java\j2re1.4.2_03\bin\hpi.dll 
 0x00820000 - 0x0082E000      D:\Program Files\Java\j2re1.4.2_03\bin\verify.dll 
 0x00830000 - 0x00849000      D:\Program Files\Java\j2re1.4.2_03\bin\java.dll 
 0x00850000 - 0x0085D000      D:\Program Files\Java\j2re1.4.2_03\bin\zip.dll 
 0x02C40000 - 0x02D4F000      D:\Program Files\Java\j2re1.4.2_03\bin\awt.dll 
 0x73000000 - 0x73023000      D:\WINDOWS\System32\WINSPOOL.DRV 
 0x76390000 - 0x763AC000      D:\WINDOWS\System32\IMM32.dll 
 0x771B0000 - 0x772D4000      D:\WINDOWS\system32\ole32.dll 
 0x5AD70000 - 0x5ADA4000      D:\WINDOWS\System32\uxtheme.dll 
 0x02DC0000 - 0x02E10000      D:\Program Files\Java\j2re1.4.2_03\bin\fontmanager.dll 
 0x51000000 - 0x51047000      D:\WINDOWS\System32\ddraw.dll 
 0x73BC0000 - 0x73BC6000      D:\WINDOWS\System32\DCIMAN32.dll 
 0x5C000000 - 0x5C0C8000      D:\WINDOWS\System32\D3DIM700.DLL 
 0x74720000 - 0x74764000      D:\WINDOWS\System32\MSCTF.dll 
 0x030F0000 - 0x030FA000      D:\Program Files\Java\j2re1.4.2_03\javaws\javawspl.dll 
 0x773D0000 - 0x77BCA000      D:\WINDOWS\system32\SHELL32.dll 
 0x70A70000 - 0x70AD4000      D:\WINDOWS\system32\SHLWAPI.dll 
 0x71950000 - 0x71A34000      D:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.1515_x-ww_7bb98b8a\comctl32.dll 
 0x77340000 - 0x773CB000      D:\WINDOWS\system32\comctl32.dll 
 0x03320000 - 0x0332F000      D:\Program Files\Java\j2re1.4.2_03\bin\net.dll 
 0x71AB0000 - 0x71AC5000      D:\WINDOWS\System32\WS2_32.dll 
 0x71AA0000 - 0x71AA8000      D:\WINDOWS\System32\WS2HELP.dll 
 0x71A50000 - 0x71A8B000      D:\WINDOWS\System32\mswsock.dll 
 0x76F20000 - 0x76F45000      D:\WINDOWS\System32\DNSAPI.dll 
 0x76FB0000 - 0x76FB7000      D:\WINDOWS\System32\winrnr.dll 
 0x76F60000 - 0x76F8C000      D:\WINDOWS\system32\WLDAP32.dll 
 0x76FC0000 - 0x76FC5000      D:\WINDOWS\System32\rasadhlp.dll 
 0x71A90000 - 0x71A98000      D:\WINDOWS\System32\wshtcpip.dll 
 0x03890000 - 0x038B2000      D:\Program Files\Java\j2re1.4.2_03\bin\dcpr.dll 
 0x038C0000 - 0x038F8000      C:\Program Files\Trillian\events.dll 
 0x763B0000 - 0x763F5000      D:\WINDOWS\system32\comdlg32.dll 
 0x605D0000 - 0x605D8000      D:\WINDOWS\System32\mslbui.dll 
 0x77120000 - 0x771AB000      D:\WINDOWS\system32\OLEAUT32.DLL 
 0x03420000 - 0x03443000      D:\Program Files\Java\j2re1.4.2_03\bin\jsound.dll 
 0x72D20000 - 0x72D29000      D:\WINDOWS\System32\wdmaud.drv 
 0x72D10000 - 0x72D18000      D:\WINDOWS\System32\msacm32.drv 
 0x77BE0000 - 0x77BF4000      D:\WINDOWS\System32\MSACM32.dll 
 0x77BD0000 - 0x77BD7000      D:\WINDOWS\System32\midimap.dll 
 0x76C90000 - 0x76CB2000      D:\WINDOWS\system32\imagehlp.dll 
 0x6D510000 - 0x6D58D000      D:\WINDOWS\system32\DBGHELP.dll 
 0x77C00000 - 0x77C07000      D:\WINDOWS\system32\VERSION.dll 
 0x76BF0000 - 0x76BFB000      D:\WINDOWS\System32\PSAPI.DLL 
  
 Heap at VM Abort: 
 Heap 
  def new generation   total 4544K, used 2080K [0x10010000, 0x104f0000, 0x104f0000) 
   eden space 4096K,  50% used [0x10010000, 0x102180e0, 0x10410000) 
   from space 448K,   0% used [0x10410000, 0x10410000, 0x10480000) 
   to   space 448K,   0% used [0x10480000, 0x10480000, 0x104f0000) 
  tenured generation   total 60544K, used 57620K [0x104f0000, 0x14010000, 0x14010000) 
    the space 60544K,  95% used [0x104f0000, 0x13d35248, 0x13d35400, 0x14010000) 
  compacting perm gen  total 7936K, used 7699K [0x14010000, 0x147d0000, 0x18010000) 
    the space 7936K,  97% used [0x14010000, 0x14794fd0, 0x14795000, 0x147d0000) 
  
 Local Time = Tue Aug 24 20:47:32 2004 
 Elapsed Time = 32 
 # 
 # The exception above was detected in native code outside the VM 
 # 
 # Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode) 
 # 

He’s on a Radeon 9800XT. Similar errors occur frequently it seems. It’d be silly to ask someone like him to “get a better graphics card” because my game isn’t working right :stuck_out_tongue: