Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 201529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:12:26+00:00 2026-05-11T17:12:26+00:00

I’m totally new to both java and java Server worlds… But I’ve a good

  • 0

I’m totally new to both java and java Server worlds…
But I’ve a good knowledge (17 years) of object-oriented programming.
My question is :

Why do I have to call ant to make it work (see later, if you’re not interested, skip my question ^_^ ) ?

Here’s what I want : create a simple application that can do a videoconference (= the server receives one client video stream and dispatches it to X clients).
I wanted it free (Adobe Server costs something like 10000 dollars).
The only solution I found is Red5 (see there)

I’ve downloaded and installed the 0.7 version.
Here are the steps I did to be able to compile successfully a java application for Red5 :

  1. download and install (Windows XP)
    the latest release (0.7)
  2. download & copy manually in the
    install folder some files that have been
    forgotten in the 0.7 installation
    (compare to the v0.6 release and guess which ones)
    (ivy.xml if I remember)
  3. go in the [Red5 path]\webapps folder. Copy /
    paste the tutorial folder.
  4. rename the folder to myapp.
  5. edit all the xml files in that folder, search the string tutorial
    and rename it to myapp
  6. here’s what I did and it did not work :
    compile with javac :
    javac -classpath "[Red5 path]\red5.jar" -d "[Red5 path]\webapps\myapp\WEB-INF\classes" Application.java javac -classpath "[Red5 path]\red5.jar" -d "[Red5 path]\webapps\myapp\WEB-INF\classes" TestService.java
  7. Everything worked fine but once I launched the
    Flex client the answer from the server was “Invalid Application”
  8. After many tries I found that removing everything but that code
    made everything work :

    package myapp;
    
    import org.red5.server.adapter.ApplicationAdapter;
    import org.red5.server.api.IConnection;
    import org.red5.server.api.IScope;    
    
    /* myapp */
    public class Application extends ApplicationAdapter {
    
    
    public String sayHello(Object[] params){
        return "got : " + params[0].toString();
    }
    

    }

Then I then wanted to be able to trace.

  1. I wrote that code that was working in the Red5 examples :

    package myapp;

    import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.red5.server.adapter.ApplicationAdapter; import org.red5.server.api.IConnection; import org.red5.server.api.IScope;

    public class Application extends ApplicationAdapter {

    protected static Logger log = LoggerFactory.getLogger(Application.class);
    
    public String sayHello(Object[] params){
        log.info("I got your name: "+params[0].toString());
        return "I got your name: " + params[0].toString();
    }
    

    }

  2. After restarting Red5 server : I always got that response
    from the server: "Invalid application"

  3. Then I downloaded ant, unpacked it in the [Red5 path]
  4. I've created a new file [Red5 path]\webapps\myapp\WEB-INF\build.xml
  5. I've put that xml in it :
<project name="Projet myapp" default="compile" basedir=".">
    <target name="clean" description="Clean output directories">
    </target>
    <target name="compile" depends="clean">
        <javac srcdir="./src" destdir="./classes" source="1.6" classpath="C:\Program Files\Red5\red5.jar" >
        </javac>
    </target>
    <target name = "jar" depends ="compile">
        <echo message ="Creating jar..."/>
        <jar destfile="./lib/myapp.jar" basedir="./classes"/>
        <echo message ="Done."/>
    </target>
</project>
  1. Run a shell, then type :

    cd [Red5 path]\webapps\myapp\WEB-INF
    ......\apache-ant-1.7.1\bin\ant jar
  2. Everything works fine now !
  3. Here's the question !
  4. What I don't understand is :
    Why do I have to call ant to make it work ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:12:26+00:00Added an answer on May 11, 2026 at 5:12 pm

    Ant will both compile the code (compile target) and build the jar file (target jar), which will be placed in lib folder. When you simply compile the code with javac, the jar file isn’t generated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 215k
  • Answers 215k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The solution below assumes that you have MySQL, Python and… May 12, 2026 at 11:00 pm
  • Editorial Team
    Editorial Team added an answer You can verify any variable for a certain class: if… May 12, 2026 at 11:00 pm
  • Editorial Team
    Editorial Team added an answer http://www.subsonicproject.com/docs/Using_ActiveRecord All in the Docs, run through that. May 12, 2026 at 11:00 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.