Jar runtime problem

Hi I have a jar file which function like this
It Takes the data file from the folder and insert it into database now again next day it takes the data file(new one)
and delete old data and insert new data.
There is file handle.java which is need to be invoked to do all these functions
Now question-
1)only deploying jar file on server will work?
2)if yes How to invoke this file under jar usind java command? command because it is linux
Regards

Your post makes almost no sense. Please try to explain the problem better.

Similar Messages

  • Jar File Problem Using External Packages

    I am having problems creating an Executable jar file that imports classes from my own package.
    I can create an exe jar no problem without using any external packages, but when I use an external package the jar will not execute.
    I am using WindowsXP, my package is in,
    C:/MyClasses/Database
    the class files are stored loose, not in a jar file
    I have tried altering the class-path in the manifest file, but to no joy - I may have not changed the classpath correctly!
    Please help
    Magic

    This is a mine field of "correct programming style."
    External jars, if very general, could be placed in the directory jre/lib/ext.
    In some cases you can unzip the external jars and add them to your own jar.
    The manifest.mf migth be looked into, and of course you need to communicate your patching!
    As you remarked, it might be a problem of class path usage.
    For that the jar tool documentation might explain it better than I.

  • Have CS5 and after installing yosemite is asking to install Java SE6 Runtime, problem is Java has a ton of version 6 and none for Mac, why hasnt adobe provide the right version download?

    Adobe needs to get their act together, be specific as to what version of Java SE6 Runtime is needed to open CS5  (InDesing, Illustrator, etc.)and if possible offer a direct download, since Oracle has a ton of version of SE6 and none of them for Mac specific platform. This short sight on behalf of Adobe and carelessness on behalf of apple is the kind of garbage, this companies will never get!

    I'm pretty sure this post has the link in it...
    Dreamweaver and Java SE 6 Runtime problem on MAC Mountain Lion OSX
    If not, do a search of the DW forum for Java SE 6, there has been a lot of discussion about it and the download link for it is floating around here somewhere.

  • Mix of different runtime problems on a mac.

    Hi,
    I'm on a mac 10.3 and have no intentions of upgrading. When I try to start some demo's I get a lot of different errors, all as far as I can tell related to the JRE. I installed everything from the apple website:
    Java webstart 2.3.0 (modified the May 2007)
    Applet Launcher 1.4 (modified the May 2007)
    Here's 2 of them: I give the info I get from the console:
    1. An error occurred while launching/running the application.
    Title: jME (v0.11) Test [curve.TestBezierCurve]
    Vendor: jMonkeyEngine, LLC
    Category: Invalid Argument error
    The application has requested a version of the Java 2 platform (JRE) that is currently not locally installed. Java Web Start was unable to automatically download and install the requested version. The JRE version must be installed manually.
    launch file
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+"
    codebase="http://www.jmonkeyengine.com/webstart/"
    href="jmedemo.php/curve.TestBezierCurve">
    <information>
    <title>jME (v0.11) Test [curve.TestBezierCurve]</title>
    <vendor>jMonkeyEngine, LLC</vendor>
    <homepage href="http://www.jMonkeyEngine.com"/>
    <icon href="jme_logo.jpg"/>
    <description>jME (0.11) JNLP Test - curve.TestBezierCurve</description>
    <description kind="short">jME Technology Preview</description>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="jmetest.jar" main="true"/>
    <jar href="jmetest-data.jar"/>
    <extension name="jme" href="http://www.jmonkeyengine.com/webstart/jme.jnlp" />
    </resources>
    <property key="java.library.path" value="." />
    <application-desc main-class="jmetest.curve.TestBezierCurve"/>
    </jnlp>
    exception
    JNLPException[category: Invalid Argument error : Exception: null : LaunchDesc: null ]
         at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:259)
         at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:199)
         at com.sun.javaws.Launcher.run(Launcher.java:167)
         at java.lang.Thread.run(Thread.java:552)
    console
    Java Web Start 1.4.2_12 Console, started Thu May 03 10:23:16 NZST 2007
    Java 2 Runtime Environment: Version 1.4.2_12 by Apple Computer, Inc.
    Example 2:
    An error occurred while launching/running the application.
    Title: Tower Of Hanoi
    Vendor: J�rgen Failenschmid
    Category: Launch File Error
    Unsupported JNLP version in launch file: 1.5+. Only version 1.0 is supported with this version. Please contact the application vendor to report this problem.
    launch file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- Tower Of Hanoi Webstart Configuration -->
    <jnlp spec="1.5+"
    codebase="http://projects.anycpu.com/toh/"
    href="toh.jnlp">
    <information>
    <title>Tower Of Hanoi</title>
    <vendor>J�rgen Failenschmid</vendor>
    <homepage href="http://www.anycpu.com/Java3DExample.htm"/>
    <description>Tower Of Hanoi</description>
    <description kind="short">Animated implementation of the Tower Of Hanoi puzzle using Java 3D.</description>
    <description kind="tooltip">Tower Of Hanoi</description>
    <!-- Gif or Jpeg: 64x64 during download; 32x32 as icon. Automatically resized. -->
    <icon href="icon.gif"/>
    <!-- Splash screen during launch -->
    <icon kind="splash" href="splash.jpg"/>
    <offline-allowed/>
    <shortcut online="false">
    <desktop/>
    <menu submenu="Anycpu"/>
    </shortcut>
    </information>
    <!--
    Java 3D will not run with minimum security.
    Therefore, the application JARs have to be signed.
    -->
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="toh.jar" main="true"/>
    <jar href="jars/commons-logging.jar"/>
    <jar href="jars/log4j.jar"/>
    <extension href="http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp"/>
    </resources>
    <application-desc main-class="net.pacbell.jfai.toh.util.Launcher">
         <argument>net.pacbell.jfai.toh.TowerOfHanoi</argument>
         <argument>splash.jpg</argument>
    </application-desc>
    </jnlp>
    exception
    JNLPException[category: Launch File Error : Exception: null : LaunchDesc:
    <jnlp spec="1.5+" codebase="http://projects.anycpu.com/toh/" href="http://projects.anycpu.com/toh/toh.jnlp">
      <information>
        <title>Tower Of Hanoi</title>
        <vendor>J�rgen Failenschmid</vendor>
        <homepage href="http://www.anycpu.com/Java3DExample.htm"/>
        <description>Tower Of Hanoi</description>
        <description kind="short">Animated implementation of the Tower Of Hanoi puzzle using Java 3D.</description>
        <description kind="one-line">Tower Of Hanoi</description>
        <description kind="tooltip">Tower Of Hanoi</description>
        <icon href="http://projects.anycpu.com/toh/icon.gif" kind="default"/>
        <icon href="http://projects.anycpu.com/toh/splash.jpg" kind="splash"/>
        <offline-allowed/>
      </information>
      <security>
        <all-permissions/>
      </security>
      <resources>
        <j2se initial-heap-size="-1" max-heap-size="-1" version="1.5+"/>
        <jar href="http://projects.anycpu.com/toh/toh.jar" download="eager" main="true"/>
        <jar href="http://projects.anycpu.com/toh/jars/commons-logging.jar" download="eager" main="false"/>
        <jar href="http://projects.anycpu.com/toh/jars/log4j.jar" download="eager" main="false"/>
        <extension href="http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp"/>
      </resources>
      <application-desc main-class="net.pacbell.jfai.toh.util.Launcher">
        <argument>net.pacbell.jfai.toh.TowerOfHanoi</argument>
        <argument>splash.jpg</argument>
      </application-desc>
    </jnlp> ]
         at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:179)
         at com.sun.javaws.Launcher.run(Launcher.java:167)
         at java.lang.Thread.run(Thread.java:552)
    console
    Java Web Start 1.4.2_12 Console, started Thu May 03 10:17:25 NZST 2007
    Java 2 Runtime Environment: Version 1.4.2_12 by Apple Computer, Inc.
    Help greatly appreciated.

    You should contact Apple for this issue.

  • Execute an external java program with Runtime, problem with classpath

    Hi,
    I m calling an external java program by the command:
    Runtime.getRuntime().exec("java -classpath \"library/*\" org.mypackage.TestMainProgram param1 c:/input/files c:/output/files");All my classes are stored in the relative directory "library", and it contains ONLY .jar files. However, I keep getting errors like:
    "java.lang.NoClassDefFoundError: library/antlr/jarCaused by: java.lang.ClassNotFoundException: library.antlr.jar     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)     at java.security.AccessController.doPrivileged(Native Method)     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)Could not find the main class: library/antlr.jar. Program will exit.Exception in thread "main" where "antlr.jar" is a jar file in "library". It is there but still the program keeps complaining it cannot be found. The problem applies to any jars in "library", ie.., if i have "mylib.jar" then it will complain "NoClassDefFoundError: library/mylib/jar".
    Could anyone give some pointers please?
    Many thanks!
    Edited by: 836590 on 14-Feb-2011 09:03

    836590 wrote:
    Hi,
    I m calling an external java program by the command:
    Runtime.getRuntime().exec("java -classpath \"library/*\" org.mypackage.TestMainProgram param1 c:/input/files c:/output/files");All my classes are stored in the relative directory "library", and it contains ONLY .jar files. However, I keep getting errors like:
    "java.lang.NoClassDefFoundError: library/antlr/jarCaused by: java.lang.ClassNotFoundException: library.antlr.jar     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)     at java.security.AccessController.doPrivileged(Native Method)     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)Could not find the main class: library/antlr.jar. Program will exit.Exception in thread "main" where "antlr.jar" is a jar file in "library". It is there but still the program keeps complaining it cannot be found. The problem applies to any jars in "library", ie.., if i have "mylib.jar" then it will complain "NoClassDefFoundError: library/mylib/jar".
    Could anyone give some pointers please?
    Many thanks!
    Edited by: 836590 on 14-Feb-2011 09:03First, if you run from the command line
    java -classpath "library/*" org.mypackage.TestMainProgram param1 c:/input/files c:/output/filesfrom the parent directory of library, does it work?
    Despite what I said to Kayaman about Runtime.exec not expanding the asterisk, it looks like that's what's happening, so that you're getting
    java -claspath library/aaaa_something_before_antlr.jar library/antlr.jar library/bbb.jar library/ccc.jar  org.mypackage.TestMainProgram param1 c:/input/files c:/output/filesThat is, it *is* expanding the asterisk to a list of files in the directory, and the first one is being taken as the classpath, and the second one--library/antlr.jar is being taken as the class to execute. I'm certain this doesn't happen on Linux, so it must be a Windows thing.
    Two suggestions:
    1) Try single quotes instead of double.
    2) Try the exec that takes an array
    Runtime.getRuntime().exec(new String[] {"java", "-classpath", "'library/*'", "org.mypackage.TestMainProgram", "param1", "c:/input/files", "c:/output/files");Edited by: jverd on Feb 14, 2011 9:41 AM

  • Deployment Plan / weblogic-ejb-jar.xml:  Problem

    Hello,
    I am trying to use a deployment plan to override the principal name in the weblogic-ejb-jar.xml.
    The deployment-plan looks like this (showing only the important sections)
    <variable-definition>
    <variable>
    <name>SecurityRoleAssignment_ejbRole_PrincipalNames_1</name>
    <value>MY PRINCIPAL 1</value>
    </variable>
    </variable-definition>
    <variable-assignment>
    <name>SecurityRoleAssignment_ejbRole_PrincipalNames_1</name>
    <xpath>/weblogic-ejb-jar/security-role-assignment/[role-name="View-Role"]/externally-defined</xpath>
    <operation>replace</operation>
    </variable-assignment>
    The security-role assignment in the weblogic-ejb-jar.xml looks like this:
    <security-role-assignment>
    <role-name>View-Role</role-name>
         <externally-defined/>
    </security-role-assignment>
    I 've tried to override the element-value of <externally-defined> (a valid tag in the weblogic-ejb-jar.xml ) with help of a deployment-plan.
    When trying to deploy my application (which is organised in the directory-structure: inst_dir/APP inst_dir/PLAN
    the following error occurs:
    VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected element 'principal-name@http://www.bea.com/ns/weblogic/10.0' instead of 'externally-defined@http://www.bea.com/ns/weblogic/10.0' here in element security-role-assignment@http://www.bea.com/ns/weblogic/10.0:
    This has surprised me, as externally-defined is (according to the documentation) a valid tag.
    I have tried to replace <externally-defined> with an empty <principal-name> tag (which works fine when deploying the application), but causes a security exception, when trying to use the EJB.
    Has anybody an idea if there is a workaround for this problem?
    IMHO the Validatio Problem is not justified at this place then why should an otherwise valid weblogic-ejb-jar.xml (when not using a deployment-plan) suddenly become invalid when a deployment plan is used?
    Thanx a lot in advance!
    Edited by: user10672779 on 02.12.2008 04:09

    Hi again,
    I tried it with the weblogic 10 Namespace Declaration but got then this error:
    failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
    and following Exception:
    <02.12.2008 20.00 Uhr CET> <Error> <J2EE> <BEA-160197> <Unable to load descriptor D:\exportapps\tb.ear\app\tb_flowcontrol.jar/META-INF/weblogic-ejb-jar.xml of module tb_flowcontrol.jar. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:152)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
    Caused by: com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:329)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:296)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:306)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:287)
    at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
    at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
    Searching the net couldn't supply me with another answer as to use the 90 Namespace Declaration again...
    I think I forgot to mention I am using an exploded directory.
    This all seems very strange.
    cheers.

  • Dreamweaver and Java SE 6 Runtime problem on MAC Mountain Lion OSX

    I have a problem with dreamweaver. I really love dreamweaver for building web pages and have used it for years with a PC.  I recently switched from a PC to a MAC but I find that when I open the Dreamweaver app for the first time I get a prompt that says something like "You must download Java SE 6 runtime, would you like to install it now?"   I click yes, and the download fails.  I called Apple about it, they said the software resides on Oracle's Java web site, and its out of their control.  I go to the Oracle Java web site it says "Apple supplies their version of Java SE 6 runtime and there's no way to download it from the Java.com site.  All this means is that YOUR software does not work on my MAC because these two companies can't agree on who suppies this software.
    What I need to know is HOW DO I GET DREAMWEAVER TO WORK?  How do I get around this crazy *** catch 22 situation?  And why doesn't your software recognize Java SE 7 runtime?

    I'm in the same boat with you. I recently used Time Machine to backup my profile and then wiped my entire drive and installed Mountain Lion. After importing all of my data with the Migration Assitant, Dreamweaver will NOT open.
    SnakEyez02, Oracle's website does NOT have the dowload. The link you posted is to version 7. We've been down this road already. Martiantime is correct, neither Apple nor Oracle are providing Java SE 6, but Dreamweaver is crying to have it installed.
    So, Adobe, how do we get out of the hole that we did not dig?

  • Jacob.jar and Webutil.jar singing problem(URGENT)

    I read the instructions 'Configuring the webutil' and I found that there is not a reference in the file 'signer.properties' which is referenced in the on-line help of Forms Developer (step 4).
    The problem is that when i try to sign the 2 jar files 'frmwebutil , jacob'
    using this command
    E:\oracle\ora92\forms90\WEBUTIL>SIGN_WEBUTIL.BAT e:\oracle\ora92\forms90\java\jacob.jar
    after this command a essage appears:
    Genrating self signing certificate for key=webutil2...
    Keytool error :java .lang.execption:key pair not genrated ,alias <webutil2> already exists
    there were wanings or error while genrating a self singing certifciate . please review them.
    backing up e:\oracle\ora92\forms90\java\jacob.jar as e:\oracle\ora92\forms90\java\jacob.jar.old
    1 file(s) copied..
    singing e:\oracle\ora92\forms90\java\jacob.jar using key=webutil12...
    'jarsigner' is not recognized as an internal or external command.
    Is there a chance that the cause of this problem is that there is not the file 'signer.properties'?
    What can I do ?
    AND WHAT THE NEXT STEP AFTER THIS....
    INDU

    Update the sign_webutil.bat to add the full path before the jarsigner line
    Here is the files I use:
    makecert.bat:
    for /F "eol=# tokens=1,2* delims==" %%i in (signer.properties) do set %%i=%%j
    "%JDK_HOME%\bin\keytool" -genkey -dname "cn=%DN_CN%, ou=%DN_OU%, o=%DN_O%, c=%DN_C%" -alias %JAR_KEY% -keypass %JAR_KEY_PASSWORD% -keystore "%JINIT_HOME%\lib\security\keystore" -storepass jinitiator -validity 360
    @echo Certificate created...
    sign.bat:
    for /F "eol=# tokens=1,2* delims==" %%i in (signer.properties) do set %%i=%%j
    copy /Y %1 %1.unsigned
    @echo on
    "%JDK_HOME%\bin\jarsigner" -keystore "%JINIT_HOME%\lib\security\keystore" -storepass jinitiator -keypass %JAR_KEY_PASSWORD% %1 %JAR_KEY%
    @echo Signing complete...
    Francois

  • .jar (Java) Problem - Nokia 5800 XM

    I am having a problem with installing .jar (java) games/apps to my phone.
    What happens is that it starts installing and then "hangs" at around 75% and the phone doesn't do anything for about 30 secs, the phones seems "hang". I cant run any .jar file because of that. Is this a known problem ? What can i do to fix this ?.
    I tried copying the files to the phone and install from there but the same problem occurs.
    I have the certification set to ALL.
    I get no error just the "hang" problem.
    Can anyone help me? getting frustrated!

    nvm, found the solution now .... they are slide buttons ..... feeling a bit stupid now 

  • Facing some runtime problem in new AIR 2.0Beta2 SDK and same application work in OLD AIR 2.0Beta1 SD

    Severity:
    Runtime Error
    Reproducibility:
    Every Time
    Discoverability:
    High
    Found in Version:
    SDK Flex 3 (Released)
    Affected OS(s):
    Windows              - XP
    Steps to Reproduce:
    « Hide
      Steps to reproduce:
    1. Run the Application 
    2. At the creation complete I am referring "StorageVolumeInfo" i.e. StorageVolumeInfo.storageVolumeInfo.addEventListener(StorageVolumeChangeEvent.STORAGE_VOL UME_MOUNT, onVolumeMount);
    3.
      Actual Results:
      I am getting runtime ERROR as below:
    VerifyError: Error #1014: Class flash.filesystem::StorageVolume could not be found.
    at _FreepandasV2WatcherSetupUtil$/init()
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.4.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3213]
    at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.4.0\frameworks\projects\fram ework\src\mx\managers\SystemManager.as:3065]
      Expected Results:
       I am using ADOBE AIR 2.0Beta2 version SDK.
    The same application is run in Last SDK i.e AIR 2.0Beta1
      Workaround (if any):
      I am using ADOBE AIR 2.0Beta2 version.
    Can you please help me out...
    Thank you

    My settings with air 3.3:
    <renderMode>gpu</renderMode>
    <aspectRatio>portrait</aspectRatio>
              <autoOrients>false</autoOrients>
            <fullScreen>true</fullScreen>
            <visible>true</visible>
            <softKeyboardBehavior>none</softKeyboardBehavior>
        </initialWindow>
    It only displays a white screen with a small gray square (1/5 of the screen size - top left).
    A scrollbar is visible if you drag the screen and the sound is playing...
    I tried this settings:
    <aspectRatio>portrait</aspectRatio>
            <renderMode>gpu</renderMode>
              <autoOrients>true</autoOrients>
            <fullScreen>true</fullScreen>
            <visible>true</visible>
            <softKeyboardBehavior>none</softKeyboardBehavior>
        </initialWindow>
    It won't work...
    Edit:
    I also tested the new sdk http://www.adobe.com/products/air/sdk/ with gpu mode.
    iPhone works fine but the iPad version always crashes.
    The app opened up but if I try to load a level created with box2d the app always closes (crashs).
    I think that is a gpu ram issue?
    Is this a iPad issue or air?
    Edit 2:
    I changed the creationcomplete event to viewactivate. The transition now looks really worse but the levels are loading.
    I also deleted all the elements before changing the view (removeElement and removeChild).
    The third step I made was to use weak eventListener obj.addEventListener("event, function, false,0,true);
    I think that iOS systems have the problem of less gpu ram than android devices ...

  • Possible Java Runtime problem

    I am an amatuer at best.
    I am receiving an error when trying to access any part of windows explorer now. I can't open folders at all.
    Included in picture format is the error.
    I'm running XP Home edition service pack 2
    more than enough ram/HD
    I recently un-installed AND re-installed java (from java.com). When java isn't installed - windows explorer works just fine.
    This problem is recent (last week or so) To my knowledge ZERO applications are been installed or modified. This computer is solely used for archiving pictures/video and web surfing (with the occasional video playback via VLC media player.
    Please let me know if you have any suggestions on how to combat this problem without having to re-install windows.
    If you need more information: please ask.
    Java is: 1.6.0_01
    http://img.photobucket.com/albums/v245/all2e_z/errormessage.jpg

    Hai create a batch file mode.bat
    in mode.bat write the code like dir > out.txt
    try {
                                  String line;
                                  Process p = Runtime.getRuntime().exec("mode.bat");
                                  BufferedReader input =  new BufferedReader(new InputStreamReader(p.getInputStream()));
                                  while ((line = input.readLine()) != null) {
                                  input.close();
                                catch (Exception err) {
                                }or if you need the in formation sbout the directory use the following code:
    import java.io.File;
    import java.io.IOException;
    public class FileUtil {
      public static void main(String[] a)throws IOException{
        showDir(1, new File("d:\\"));
      static void showDir(int indent, File file) throws IOException {
    File f=new     File("d:\\out.txt");
    FileWriter fw=new FileWrite(f);
    for (int i = 0; i < indent; i++)
          fw.write('-');
        fw.write(file.getName());
        if (file.isDirectory()) {
          File[] files = file.listFiles();
          for (int i = 0; i < files.length; i++)
            showDir(indent + 4, files);
    regards,
    Naga Raju

  • Jar file problem , please help

    Hi guys , i am not sure if i am in the right place to have this post in so i'll give it a try
    i know my explanation might be a shot in the dark but i'll try my best
    i have made a program using eclips , to send emails using my email , on certain conditions
    so when that codition happenes on some class in my program
    this class will call the email class and send an email to someone
    now the problem is not in the program , because as along as this program is in eclips and i run the program in eclips , everything goes fine , No errors what so ever
    but , if i make jar file , using eclips "export"
    once i run the program , the program would run , but once the same condition that ihave specified previously happenes , the current class never calls the email class , and no emails would be sent
    i am very confused wether
    1) it throws a class not found for some wierd reason
    2) or the external library that i used to send emails , is not exported
    i tried to check the CLASSPATH file and i think everything seems to be fine , so i dont know what the problem is
    so in short
    if the program is in eclips , every thign goes fine
    if the program is a jar file , then it would work fine but once it needs to send an email , it never does and i can still work on the program , but no emails will be sent
    thanks please some one help me out with this

    for more information here is the senario
    because i see that you guys are some how lost because i am not providing enough information
    so this is a detailed info of the problem
    i have 3 classes
    1) mybankmain (jframe)
    2) mybankbody (all labels and buttons and events included here)
    now: within some events in my program ,
    it calls a class called.....
    3) myEmail
    this class imports two things that are comming from an external jar file , so in short , if the external jar file is not available the program would complain
    i run this on windows xp (SP2)
    now: if this program runs on eclips , it would do everything it is supposed to do and all kind of calculations will be done and emails will be sent on the conditions that i have specified within the program
    if i make a jar file on windows , and i run the jar file , the file would work , all functionalities will work
    EXCEPT: sending an email
    - either my class is not found
    - or external jar file is not found which causes my class not to be able to perform its tasks
    i did only one test
    which is that i switched the main and i made myEmail as a main and i tried to export the jar file
    Result: jar file doesnt work
    the way i view whatever inside my jar file , i use Winrar and it would view everythign in the jar file and i see that all my classes are included there
    if i open my CLASSPATH , i see that there is a pointer to the external jar file
    if i open my manifest : i DO NOT see the exrernal jar file in there but i do see that its pointing to my main class
    class main : mybankmain
    and there is only the version and signiture
    i hope all these additional details would help in determining the problem that ihave been trying to solve for 2 weeks now

  • Jar signing problem? (continue with HOST PJC)

    <1> I've sign jar-file on Oracle9iAS server.
    <2> First form (with bean from that jar-file) loading asked me for "Granting", and after it runs without problem, bean is worked prefectly.
    <3> Second form loading shows me nothing, just explorer hanging.
    I've check JInitiator (1.3.1.9) Control Panel, Certificates tab... there is now any records. Maybe there is problem.
    (I also have(installed) Sun JSDK 1.4.1_01)
    Java Console also doesn't show any errors.
    Again form with bean doesn't loading at the second time.
    What is the problem ?
    Thank You

    Have you read the paper on Signing JAR files for JInitiator 1.3 - it details some changes that you'd be advised to make to your HTML template and the HOST bean code to get around this problem..

  • JAR File problems

    Hello,
    I have a jar file with some code I wrote that accesses a jar file from a 3rd party. I want to include the 3rd party jar files inside my jar file. So I basially have a jar file with my code (unjarred) and include the 3rd party jar files in my jar. In my MANIFEST.MF file I have properly set the Main-Class property correctly, as well as the Class-Path property. I have set my Class-Path value to 3rdparty.jar which is the jar file at the root directory of my jar. When I run my jar file I get a NoClassDefFoundError saying the 3rdparty jar file is not found. I have added a new line at the end of my MANIFEST.MF file, and am actually using ant to create my MANIFEST.MF file. When I unjar my file everything looks correct. What is the problem here? I have made sure the 3rd party classes that my code access are in the jar. What could I be doing wrong??

    Standard Java does not support placing a jar file within another jar.
    You can search for 3rd-party alternatives, ow write your own custom classloader.

  • Updating to signed JARs causes problems for older Java versions?

    Bear with me on this one -- not a Java developer, but an end user of Java products looking for a little clarification.
    We use a product which delivers a Java application via JAR file / web to end users (GlobalScape's EFT server).  With the recent release of Java 7 Update 51, users have been running into issues running these JAR files as they are not properly "signed".  We're working with the vendor to get updated signed JAR files in place, but they've warned us that these new JAR files will cause errors (or maybe not work at all) on folks who aren't running Java 7 Update 51.
    Trying to wrap my head around why that might be.  Best theory I can come up with from perusing threads here along with the Java team blogs is that the new security attributes used in the updated JAR files aren't "trusted" by older versions of Java (prior to Update 51?).
    We're pushing our vendor for clarification, but curious if someone here could help explain.
    Thanks!

    I suspect the problem with 'new JAR files will cause errors' is mainly because the vendor keeps enhancing their product, and may not any more support older JREs, or the new jars are no more compatible For example, we build our product on JDK 1.5 ... as some users out there must use that one because the 'newer and better' release does not work for them.
    But so far, we have not seen any problems running the 'JRE 7 Compliant' applications on older releases ... provided you can make your application run on latest JRE 7.
    In most cases, one can simply remove the previous signature, add (now required) attributes, and sign the same jar again.
    But I have yet to find a vendor that would simply add attributes to some older release and re-sign those. Perhaps they can't repeat the build / QA cycle, and would not 'trust' the re-signed jars.
    Our curse are signed Cryptographic Provider jars.
    Those must be signed by certificates rooted by Sun/Oracle, and adding attributes invalidates that signature - we can re-sign them, but then they won't work. In our case, we are stuck with 5+ year old Bouncy Castle jars, and it does not help us that their 'current' jars are signed with attributes - they are completely incompatible..
    IMHO, Oracle failed to think this all thru - or does not care.

Maybe you are looking for

  • How to send Smartform and Script in email?

    hi myself Devendra, i ve some queries....regarding the Script and Smartform. 1- Can any body tell me how to send Script as well as Smartform layout in mail output. I ve created script and smartform for the PO confirmation. 2- If i want to send both s

  • Something weird is going on with my iPhoto library!

    Help! I tried to import a photo from my scanner and it didn't work. The only problem now is that each time I start up iPhoto I get a message... "A photo has been found in the iPhoto Library that was not imported. Would you like to import it?" Whether

  • I am getting choppy video on my Macbook Pro.

    I know there are about 75 answers to this already, but nothing has worked. I have Maverick. I just upgraded to 8GB of ram. 2.3 GHz Intel Core i7. I ran disk utility. I have updated Flash. I have plenty of memory. I have restarted in Safe Mode and the

  • Spry image slideshow - where can i remove the title info from the code?

    <ul id="ImageSlideShow" title="Bookcase03091-1">                 <li><a href="/aphoto1/mar9/bookcase-1a.jpg" title="White Orchids"> I don't need the title info shown ever - where can I remove it so that I don't have to delete it every time I use the

  • IWeb publishing all content, when I select Publish to mm

    Before I got a paid subscription to mobile me, I had no problems publishing only the pages that had changes, but now all pages publish (even the ones I'm still working on). Does this happen to anyone else and what can be done about it? I'm using iWeb