Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Problems with running and compiling application

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problems with running and compiling application

    Hi! I have some troubles with one java application
    Application called CASTOR consist of two other applications JiST/SWANS and PROTOPEER
    I need it compile and run but I have no idea how to do it, I'm using Ubuntu 12.
    In castor_simulator.zip archive you can find all info about this applications and source code.

    Link for this application: http://dl.dropbox.com/u/25369700/castor_simulator.zip

    Pls, give me hint how I can run it.


  2. #2
    Member
    Join Date
    Apr 2012
    Location
    Superior, CO, USA
    Posts
    80
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default Re: Problems with running and compiling application

    You need to compile it. Your best bet is something like ant or some other automated build tool. Otherwise you'll have to import the code into your IDE to compile.
    Need Java help? Check out the HotJoe Java Help forums!

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Problems with running and compiling application

    but for Ant I need build.xml file isnt it?

  4. #4
    Member
    Join Date
    Apr 2012
    Location
    Superior, CO, USA
    Posts
    80
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default Re: Problems with running and compiling application

    Yes, you'll need that. There are examples out there that should be very simple to modify. To get you started:

    <?xml version="1.0" encoding="UTF-8"?>
     
    <project name="project_name" default="compile" basedir=".">
    	<!-- location properties -->
    	<property name="build.dir" location="build" />
    	<property name="src.dir" location="src" />
     
    	<!-- compile time value properties -->
    	<property name="compile.debug" value="true" />
    	<property name="compile.optimize" value="false" />
    	<property name="compile.deprecation" value="true" />
    	<property name="compile.source" value="1.6"/>
    	<property name="compile.target" value="1.6"/>
    	<property name="compile.checked" value="-Xlint:-path"/>
     
    	<path id="the.jars">
    		<fileset dir="lib">
    			<include name="bcel-5.2.jar" />
    			<include name="bsh-2.0b4.jar" />
    			<include name="colt.jar" />
    			<include name="jargs.jar" />
    			<include name="jython.jar" />
    			<include name="log4j-1.2.15.jar" />
    		</fileset>
    	</path>
     
    	<target name="compile">
    		<mkdir dir="${dest.classes.dir}"/>
     
    		<javac srcdir="${src.dir}"
    				destdir="${dest.classes.dir}"
    				debug="${compile.debug}"
    				deprecation="${compile.deprecation}"
    				optimize="${compile.optimize}"
    				source="${compile.source}"
    				target="${compile.target}"
    				includeAntRuntime="false">
    			<compilerarg value="${compile.checked}" />
    			<classpath refid="the.jars" />
    		</javac>
    	</target>
     
     
    	<!-- clean -->
    	<target name="clean" depends="checks">
    		<delete dir="${dest.classes.dir}"/>
    	</target>
    </project>

    this is completely untested but is based on a build.xml I use.
    Need Java help? Check out the HotJoe Java Help forums!

  5. #5
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Problems with running and compiling application

    thnx...i got it

Similar Threads

  1. [SOLVED] n00b having problems running code
    By cha0s619 in forum What's Wrong With My Code?
    Replies: 10
    Last Post: November 10th, 2012, 04:31 PM
  2. problems running recursion, any help would be grealty appreciated!
    By local127001 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: February 9th, 2012, 01:17 PM
  3. getting NPException while running my struts first application using tomcat
    By rafishaik999 in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: September 19th, 2011, 05:56 AM
  4. Im having problems compiling a very simple .js file to .exe
    By idesyl in forum Member Introductions
    Replies: 3
    Last Post: March 10th, 2011, 05:16 AM
  5. Textpad Program Running Problems
    By Paddy in forum Java IDEs
    Replies: 4
    Last Post: January 27th, 2010, 09:14 PM