Html files in jar file

Hi! i have put some html files in my jar file,but i cant open the html files when i un the jar file.what should i do?

thnx..it`s working now
Message was edited by:
hagi10

Similar Messages

  • How to list files from .jar file in applet?

    I have created applet and export all files to .jar file.
    I use File.list() method in applet to list files from one directory and that works ok but if I try to do that from web browser it sends exception AccessDenied meaning that File.list() isn't allowed in browser.
    I know what's the problem but I don't know how to solve it.
    What I want is to read from directory list of files.
    Help anyone?

    I will post here my code so that can be seen what I want to do:
    import java.awt.BorderLayout;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.URLClassLoader;
    import java.nio.charset.Charset;
    import javax.swing.JApplet;
    import javax.swing.JPanel;
    import javax.swing.JTextPane;
    public class test extends JApplet {
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         private JTextPane jTextPane = null;
          * This is the xxx default constructor
         public test() {
              super();
          * This method initializes this
          * @return void
         public void init() {
              this.setSize(449, 317);
              this.setContentPane(getJContentPane());
          * This method initializes jContentPane
          * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jContentPane = new JPanel();
                   jContentPane.setLayout(new BorderLayout());
                   jContentPane.add(getJTextPane(), BorderLayout.CENTER);
              return jContentPane;
          * This method initializes jTextPane     
          * @return javax.swing.JTextPane     
         private JTextPane getJTextPane() {
              if (jTextPane == null) {
                   jTextPane = new JTextPane();
              return jTextPane;
         public void start(){
              File fileDir= new File("somedirectory");
              String strFiles[]= fileDir.list();
              String a="";
              for(int i =0;i<strFiles.length;i++){
                   a=a+strFiles;
              this.jTextPane.setText(a);
    Method init() is irelevant, it just adds JTextPane in applet.
    Method start() is relevant, it runs normaly when started from Eclipse but from browser it sends exception AccessDenied.

  • How to get the class file of jar file

    hello all,
    is there any way to get the class file of jar file,as we have when we compile a java file we get class file
    same do we have any option to get the class file of jar file

    A jar file is a zip archive, so you can uznip it or extract the contents with the command "jar" - if it is what you need.

  • Trying to access the java script files via jar file in WEB SERVER

    hi all,
    I am trying to access the java script files via jar file ,which is present in Apache webserver in order to minimise the number of hits to app server.some thing like cache ...
    in jsp the code goes like this...
         <script type="text/javascript"  archive="http://localhost:14000/dojo.jar!" src="dojo.jar/parser.js" " ></script>{code}
    But i am not able to access the js file which is put in jar file present in the  webserver.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    You can use DWR (Direct Web remoting) for that. It is easy AJAX for java. ou can directly call the java script function from java class and also java class from javaScripts..
    Regards,
    Hardik

  • Since downloading firefoz 4, everytime I make a browser search I get a second page with :"Firefox can't find the file at jar:file://how can I solve the problem. Kindly reply to :ramses1@videotron.ca

    Question
    firefox 4, when I make a browser search I get a second page:"Firefox can't find the file at jar:file:///D:/Program Files/Mozilla Firefox/omni.jar!/chrome/browser/content/browser/<url></url>", how can I solve the problem.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • I upgraded to Firefox 8. Now my home page says this: "Firefox can't find the file at jar:file:///C:/Program Files (x86)/Mozilla Firefox/omni.jar!/browserconfig.properties.

    This is what it says on my screen when I open Firefox:
    Firefox can't find the file at jar:file:///C:/Program Files (x86)/Mozilla Firefox/omni.jar!/browserconfig.properties.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • When searching, I get this message: Firefox can't find the file at jar:file:///C:/Program Files (x86)/Mozilla Firefox/omni.jar!/chrome/en-US/locale/browser-region/region.propertiesproblems.

    when I enter a word in the search window (the one with the curved arrow at the end), I get this message:
    Firefox can't find the file at jar:file:///C:/Program Files (x86)/Mozilla Firefox/omni.jar!/chrome/en-US/locale/browser-region/region.propertiesproblems.

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • Getting error FF with my extension: cant find the file at jar:file in omni.jar!/chrome/browser/content/browser/ some junk text

    After installing my plugins to ff4 and ff5 I am getting error File not found.
    Firefox can't find the file at jar:file:///Applications/Firefox.app/Contents/MacOS/omni.jar!/chrome/browser/content/browser/%E6%A5%A6%E6%95%AC%E2%BC%BA%E2%BC%AF%E7%8D%95%E7%89%A5%E2%BD%B3%E6%B5%A1%E6%B1%AF%E4%B0%AF%E6%89%A9%E6%85%B2%E7%A5%B2%E4%84%AF%E7%81%B0%E6%A5%AC%E6%85%A3%E6%A5%B4%E6%B9%AF%E3%88%A5%E5%8C%B0%E7%81%B5%E6%BD%B0%E7%91%B2%E4%84%AF%E6%BD%A4%E6%95%A2%E4%8C%AF%E6%B9%AF%E7%89%B4%E6%89%A9%E7%91%B5%E2%95%A5%E3%80%B2%E5%8D%83%E2%B8%B5%E2%BC%B1%E6%BD%83%E6%99%AE%E6%9D%A9%E7%89%B5%E7%91%A1%E6%BD%A9%E2%BD%AE%E4%89%89%E5%91%85%E6%B5%A5%E2%BD%B0%E6%BD%83%E7%91%AE%E6%A5%B2%E7%95%A2%E6%95%B4%E3%84%B6%E3%9C%B8%E3%90%B4%E2%B8%B3%E6%89%A9e%E3%90%B4%E2%B8%B3%E6%89%A9e%08%01%EC%92%B0%E0%B0%BE%EC%92%B8%E0%B0%BE%EC%92%BC%E0%B0%BE%EF%BF%BF%EC%93%80%E0%B0%BE.

    Try:
    "Reset all user preferences to Firefox defaults" on the [[Safe mode]] start window.
    * http://kb.mozillazine.org/Resetting_preferences
    Delete the files extensions.* (extensions.sqlite, extensions.rdf, extensions.cache, extensions.ini) and compatibility.ini in the Firefox [[Profiles|profile folder]] to reset the extensions registry.<br />
    New files will be created when required.
    See "Corrupt extension files":
    * http://kb.mozillazine.org/Unable_to_install_themes_or_extensions
    If you see disabled, not compatible, extensions in "Tools > Add-ons > Extensions" then click the Tools button at the left side of the Search Bar (or click the "Find Updates" button in older Firefox versions) to do a compatibility check or see if there is an update.
    Create a new profile as a test to check if your current profile is causing the problems.
    See:
    * [https://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile Basic Troubleshooting: Make a new profile]
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See:
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • How to run .class file and .jar file in jdev9i

    I want to run .class file and .jar file in jdev9i,what should I do?
    Also,I want to generate .class file and .jar file in jdev9i,what should i do?

    Add the .class file containing the public static void main(...) method to the project by clicking on the + toolbar button in the navigator, open the project properties and properly set the additional classpath then right click on the .class in the navigator and say run. It should work, I've just tried it.
    Doesn't work for a .jar yet, in JDeveloper 9.0.3 it works both for .class and .jar
    Michel

  • Loading HTML page from jar file

    I am deploying an application with user help displayed in a JEditorPane. The help is in the form of an MS Word document converted to a web page (htm) and has images embedded and internal hyperlinks. When I run this in development inside my IDE (JDeveloper) the images and hyperlinks all work fine. However when I package them into the jar file required for the webstart implementation and run that the page comes up ok but neither the images are seen nor do the hyperlinks work.
    The error message that I can trap when trying to move to the hyperlink destination is
    error updating hyperlink file:\c:\programefiles\myapp\myapp.jar!\nz.co.mypackagename\helpfile.htm (the filename, directory name or volume label syntax is incorrect)
    can any one suggest a solution. I have tried altering the references in the htm document to the hyperlinks and images but no joy. I have had trouble before trying to correctly access via resources via aURL inside jar files - seems to be problematic.
    thanks
    Paul

    I tested the following html and the code works fine for me.
    <html>
    <title>JEDITORPANE TEST</title>
    <body>
         Herecomes some text. This is <b>bolded</b> text.
         <img border="0" width="200" height="200" src="images/logo.jpg">
    </body>
    </html>
    JEditorPane edit= new JEditorPane(this.getClass().getClassLoader().getResource("index2.html"));
    this.getContentPane().add(edit,BorderLayout.CENTER);
    this.setSize(700,700);
    this.show();

  • Help adding new files to Jar file.

    I am new to Java and am having problems haveing our Web App work after I have recreated the JAR file...this is what I did...
    Changed to the following directory at a dos prompt:
    D:\jdk1.3.1_01\bin
    Ran the following to extract the files from the jar file.
    jar xvf app2.jar
    ...this created 5 directories with various files.
    copied new and updated graphic files to
    D:\jdk1.3.1_01\bin\app2\images
    Recreated the jar file using the following command (pv com javavp meta-inf borland are the 5 directories that were extracted from the original jar file above):
    jar.exe cvf app2.jar pv com app2 meta-inf borland
    I now have a new jar file that is a similar size, so it looks good, but when I put it in our web site, it does not recognize certain frames (that get information from the database) that it did before (the frames are blank)
    Any thoughts on what I am doing wrong?
    Also, are there any Windows programs that i can use to make this easier instead of using the dos commands?
    Thanks...

    To change the contents while inside a java program, you might be able to use Runtime.exec(String[]). Make the array with "jar.exe" as the first index, flags in the second, and remaining arguments in the remaining indecies.

  • Deleting file from .jar file

    I m having trouble with the Forum search, so sorry if this question has been answered before in this forum.
    If I create a .jar (or an .ear) file, then open the file using Winzip and then delete a file from the zip, does it corrupt the .jar file? I ran into such a problem recently where I could not deploy the application because the .ear file still contained references to the deleted file.

    No, Winzip doesn't corrupt jar files. But if you have something else that expects to find X in the jar file and you deleted X, it isn't surprising that problems arise.

  • Firefox won't open, error message"can't find file at jar:file" etc.

    "Firefox cannot find file@jar:file:///program files/Mozilla Firefox/omni jar!/browser config. properties." I tried to download firefox and refreshed the desktop link and still no go. Cannot get firefox to browse.

    Se also:
    *http://kb.mozillazine.org/Preferences_not_saved
    *https://support.mozilla.org/kb/Preferences+are+not+saved
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.org/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If that new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • How to use files in Jar file

    Hi,
    I have one program which displays images on main form.
    But when I package all these classes and image files it shows file not found.
    I want it should read the image files which are in the same jar file.
    How can I use the files which are packaged in a Jar file?

    Here's some sample code I stole from another website.
    public void readTextFromJar(String s) {
    String thisLine;
    try {
    InputStream is = getClass().getResourceAsStream(s);
    BufferedReader br = new BufferedReader
    (new InputStreamReader(is));
    while ((thisLine = br.readLine()) != null) { 
    System.out.println(thisLine);
    catch (Exception e) {
    e.printStackTrace();
    }

  • How to use txt files in jar file

    Hi all
    I just made a program that uses a text file, but I havent managed to work it correctly, program runs without jar correctly, but when I packaged all files into a jar, it couldnt find txt file, so I can only run it when I create another text file outside of jar.
    How can I solve this??

    I used this:
    Scanner fileScan = new Scanner (new file
    ("Words.txt"));
    but when I make a jar file, it doesnt find the txt
    file inside a jar,
    do I need to specify path or something?I have already told you that you shouldn't use new File(..) you should use getResourceAsStream(String name) to get an InputStream to the file.
    Kaj

Maybe you are looking for

  • 10g forms developed using windows machine is not working in Solaris machine

    I have developed a form using the following version of Oracle Developer suit 10g Fomrs using WINDOWS machine. My Application server is in a SOLARIS machine. All the .fmx are copied in the same SOLARIS machine in a directory. I have copied the form (.

  • ABAP and XI proxies

    I am looking for some best practices/experiences from projects where we have integrated SAP backend system based on WAS 6.40 with XI using ABAP proxies or other mechanisms for SSL communication for sensitive data. We are trying to use ABAP proxies on

  • Hanging problems with JRE 1.4.0 and Windows 2000

    We have written a Java application which is an editor using Swing components. Most of us happily run it on Windows 2000 PCs with a decent PC spec of 512 Mb RAM and 1 Gb Processors and Java JDK 1.4.0 installed. However, other users with smaller spec P

  • Subscribed to creative cloud, awesome! scared to go too far yet...

    Hi, i am wondering if there is more "premium partner" specific info or guide on how to utilize creative cloud as an existing bc partner stuck in their old ways, haha I signed up for creative cloud 2 weeks ago, its that good! and luckily i did with my

  • Help Valadation HTML

    Hi Is there any easy wasy to check html valadation and fix? other then http://validator.w3.org/? Because if i use there Clean up Markup with HTML-Tidy it breaks the website banner. I need some help valadating what i have done on my new project and i'