Compile an Eclipse Project with only the console and javac

3

Someone has the idea of how to compile an eclipse project, with only the command line, I have usually done it with Ant / maven or gradle, but now they have requested me at a lower level with direct commands to use it directly on server.

Something like this:

javac -cp ./somelibs .d ./somedirectory

Currently my .classpath in Eclipse that this:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 6 [1.6.0_65-b14-468]"/>
    <classpathentry kind="lib" path="lib/com.ibm.gwa.mq.jar"/>
    <classpathentry kind="lib" path="lib/com.ibm.mq.jar"/>
    <classpathentry kind="lib" path="lib/connector.jar"/>
    <classpathentry kind="lib" path="lib/db2jcc.jar"/>
    <classpathentry kind="lib" path="lib/db2jcc4.jar"/>
    <classpathentry kind="lib" path="lib/joda-time-2.3.jar"/>
    <classpathentry kind="lib" path="lib/sqlj.zip"/>
    <classpathentry kind="lib" path="lib/sqlj4.zip"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

I've been looking for some tool to extract this to a command line but it does not work for me. They will have some suggestion

    
asked by TonyMacross 11.08.2016 в 20:38
source

1 answer

2

In the eclipse debug perspective, right click on the javaw path and then on properties as the image shows:

In the window that appears in the Command Line part, eclipse shows you all the command that you run to compile your program that is running, including -vm options, jars associated with the project and the entry point of the main class :

I hope you serve, greetings.

    
answered by 16.08.2016 в 02:15