I feel really dumb......
So I am writing a Java app, and if you can help me get this to work you'll be able to see it.
so my jar file is here: http://team2648.com/OTIS2/admin/OmniNode2.8.jar
I would like it to be able to be used as a Java web-start application, i was following the tutorial here: http://download.oracle.com/javase/tutorial/deployment/webstart/deploying.html
so I wrote the following JNLP file as directed:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
codebase="http://team2648.com/OTIS2/admin"
href="test.jnlp">
<information>
<title>OmniNode Mapper</title>
<vendor>Techplex Engineer</vendor>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+"
href="http://java.sun.com/products/autodl/j2se"/>
<jar href="OmniNode2.8.jar" main="true" />
</resources>
<application-desc
name="OmniNode Mapper"
main-class="omninode28.Driver"
width="300"
height="300">
</application-desc>
<update check="background"/>
</jnlp>
But as you'll see if you download the jnlp http://team2648.com/OTIS2/admin/test.jnlp
and run it, We get the following error(On a PC):
access denied (java.io.FilePermission C:\Users\MyUserName\Documents read)
Exception
java.security.AccessControlException: access denied (java.io.FilePermission C:\Users\Techplex Engineer\Documents read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.exists(Unknown Source)
at java.io.Win32FileSystem.canonicalize(Unknown Source)
at java.io.File.getCanonicalPath(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2.createShellFolder(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2.getPersonal(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
at sun.awt.shell.ShellFolder.get(Unknown Source)
at javax.swing.filechooser.FileSystemView.getDefaultDirectory(Unknown Source)
at javax.swing.JFileChooser.setCurrentDirectory(Unknown Source)
at javax.swing.JFileChooser.(Unknown Source)
at javax.swing.JFileChooser.(Unknown Source)
at omninode28.NodePanel.(NodePanel.java:61)
at omninode28.EditPanel.(EditPanel.java:31)
at omninode28.Driver.main(Driver.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
So those files it points at:
this line: fc = new JFileChooser();
So this leads me to believe that i need to ask the user permission to write to their system.
I am befuddled. Any help would be super, Thanks
Edit... Should I just make users download the Jar directly? pros cons?