Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JavaFx XML file read

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to JavaFx scripting and due to time constraints couldnt read much about it.
I have a requirement wherein i need to read the contents of an xml file. I found an example on the net but couldnt get it working..
This is my code




i am getting an exception at

i have a temp folder in my project directory with test.xml file...
i am not able to find out what the problem is.. can someone please help... any help is greatly appreciated
 
nayela khan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting a
java.security.AccessControlException:access denied(java.io.FilePermission \temp\test.xml)

Can some one please help?
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

nayela khan wrote:AccessControlException:access denied


Are you testing it in applet mode? In this case, you must sign the applet.

Looking again, I see backslashes. You are on Windows? You should specify a drive (absolute path), I think, something like: "E:/temp/test.xml"
It is hard to say on which drive the current directory is (unless you have only one disk & partition).
 
nayela khan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Are you testing it in applet mode? In this case, you must sign the applet.



I am not testing in applet mode. I just run the project in netbeans 6 or alternatively, running the project creates a projectName.jnlp file which i can add to widgetFX dock

Looking again, I see backslashes. You are on Windows? You should specify a drive (absolute path), I think, something like: "E:/temp/test.xml"
It is hard to say on which drive the current directory is (unless you have only one disk & partition).



I even tried giving the complete drive path but still get the same exception..
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

nayela khan wrote:

Are you testing it in applet mode? In this case, you must sign the applet.



I am not testing in applet mode. I just run the project in netbeans 6 or alternatively, running the project creates a projectName.jnlp file which i can add to widgetFX dock

Looking again, I see backslashes. You are on Windows? You should specify a drive (absolute path), I think, something like: "E:/temp/test.xml"
It is hard to say on which drive the current directory is (unless you have only one disk & partition).



I even tried giving the complete drive path but still get the same exception..



The you probably need to set the permissions. Just follow the link to FilePermission class from this forum.
 
Philippe Lhoste
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

nayela khan wrote:creates a projectName.jnlp file which i can add to widgetFX dock


For the record (I already answered in the Sun forum...), WidgetFX requires its widgets to be signed like an applet when doing system access.
 
Beauty is in the eye of the tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic