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.

Similar Messages

  • 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).

  • How do I compile my Java project?

    How do I compile my Java project? The "Build" option is missing from the right-click menu of my Project Explorer and I can't find a compile button.

    On 08/05/2015 12:42 PM, Chris Wilkinson wrote:
    > How do I compile my Java project? The "Build" option is missing from
    > the right-click menu of my Project Explorer and I can't find a compile
    > button.
    Examine the Project menu. You'll see that, by default, Build
    Automatically is checked. Each time you make a change to a Java file,
    Eclipse rebuilds it into a .class file. To force the entire project to
    be rebuilt, whether it needs it or not, select Project -> Clean.
    Is this what you're looking for?

  • 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.

  • I am able to compile a java file in eclipse inspite of compilation errors shown in eclipse and a .class file is generated

    Hi,
    I had a java file with compilation errors as shown in eclipse IDE.
    But the class file is still generated in the classes folder on building and pressing clean the project.
    I confirmed that the class file has an updated time stamp and also that a System.out.println() statement that i added was indeed printed out when this class was encountered during the running of a web application in which this class was called somewhere.
    (The java class has no subclasses and it is a single class with public modifier).
    How does it happen so?
    Regards,
    Karthik.

    As far as I know, the java code is compiled in Eclipse as soon as you save it. i.e. press CTRL+SHIFT+s
    as far as the build is concerned, in case you have a build file where you specify how to make a jar file, the location the jsr file is to be placed, only then you have to build the project. However again, as far as just simple compile is concerned as soon as you save the files are compiled. And show you the errors if any in the tasks window.

  • 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

  • How do I compile a java file in eclipse

    Hi,
    I have just installed eclipse and added a plugin for tomcat.
    I created a new tomcat project and have been trying out several jsp files. Everything nice and dandy.
    Now there is a bean in the tutorial that I am doing. So I use the context menu, new->class.
    A file is created in the src folder. I copied the source code from the tutorial in it.
    Now I have been looking everywhere but can not find a menu option that lets me compile it.
    How does that work. I hope this is the right forum for such basic questions.
    Thank you very much.

    As far as I know, the java code is compiled in Eclipse as soon as you save it. i.e. press CTRL+SHIFT+s
    as far as the build is concerned, in case you have a build file where you specify how to make a jar file, the location the jsr file is to be placed, only then you have to build the project. However again, as far as just simple compile is concerned as soon as you save the files are compiled. And show you the errors if any in the tasks window.

  • Flex/Java project w/Eclipse Galileo

    Hi,
    I've recently installed Eclipse Galileo and am trying to get a test Flex app using BlazeDS up and running with the Flex Builder plugin.  I've got the exact same project and setup configured with Eclipse Ganymede and everything runs fine, but am completely stuck in getting it to work with Galileo.
    I initially created the Flex Project with the J2EE server option using remote object access with LiveCycle.  I also selected the create combined Java/Flex project using WTP.  I'm using a Glassfish v2.1 server and use the default context root and content folder, and am also pointing it to the blazeds.war file.  This is exactly the same way I set things up with Ganymede.
    When I try to run the project, I get a status 404.  If I go to the Flex Server properties for the project and ask it to validate the location, it says that it can't access the web server.  I know the server is running and has the application deployed and the root folder and URL seem to be correct.
    Is there anything that changed in this area between Ganymede and Galileo?  Can anyone give me any other pointers regarding what to look for to track down the problem?  I've looked at the .flexProperties files and they are exactly the same between the two, other than the workspace I'm using.  I'm really stuck on this and would very much appreciate any help.
    Thanks so much!
    Renee

    Is there no one who can help me. Or is this thread better suited for another topic (and which one)?

  • 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)

  • Compiling Problem Java Project Exception

    It's my java code that include nativfe methot.I compile it javac Bessel.java
    And I wanted to jni.h file javah -jni Bessel but I had an exception
    C:\Documents and Settings\TTG\Desktop>javac Bessel.java
    C:\Documents and Settings\TTG\Desktop>javah -jni Bessel
    error: cannot access Bessel
    class file for Bessel not found
    javadoc: error - Class Bessel not found.
    Error: No classes were specified on the command line. Try -help.
    ***** What must I do *******
    public class Bessel
    // Declaration of the Native (C) function
    private native double s17acc(double x);
    static
    // The runtime system executes a class's static
    // initializer when it loads the class.
    System.loadLibrary("nagCJavaInterface");
    // The main program
    public static void main(String[] args)
    double x, y;
    int i;
    /* Check that we've been given an argument */
    if (args.length != 1)
    System.out.println("Usage: java Bessel x");
    System.out.println(" Computes Y0 Bessel function of argument x");
    System.exit(1);
    // Create an object of class Bessel
    Bessel bess = new Bessel();
    /* Convert the command line argument to a double */
    x = new Double(args[0]).doubleValue();
    System.out.println();
    System.out.println("Calls of NAG Y0 Bessel function routine s17acc");
    for (i = 0; i < 10; i++)
    /* Call method s17acc of object bess */
    y = bess.s17acc(x);
    System.out.println("Y0(" + x + ") is " + y);
    /* Increase x and repeat */
    x = x + 0.25;
    }

    C:\Documents and Settings\TTG\Desktop>javac Bessel.java
    C:\Documents and Settings\TTG\Desktop>javah -jni Bessel
    error: cannot access BesselMy guess would be that you set the env var CLASSPATH and that you did it wrong.

  • How to Compile java project on command prompt

    Hello Friends,
    I have created one java project in eclipse. It has 3 packages, 4 external jars and one Link source (meaning it uses other java package that is not in the same project folder)
    It runs perfectly using eclipse.
    Now I want to compile my project and want to run that project.
    I tried using "javac -classpath........." but it didn't work for me. Here is the command I used:
    I am running this command under my main project folder
    javac -classpath ./../../../lib/tools/lib/blur/blur_formats-1.0.jar;./../lib/commons-codec/commons-codec-1.3.jar;./../lib/commons-httpclient/commons-httpclient-3.1.jar;./../lib/commons-logging/commons-logging-1.1.1.jar;./../lib/org.json/org.json.jar;./../lib/smack/3_0_4/smack.jar;./../../../device/branches/viper/Service/blur/common/push/src* ./src/com.proj.hnm.push.StartService.java*
    1) /device/branches/viper/Service/blur/common/push/src - is a different package I am referring (not in my current project folder) - it has java files in com.pushsync package
    2) ./src/com.proj.hnm.push.StartService.java is my main class, com.proj.hnm package also contains another 2 package, and those other packages also have .java files
    Please tell me how do I run my java project?
    Thanks

    Hi
    Since it works fine in Eclipse you should install the [Fat Jar eclipse plugin|http://fjep.sourceforge.net/] which will pack everything thats in your eclipse project into a single jar file. Then you can run: java -jar myProject.jar and it should work.

  • Export Project from Eclipse..?

    Hi All,
    How to export a Java Project from Eclipse including CLASSPATH libraries and that are in CONFIGPATH.. without missing..?
    Thanks,
    Vishnu

    As already suggested, you can export the entire Eclipse project as an archive like zip/tar, copy the archive to other system, extract and import it as an existing project into Eclipse on that system.
    Now to export an entire Eclipse project into an archive file, you can use File -> Export and select "Archive File" (under category "General") from the list of options and select the project you would like to export. It will create the archive of your project's filesystem including classpath and buildpath entries. You would have to ensure that all the classpath and buildpath entries, ATG Root etc. are valid on the system where you import it or you can update them manually if required.

Maybe you are looking for

  • Problem with asp:Button in PTWC 2.1 - onclick not rendering on second button

    I have a user control with two asp buttons in one TD tag (they both have ptrender=true on them). In the portal only the first button fires its event. The second button does not. I did a partial view source on the two buttons and I see this (button 1

  • Need to Access VoiceOver Menu + Other KB Shortcut

    I'll try to be brief: I need to restore my keyboard shortcuts to Default; Shift + T no longer types a capital "T", just nothing. In the VoiceOver menu I set Shift + t to read text. Now I cannot bring back the VoiceOver "floating" menu. Apple's docume

  • PS - PO Excise Value not deducted from Project Available Budget

    Hello SAP Gurus, My problem is that when an Excisable PO is created against SAP Project then the Excise Value is not included in Budget - Commitment/Actual Amounts. PO Basic Value + Tax (VAT/CST) is deducted from Available Budget, but Excise value is

  • Service Request Auto Approval

    Hello TechNet Experts, I am looking to create a workflow or somehow setup the Service Requests to automatically approve / not require approval. Any ideas on how to do this? So basically, I want a service request to come in just like an incident does,

  • Click handler in ItemRenderer on "hovered" state

    Hey, im trying to add Button to spark List itemRenderer and listen for click. If button is still there (not usin includeIn) it works. But when it's just visible in "hovered" state, click is not dispatched. Is it bug? or can you let me know some worka