Welcome Guest, Not a member yet? Register   Sign In
can not load java applet jar file
#1

[eluser]sawatdee[/eluser]
Has anyone ever loaded a java applet jar file in a CodeIgniter application? I have tried putting the file everywhere in my directory tree, and the Java Console still tells me it can't find the jar file. I am loading the jar file with the following standard code, which worked fine before I ported the application to CodeIgniter.
Code:
<object width= "600" height= "760" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
        codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">
    <param name="type" value="application/x-java-applet;version=1.5" />
    <param name="archive" value="/myjar.jar" />
    <param name="code" value="path/applet" />
    <param name="mayscript" value="true" />
    <param name="scriptable" value="true" />
    <param name="variable" value="value" />
    <comment>
        &lt;embed type="application/x-java-applet;version=1.5" archive="/myjar.jar" code="path/applet"
        pluginspage="http://java.sun.com/j2se/1.5.0/download.html"
        mayscript="true" scriptable="true" width="600" height="760" variable="value"&gt;
        &lt;/embed&gt;
    </comment>
&lt;/object&gt;
I verified that the jar file was in the same directory as my index.php with the following code.
Code:
$this->load->helper ('directory');
$dir = directory_map ('.', true);
for ($index = 0; $index < count ($dir); $index++)
    echo $dir [$index].'<br />';
Sure enough, it was there. But the application can not find it whether I try to load "myjar.jar", "/myjar.jar", or "./myjar.jar".

What can I do to get it to load?
#2

[eluser]frenzal[/eluser]
just use site_url($file)
#3

[eluser]sawatdee[/eluser]
Okay, that works with a slight modification. For any others who don't use .htaccess files and mod rewrite, the actual code would be
Code:
$this->config->item ('base_url').'myjar.jar';
The code that actually works is always the last thing I try. 8-/




Theme © iAndrew 2016 - Forum software by © MyBB