Problem with jar...

Hi All,
I have a small problem about the jar file.
I have a jar file which contain and Gateway.o file which is a linux
executable.
Now i have to execute this command through the java program.
but when i execute the following problem comes...
[root@linux149 testfolder]# java -cp .:./linux.jar GatewayExecutionCcode
java.io.IOException: java.io.IOException: Gateway.o: not found
at java.lang.UNIXProcess.<init>(UNIXProcess.java:143)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at GatewayExecutionCcode.gatewayCcode(GatewayExecutionCcode.java:12)
at GatewayExecutionCcode.main(GatewayExecutionCcode.java:35)
Any help will be highly appreciated

No worries. Hope it works.
From my C days (and we are talking a while ago), I believe the normal progression is:
foo.c (source file) + foo.h (header file) -> (compiling) -> foo.o (object file) --> (linking) --> foo (executable)
In *nix, the name doesn't actually matter.  But o implies another type of file.
- Saish
"My karma ran over yoru dogma." - Anon

Similar Messages

  • CAPS 5.1.3U3 problem with jar import

    Since we installed update release 3 for JCAPS 5.1.3 we have the following problem with the Enterprise Designer:
    1) In a jcd I click "Import jar file"
    2) I add or remove a jar file (same project directory).
    3) I click close.
    result: I get an "Unexpected Exception": "A java.lang.StackOverflowError exception occurred. ..."
    In our productive JCAPS we work still with 5.1.3U2 and there we do not experience the problem.
    The repository.log does not report any regarding error.
    Restarting the repository and clearing the enterprise designer's user cache do not change the situation.
    Has anybody any idea what to do?
    Heiner.
    Edited by: HeinerFauteck on 11.11.2008 13:44
    Edited by: HeinerFauteck on 11.11.2008 13:45

    Hello Everybody,
    Even I'm also experiencing the "java.lang.StackOverflowError exception" when I want to delete the imported JAR file from any JCD. Increasing the heap size to 1024KB also didn't work.
    I suppose it is problem with the U3.

  • PROBLEM WITH JAR FILES!!! QUICK HELP NEEDED!

    Hi guys
    What problem could I have if I can run a program with java.exe (I use JDK 1.5) but not in a JAR-File (I added the Main-Class-key to MANIFEST.MF)???
    Please answer fast!!!
    Thanks

    What problem could I haveThat depends a lot on what you did wrong. What did you do to run the Jar file, and what error message(s) did you then get?

  • Problem with JAR Deployment

    Hi,
    I knew there are many threads about the deployment to a jar file and problems of missing additional jars used in the project. But I'm facing a problem, which I couldn't solve by reading the threads. Also I've read in Oracle JDeveloper 10g Handbook of OraclePress howto "Create a Java Application JAR File" and hopefully done all necessary steps.
    at the moment I've done the following
    1. create a new Deployment to JAR
    2. enter a name for JAR File: C:\test.jar
    3. checked "Include Manifest File"
    4. set the Main Class to main.MainFrame
    5. create a new File Group "libs" with type Libraries
    6. I've selected all jars available in "Filters" (later I will try to minimize the added jars, but for a first try all jars should guarantee that nothing is missing)
    7. deployed ma project to jar-file
    8. running java.exe -jar C:\test.jar
    I get always NoClassDefFoundError ...
    Opening the test.jar in JDEveloper I can see all the jars inside it, opening the manifest.MF I see the following:
    Manifest-Version: 1.0
    Created-by: Oracle Jdeveloper 10.1.3.0.4
    Main-Class: main.MainFrame
    What else do I have to do to get it running without error???
    Thanks for any help - You're helping a despairing person near at the end of all nerves :)
    chrissy

    There is an option in Jar deployment profile properties, Additional manifest files to merge...
    Add a file such that the contents define your classpath. I have one that looks like this:
    Class-Path: lib\frmjdapi.jar lib\support.jar
    Make sure the Class-Path is on one line and append a new line to the end. So your final file will contain two lines. first is the classpath and second is just the line feed.
    When you opn the Manifest file now, you should see the Class-Path contents added.
    Good luck.

  • Strange problem with jars in Java Mapping

    Hi All,
    I'm trying to implement a Java Mapping that uses Xerces. I'm using xercesImpl.jar.
    I put the xercesImpl.jar file in the folder containing the .class file (the Java Mapping program), and zipped the folder.I imported the zip file as an archive and used it in the Interface Mapping.
    My code uses the org.apache.xerces.parsers.<b>SAXParser</b> class.
    However, while trying to execute the Interface Mapping, it gives error: <b>Unable to find resource:'org/apache/xerces/parsers/SAXParser.class'</b>.
    The same method works when I'm using xerces.jar and using classes javax.xml.parsers.<b>DocumentBuilder</b> and
    javax.xml.parsers.DocumentBuilderFactory.
    I can't figure out what the problem is.
    Any ideas?
    Regards,
    Puloma.

    Hi All,
    I tried all the methods suggested. Mow my problem is that I get the following error, when I try to instantiate the SAXParser class:
    Unable to find resource:
    <b>META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration</b>
    The XMLParserConfiguration class is actually in org.apache.xerces.xni.parser. Why does XI try to find it in the wrong sub-directory?
    My code works just fine on standalone.
    Regards,
    Rahul.

  • Problem with jar file

    Hello,
    I have create successfull an executeable jar and it orks fine on my pc
    I try to run it on other pc whoe winrar is installed
    the jar can not run and the jar will be extract
    who is the problem ??????

    The problem and the solution are both the same as in your previous post about being unable to create an executable jar file (http://forum.java.sun.com/thread.jspa?threadID=744829).
    The solution is still given in the following thread:
    http://forum.java.sun.com/thread.jspa?threadID=287560&messageID=1127643
    The program is now WinRar instead of WinZip, but the solution is the same.

  • Problem with jar file please help!!

    Hi everybody
    I make a jar file using Jbuilder;my application interact with oracle and when i try to run it ,I get the following message:
    "no driver was found "
    however i add the oracle driver in my jar file as a library dependencies.
    could some one help

    I don't know whether this will help you or not.
    You have mentioned that drivers are added into jar file which you have created. Similar situation I faced. In my case I added classes12.zip for ORACLE thin drivers. For this to work I had to set classpath for this zip file. Once I set the classpath for this zip file my application started working fine.
    So if you are using any zip or jar file for your driver you will have to define it in your classpath.
    Mushy

  • Facing problem with jar

    hi is there any one who can help me immediately?
    I have developed an application previously, using jbuilder9 and jdk1.4. but now i am using jbuilder2006. and jdk1.5. after developing the application i have tried to build executable file and my executable file runs without any problem but the jar file didn't work. the system shows a message "Invalid or Corrupt jar file". I don't understand why the jar file is not working. I currently use jre1.5 but previously I used jre1.4.
    plz help me.

    As per I know
    And also confirm that the path and CLASSPATH variable set or not.
    After go in your source directory where all the class files located and use the following command on command prompt
    jar cf sample.jar *.class
    Message was edited by:
    Dhaval

  • Problem with jar file & loading manifest file

    Hi Friends
    i developing one application using java Swing
    i deploying the whole application using the jar Utility.
    but while installing & deploying this application on my machine & on the another machine error occured
    which showing that failed to load manifestfile from main module Or Main class.
    why this is happen? any other Java settings OR changing in java settings of the machine required while deploying this application on the other machine
    please guide me.

    Show the contents of the manifest file,
    and what command you used to run the program,
    and what directory you ran the command from.
    and what's the current classpath setting (if any).

  • Problem with jar including resource files.

    Have working project (classes + resources (video files)).
    After making executable jar file project still working, but without resource files.
    What can i do?
    Edited by: user13653211 on 08.01.2011 7:33

    Thanks a lot, but my browser redirects me from that link
    "http://docs.sun.com/source/819-0913/author/jar.html"
    to "http://www.oracle.com/technetwork/indexes/documentation/index.html" where I can't find material about discussed subject.
    Edited by: KaryuzinRoman on 19.01.2011 10:44

  • Problems with JAR and manifest files

    Hi
    I have a simple class MyClass.class (not in a package) which contains:
         public static void main( String[] args ) {
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                               public void run() {
                                   new MyClass();
         }and a manifest file Manifest.mf which contains:
    Manifest-Version: 1.0
    Created-By: 1.4.2_08 (Sun Microsystems Inc.)
    Main-Class: MyClassand i am using the following line to create a JAR file:
    jar -cvmf Manifest.mf  MyClass.jar MyClass.classHowever when I try to run the file I get the following error:
    Could not find the Main file. Program will exit

    And another one
    although this one has an answer it doens't solve mine (I have a line at the end of my manifest)

  • Problem with Jars

    dear friends,
    I am running a set of programs in Eclipse on Windows. They are working fine. Now when i am trying to compile the same programs on Solaris i am getting errors whose messages read like this:
    error: error reading ./SNMP4J.jar; invalid END header (bad central directory offset)
    I am using the same jars which i used on Windows. Could anybody please help me out?

    Isn't this a duplication of
    http://forum.java.sun.com/thread.jspa?threadID=5216356

  • I believe I have a problem with my Jar file build.

    Hi, there. New to Java/JavaFX. Testing language features. Operating System: Windows 7; java version 1.7.0_03; javafx version 2.0.3.
    This is a simple test with 2 classes: Test1.class resides in base directory "MyJavaFX"; TextFileLoader.class resides in sub-directory "inout" of "MyJavaFX"(i.e. MyJavaFX\inout).
    Test1.class has an import statement "import inout.TextFileLoader;" TextFileLoader.class has a package statement "package inout;"
    Both classes compile without problems and jar file is created using Ant tasks.
    Within "MyJavaFX" as my current directory, When running Application Test1 (java -jar Test1.jar)
    getting error "ClassNotFoundException: inout.TextFileLoader".
    I believe it has to do with how Test1.jar file is built. I believe line 4 should say "inout/TextFileLoader.class"
    instead of just the simple class name but I can't get my Ant task to set it up that way.
    This is "Test1.jar":
    META-INF/
    META-INF/MANIFEST.MF
    Test1.class
    TextFileLoader.class
    com/
    com/javafx/
    com/javafx/main/
    com/javafx/main/Main$1.class
    com/javafx/main/Main.class
    com/javafx/main/NoJavaFXFallback.class
    This is my "build.xml" file:
    <project name="JavaFxTest" default="default" basedir="."
         xmlns:fx="javafx:com.sun.javafx.tools.ant">
    <target name="default">
         <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
         uri="javafx:com.sun.javafx.tools.ant"
         classpath="C:/Program Files/Oracle/JavaFX 2.0 SDK/tools/ant-javafx.jar"/>
         <fx:application id="Test1"
         name="Java Test Program"
         mainclass="Test1"/>
         <fx:resources id="appRes">
         <fx:fileset dir="C:/Program Files/Oracle/JavaFX 2.0 Runtime/lib"/>
         </fx:resources>
         <fx:jar destfile="C:/MyjavaFX/Test1.jar">
         <fx:application refid="Test1"/>
         <fx:resources refid="appRes"/>
         <fileset dir="." includes="Test1.class"/>
         <fileset dir="inout" includes="TextFileLoader.class"/>
         </fx:jar>
    </target>
    </project>

    if javaw fails to launch the VM then a dialog should be displayed with an error. The first time I launch an application with javaw (after installing the JVM on a new machine it takes a long time for it to happen. have you tried from the command line >javaw -jar D.jar? I'm wondering if the installation of java went well on your machine. It's supposed to set up things correctly. did you install a new version of java over an existing one? maybe there was a java plugin previously installed on the machine before you installed j2sdk.
    walker

  • Problem with creation of jar with external libraries

    hi guys, I've no problem with creation of jar,i use this command:
    jar -mcf MANIFEST.MF NameFile.jar *.class
    my file manifest is this:
    Manifest-Version: 1.0
    Created-By: Me
    Main-Class: NameFile
    Now,I've to make a jar file,but i have to use some external libraries in jar format.
    I've read on sun tutorial and i've added to manifest this line:
    Class-Path: dt.jar formshelp.jar formsrt.jar jh.jar looks-1.3.1.jar substance.jar TableLayout.jar
    But the jar file doesn't work, neither with a double click nor with console...
    Someone can help me?Thanks!:)

    Darkweb wrote:
    sorry but,the external libraries that i use are in .jar,what i've to do to include these libraries in my jar?One of 3 things
    1) Take them out of the jar, and put them in a folder, preferably a folder in the same folder as the jar
    2) Write a custom classloader to load classes from nested jars
    3) Extract the contents of all the dependency jars, and jar them all up with your own code
    The first is almost always the most preferable, the second one is doable but brittle and resistent to updating dependencies ( you have to release everything for any changes you need, even if it's not a change in your own code ) and the third one is tedious and suffers from the same robustness problems of the second, not to mention that a lot of software licences prohibit you from actually doing it. Do the first one, it's by far the most common and easiest to maintain. I really wouldn't advise the third option, ever, though. Any activity that reduces the modularity of your application is ill-advised

  • Performance problem with ojdbc14.jar

    Hi,
    We are having performance problem with ojdbc14.jar in selecting and updating (batch updates) entries in a table. The queries are taking minutes to execute. The same java code works fine with classes12.zip ans queries taking sub seconds to execute.
    We have Oracle 9.2.0.5 Database Server and I have downloaded the ojdbc14.jar from Oracle site for the same. Tried executing the java code from windows 2000, Sun Solaris and Opteron machines and having the same problem.
    Does any one know a solution to this problem? I also tried ojdbc14.jar meant for Oracle 10g, that did not help.
    Please help.
    Thanks
    Yuva

    My code is doing some thing which might be working well with classes12.zip and which does not work well with ojdbc14.jar? Any general suggestions to make the code better, especially for batch updates.
    But for selecting a row from the table, I am using index columns in the where cluase. In the code using PreparedStatement, setting all the reuired fields. Here is the code. We have a huge index with 14 fields!!. All the parameters are for where clause.
    if(longCallPStmt == null) {
    longCallPStmt = conn.prepareStatement(longCallQuery);
    log(Level.FINE, "CdrAggLoader: Loading tcdragg entry for "
    +GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH"));
    longCallPStmt.clearParameters();
    longCallPStmt.setInt(1, cdrAgg.iintrunkgroupid);
    longCallPStmt.setInt(2, cdrAgg.iouttrunkgroupid);
    longCallPStmt.setInt(3, cdrAgg.iintrunkgroupnumber);
    longCallPStmt.setInt(4, cdrAgg.iouttrunkgroupnumber);
    longCallPStmt.setInt(5, cdrAgg.istateregionid);
    longCallPStmt.setTimestamp(6, cdrAgg.time_hour);
    longCallPStmt.setInt(7, cdrAgg.icalltreatmentcode);
    longCallPStmt.setInt(8, cdrAgg.icompletioncode);
    longCallPStmt.setInt(9, cdrAgg.bcallcompleted);
    longCallPStmt.setInt(10, cdrAgg.itodid);
    longCallPStmt.setInt(11, cdrAgg.iasktodid);
    longCallPStmt.setInt(12, cdrAgg.ibidtodid);
    longCallPStmt.setInt(13, cdrAgg.iaskzoneid);
    longCallPStmt.setInt(14, cdrAgg.ibidzoneid);
    rs = longCallPStmt.executeQuery();
    if(rs.next()) {
    cdr_agg = new CdrAgg(
    rs.getInt(1),
    rs.getInt(2),
    rs.getInt(3),
    rs.getInt(4),
    rs.getInt(5),
    rs.getTimestamp(6),
    rs.getInt(7),
    rs.getInt(8),
    rs.getInt(9),
    rs.getInt(10),
    rs.getInt(11),
    rs.getInt(12),
    rs.getInt(13),
    rs.getInt(14),
    rs.getInt(15),
    rs.getInt(16)
    }//if
    end_time = System.currentTimeMillis();
    log(Level.INFO, "CdrAggLoader: Loaded "+((cdr_agg==null)?0:1) + " "
    + GeneralUtility.formatDate(cdrAgg.time_hour, "MM/dd/yy HH")
    +" tcdragg entry in "+(end_time - start_time)+" msecs");
    } finally {
    GeneralUtility.closeResultSet(rs);
    GeneralUtility.closeStatement(pstmt);
    Why that code works well for classes12.zip (comes back in around 10 msec) and not for ojdbc14.jar (comes back in 6-7 minutes)?
    Please advise.

Maybe you are looking for

  • Best approach -Tabs based ADF Tree left side navigation with Dynamic Regions with out UI Shell

    Hi, Somebody can help for the best approach to implement the following requirement. Req: When the user select the ADF Tree left side navigation menu, each menu will open as multiple tabs(Dynamic Tabs) in right side content area with out UI Shell Temp

  • Check boxes in Manage Manually

    I prefer managing my music manually. If I wish to sync only the "Recently Added", and not delete all other files already loaded on my iPod, can I just check this specific box? Thanks

  • FOB price, Duty and local freight calculation

    Dear Consultants,     We assigned certain condition types in the access sequences. This access sequence has 4 condition tables. User can maintain condition records at any level; viz SiteArticle OR Deli.CountryHTS code OR Deli.CountryHTS codeShippingC

  • ITunes Match icon striped out "accessing itunes match" never connects

    I'm having a problem accessing itunes match. I hope someone can help. In iTunes, all the music that isn't downloaded on the computer is grayed out. When I hover over the cloud icon (which has grey stripes indicating it's not connected to itunes match

  • BEGINER NEEDS URGENT HELP!

    Hi, I'm new to java and have decided to write a simple calculator program, I know how to carry out calculations in Java but i don't know how to read in intergers from the keyboard. I am printing out a request for a value to be inputted but i don't kn