Adding java projects in eclipse instead of jar files

I have 2 java projects, one is in C:/test/ProjectA and another is C:/test/ProjectB
Under projectA and ProjectB i have sub projects.
I mainly work on ProjectB and import the jar of ProjectA in eclipse.
Now I have removed jar file of ProjectA reference through eclipse and import projects to workspace, added projects under java build path. clean and build project. no compilation error in eclipse.
when i do this, one of the class file is not getting loaded while server startup:
07-Sep-2011 09:28:03 org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\project\europa\NOS-OCT-TEST\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ESW\WEB-INF\lib\javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    NOS 0    [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ESW]  - Error configuring application listener of class com.bgc.ecm.core.web.listener.Log4jRemappingListener
    java.lang.ClassNotFoundException: com.bgc.ecm.core.web.listener.Log4jRemappingListener
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
when i add relevant jar file to the project and do a clean build server is getting started as expected.
But my changes are not reflecting since it is referring old jar file.
I am using Tomcat server as development environment.
What i want is instead of refering jar file in eclipse, add projects so that the new changes should reflect the changes without ant build for creating jar file and instead only with eclipse build with source code of the dependent project and run the application.

847389 wrote:
I have 2 java projects, one is in C:/test/ProjectA and another is C:/test/ProjectB
Under projectA and ProjectB i have sub projects.
I mainly work on ProjectB and import the jar of ProjectA in eclipse.
Now I have removed jar file of ProjectA reference through eclipse and import projects to workspace, added projects under java build path. clean and build project. no compilation error in eclipse.If you have imported the depended jar, and if its a java project. the eclipse by default refer these while compiling. I mean before using either of the ant script the or build project option in eclipse. And because of this it is not giving error.
>
when i do this, one of the class file is not getting loaded while server startup:
07-Sep-2011 09:28:03 org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\project\europa\NOS-OCT-TEST\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ESW\WEB-INF\lib\javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
NOS 0    [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ESW]  - Error configuring application listener of class com.bgc.ecm.core.web.listener.Log4jRemappingListener
java.lang.ClassNotFoundException: com.bgc.ecm.core.web.listener.Log4jRemappingListener
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
And when you deploy the build app in tomcat it looks for the dependent jar/classes in lib or classses folder, and as it is not there the error is thrown.
If you are using ant script then please specify which jar files to load in lib folder.
when i add relevant jar file to the project and do a clean build server is getting started as expected.
But my changes are not reflecting since it is referring old jar file.
I am using Tomcat server as development environment.
What i want is instead of refering jar file in eclipse, add projects so that the new changes should reflect the changes without ant build for creating jar file and instead only with eclipse build with source code of the dependent project and run the application.If you want this, then write ant script compatible of loading both the jar's.
Or you can make the ant to prompt the user which jars to be loaded, while building (I suggest this option, rather than loading all the jar's of project A and project B).

Similar Messages

  • How to Debug a Java Project in Eclipse using Tomcat6.0

    Hi
    Can anybody help me with the following questions.
    1.How to create a java project in eclipse(I am using jsp,servlets,jsf,spring,jasper,struts).
    2.How to debug my application in Eclipse Europa by putting break points.
    3.how should i add Tomcat6.0 to my project in order to debug my application so that i can put break points while running the applications and observe the values.
    Thanks
    Bala

    You may find this tutorial useful regarding to JSF, Eclipse and Tomcat: http://balusc.blogspot.com/2008/01/jsf-tutorial-with-eclipse-and-tomcat.html
    To put breakpoints, just doubleclick on the left gray rule of the code, you'll get blue bullets at the left rule, indicating a break point. Run Tomcat in debug modus (rightclick Tomcat � debug). Use the Eclipse debug perspective to step in the code (window � open perspective � debug).

  • How can i import dll files in java project in eclipse?

    Hi All,
    How can i import or link dll files in java project in eclipse?....
    dll files contains
    import com.ms.com.ComLib;
    import com.ms.com.Variant;
    import com.ms.com.ComFailException;
    import com.ms.wfc.data.AdoException;
    import com.ms.wfc.data.AdoEnums;
    Any idea of this please tell me.....
    I am using eclipse 3.4 and JRE 1.4
    Is this possible?
    Please tell me!!!!!!!!!!!!!
    Voddapally

    iMovie cannot edit mpg files, unles they come directly from a supported camera.
    I would suggest that you use a free third party app to convert it.
    Get MPEG Streamclip from Squared 5, which is free.
    Drag you mpg clip into MPEG Streamclip.
    Then, FILE/EXPORT USING QUICKTIME
    Choose Apple Intermediate Codec, and save it where you can find it. You should be able to import this file into iMovie, using the FILE/IMPORT/MOVIE command.
    Note: If your file is an MPEG2 clip, you may need to purchase the Apple QuickTime MPEG2 Playback Component from Apple. MPEG Streamclip will tell you if you need this. Don't buy it unless you have to. It costs about $20. You just have to install the component. MPEG Streamclip will use it in the background.

  • Ssl_accetp failed when java visual machine tries to load jar file

    my web server uses openssl to implement https protocol .
    my webpage contains a jar file.( "archive=droptext.jar")
    JVM failed to load this jar from web server (using https protocol).
    because Server failed to make a ssl connection after a ssl_accept failed error .(the function "SSL_accept (ssl)" failed)
    if I use class file instead of jar file. JVM can successfully make a connection with server and load the class file.
    I have no choice but to use jar file because the applet contains more than one class file.

    >
    Try putting the domain names in the Windows hosts files with their numeric addresses. That should bypass any DNS lookup. If you have central maintenance you can update all the hosts files when IP address change.
    We have considered this option, but then we have the same problem described on c). IP maintentance. IPs change often and we cannot control it.
    Malcolmmc, paul.miner, jschell,
    I think the problem is Netbios resolution, rather than DNS one. The sites that figure on java.policy file, are not available in terms of Netbios (they are not LAN clients), so they are only visibles on DNS resolution. But Java still tries to resolve them with Netbios first, so I think there's a timeout on this resolution (not the DNS one) . This timeout causes the problem.
    But, anyway .... Why is Java trying to resolve those names ??? In fact, Java will only have to match the site you are visiting with the site specified on java.policy (just a String comparison). Why does Java need to resolve (netbios & dns) the names on java.policy? I cannot figure out why.
    Thank you all.
    Marc

  • Compiling a Java Project in Eclipse

    Hey all, I'm having trouble compiling a project.
    I had a Java class two years ago and I forget how to do it. I have all the files in a folder named "final" on my desktop.
    Inside "final" is all my sounds, images, a file called table.class, sound.class, sound.java, and table.java.
    How do I get this thing to be an executable again???

    Create a new project in Eclipse and get it to work like you want. Then go to File > Export to make a jar file.

  • A question regarding Java project in ECLIPSE IDE

    A question regarding eclipse.
    No offence meant.
    I have added a jar file to the current project in its build path.
    This executes the concerned class file which is in the jar file.
    If I remove the jar file from the build path and run the project,
    it still executes that class file.
    I tried building a clean project and running it,but still executes the jar file and the class.
    Any idea why this is happening?

    A question regarding eclipse.
    No offence meant.People are not usually offended by Eclipse.
    I have added a jar file to the current project in its
    build path.
    This executes the concerned class file which is in
    the jar file.
    If I remove the jar file from the build path and run
    the project,
    it still executes that class file.
    I tried building a clean project and running it,but
    still executes the jar file and the class.
    Any idea why this is happening?You have that class file elsewhere
    or you have confused your problem statement.
    Why don't you create a new project and add everything except that class/jar (whichever yu mean)

  • Opening java project in eclipse environnement

    Hi all,
    I use eclipse environnement for java programming. I cannot open my project in eclipse, even if I specify the workspace. When I open eclipse in the specified workspcae, I cannot clic on the option "open project". Does anyone know how to open one projet in eclipse !!!!!
    Thanks a lot for any help ...
    javaFriendly

    Probably best to ask in the Eclipse forums, yes?
    However.....I guess your Eclipse project might have got corrupted or something, so (assuming your source files are still okay), backup your .java files somewhere else, delete the project directory and, in Eclipse, create a new project with the same name and then move over all your files back over. Has worked for me on a couple of occasions.

  • How to import java project to Eclipse?

    Hi
    I just got a java project which has jsp, java, struts and the .settings folder has
    org.eclipse.core.resources.prefs
    org.eclipse.jdt.ui.prefs
    org.eclipse.ltk.core.refactoring.prefs
    org.eclipse.wst.validation.prefs
    .Project file has <name>org.eclipse.jdt.core.javabuilder</name>
         <nature>org.eclipse.jdt.core.javanature</nature>
    The jsp and java files are under src folder.
    Since it is my first time to use eclipse platform, I do not know where should I put all those source files?
    Is it a dynamic web application to have those *.prefs in .settings folder?
    Thanks for help

    Why have you posted this in the JSF forum? This has nothing to do with JSF.
    To import an existing project in Eclipse, just rightclick somewhere at Project Explorer and choose Import.

  • Loading a Java project into Eclipse.

    I am trying to load a project from in eclipse
    The project is in c:\Project and is called ABC.
    My workspace in eclipse is c:\MyWorkspace.
    I am trying to import this project into the above workspace
    I am saying: New - Project - Java Project - Create project from existing source (and point it to c:\Project\ABC)
    Error:The specified location already exists.
    How do I get project ABC into my workspace ?
    I seem to have forgotten

    Just move the folder "ABC" from C:\Project to C:\Workspace
    then create a new Java Project named "ABC" and you are all set.
    Don't choose "Create from existing project" Just create the project.
    Message was edited by:
    jjhusa01

  • Java.lang.SecurityException using a simple jar file

    I created my small application using JDev 11.
    Running from JDev it works well.
    I created a simple jar file including all my classes and all libraries I used.
    Whe I try to run that jar file I get :
    java.lang.SecurityException: no manifiest section for signature file entry javax/mail/internet/AsciiOutputStream.classI didn't find any solution.
    I worked hardly with JDev 10g but I never had such problem.
    Tks
    Tullio
    Edited by: tullio0106 on Nov 25, 2008 2:22 PM

    I simply created a project containing some classes whish use java mail.
    Then I modified the project creating, in the deployment wizard, a "Dependency Analysis" filegroup adding all my classes as well as libraries.
    I uncheck the "Include Manifest" chek otherwise I would run into different problems (well documented in the forum).
    The jar file is created but when I run the application I get the Security error.
    If I remove java mail libraries (activation and java mail)from the list of used libraries and I add it to classpath it works fine.
    I suspect the problem could be in Manifes merging.
    Tks
    Tullio

  • Java.lang.NoSuchMethodException encountered when using jar file

    Hi Friends
    I am getting this peculiar exception for some time now and not able to figure out why i get it.
    I searched the net but seem to not find any proper solution.
    Here is what i am trying to do. I am using Eclipse(Latest version) and jdk 1.6.
    I have a Java project in my workspace which was previously using Java code to perform DAO look up.
    Now i have got an executable .jar file which has this DAO look up code bundled in it and i just need to include it in my project ClassPath. I have done this now and my code compiles properly. Even Eclipse is able to recognize this code.
    When i try to run the code i am getting this java.lang.NoSuchMethodException: DAOClass.getValue(java.lang.string)L
    The getValue() is present in the DAOClass in the jar file but still i am getting this exception.
    I am not able to figure out what the issue is here.
    Can you please provide your suggestions about this issue. is there something i am missing out.
    Thanks
    vikeng21

    802944 wrote:
    Hi Friends
    I am getting this peculiar exception for some time now and not able to figure out why i get it.
    I searched the net but seem to not find any proper solution.
    Here is what i am trying to do. I am using Eclipse(Latest version) and jdk 1.6.
    I have a Java project in my workspace which was previously using Java code to perform DAO look up.
    Now i have got an executable .jar file which has this DAO look up code bundled in it and i just need to include it in my project ClassPath. Is the DAO code a jar, which you are attempting to put into another jar? Then there are very specific steps that you must take, outside of the code, to accomplish that.
    If the DAO code is not a jar then the following possibilities exist
    - You are not putting the code in the executable jar.
    - You are putting it in the executable jar incorrectly due to a path problem.

  • Project behaves differently as a jar file

    I am attempting to implement a project. My development was done with netBeans 4.0. I have created a jar file with my project. When I double click on the jar file I get a frame with buttons that appear to be working correctly. When I push a button the correct frame appears with a JComboBox. When I select the first entry in the JComboBox I am ignored, however the second element to the combo box works as expected. This project executes correctly from the run icon in netbeans.
    Where do I start to debug this? Does this sound familiar to anyone.
    Thanks
    PS is this the correct forum?

    PS is this the correct forum? No, these forums are for the Java language only, and do not support for NetBeans (or any other IDE.)
    NetBeans' website provides NB support via a mailing list; there may be others.
    NB provides tutorials that cover most situations; see
    http://www.netbeans.org/kb/articles/javase-deploy.html

  • In a java applet , how to call other jar file?

    i have i programm, this programm is a java application,
    also, i already put these program into jar file, and then if i double this jar file , its work!
    but , now i need to run this program in web browser,
    i thing that i will write a simple applet with a button
    after i click this jButton, how the java applet call and run the java file?
    please help me.. it is because this is my project! thx..........
    [email protected]

    I have a solution write one batch file in that you specify class path and java home.
    then give
    java -jar Test.jar
    then call this batch file from program using Java runtime
    Runtime.exec method...
    Hope will this work

  • ServiceBus java callout - how to pack the JAR file with libraries?

    Hello
    I want to use a Java Callout from a Service Bus flow.
    What is the correct way to pack the JAR file with its nessecary libraries?
    I tried different methods to pack my JAR, but yet, as though the Java runs perfectly from the Workshop (Eclipse) , when I am trying to use the exported Jar on the ServiceBus flow, it fails with an ClassNotFoundException.
    I would really appreciate your advice here.
    Thanks
    Koby

    Well.. Looking inside my exported JAR file, I got all of the files there inside, including the jar file containing the library.
    What I'm trying to do is run a simple java program that connect through SSH and therefore use an SSH library.
    On the workshop I got it as an imported library JAR. And it works perfectly there.
    Any idea?
    Here's the complete error I get:
    <BEA-382515> <Callout to java method "public static java.lang.String sshpackage.SshProg.remoteScriptInvoke(java.lang.String,java.lang.String,java.lang.String,java.lang.String)" resulted in exception: null
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at stages.transform.runtime.JavaCalloutRuntimeStep$1.run(JavaCalloutRuntimeStep.java:158)
    Truncated. see log file for complete stacktrace
    java.lang.NoClassDefFoundError: ch/ethz/ssh2/Connection
    at sshpackage.SshProg.remoteScriptInvoke(SshProg.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: ch.ethz.ssh2.Connection
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at com.bea.wli.sb.resources.archive.HookedJarClassLoader.loadClass(HookedJarClassLoader.java:251)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    Truncated. see log file for complete stacktrace
    Edited by: kobyssh on 04:12 01/02/2010

  • Knowlwdgemanagement Java development . I need some jar files related to KM

    Hi Gurus,
    I try to develop KnowledgeManagement application in NWDS. So, i need to install some jar files . How can i install jar files in to my application and were can i findout those JA?R files.
    Points will be revert back.
    Thanks,
    Sumanth

    Hi Sumanth,
    you will find the require jar files on your portal server's file system. They are somewhere under:
    \usr\sap\<J2E>\<JC01>\j2ee\cluster\server0\apps\sap.com
    Best way to find the required jar files is to use a tool like JarFinder, ClassLocator, WinRar, etc.
    In NWDS menu choose => Project => Properties => Java Build Path => Libraries. There you can add the required jar files to your project's build path.
    Best regards,
    MArtin

Maybe you are looking for