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 4170638
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:21:43+00:00 2026-05-21T00:21:43+00:00

I have been trying all day to get this thing to work. Basically I

  • 0

I have been trying all day to get this thing to work. Basically I need to create a makefile to build my project from its sources. I know a little about Linux but not much and I am a complete makefile newbie.

I have tried loads of examples from all over the net and all complain that they are missing dependencies. Others have suggested using Ant or Mavern but this is not possible the precise handin notice is:

Quoted from Specification

Your submission should consist of a
single file comp2010.tar suitable for
use on a Linux system. This must
contain a file Makefile, and all
sources. You should not hand in any
.class files. Your Makefile must build
the tool from the Java sources. The
main class must be called Blaise. In
short, the (automatic) testing process
will consist of:

tar xf comp2010.tar

make

java Blaise < test.file > testout 2>
testerr

These commands will be executed in an
empty directory in a standard
departmental teaching Linux
environment with Java 1.6. The
CLASSPATH will include the ANTLR jar,
version 3.2.

NOTE: Please ensure that your
submission can be compiled and
executed on standard departmental
machines. Please make sure that you
use the right version of Java, and
that you do not use absolute paths. If
you use any external libraries, you
need to submit these as well.

So you see I cannot set up any environment variables as the machine to run it is not mine and I am not allowed administrative access. I cannot hand in any class files so the makefile is not for me and Ant / Mavern scripts will not work because the testing procedure is automated and uses this makefile and all I am allowed to hand in is .java files. So I need to build a makefile there is no way around that.

The source structure is as follows:

src\Package1*.java

src\Package2*.java

auto-generated\PackageA*.java

There are source files in all 3 folders needed for the thing to compile. The Main() method is in src\Package1\1.java

Each of these directories is a package in Eclipse and these 3 packages depend on each other as well as an external Jar file antlr-3.2.jar


So How do I make this makefile. That is my question and I have provided my own attempt below:


JAVAC = javac
CLASS_FILES = src/package1/1.class auto-generated/packageA/2.class auto-generated/packageA/3.class auto-generated/packageA/4.class src/Package2/5.class src/Package2/6.class src/Package2/7.class src/Package2/8.class src/Package2/9.class src/Package2/10.class src/Package2/11.class src/Package2/12.class antlr-3.2.jar.*

Default: $(CLASS_FILES)

%.class: %.java
    $(JAVAC) $<

clean: $(RM) *.class

This fails with errors like “org.antlr.runtime does not exist” this is inside the antlr-3.2.jar. I am at my wits end and need to hand in soon. I assume I am simply importing the jar all wrong and maybe I need to use whatever CLASSPATH is. Im sorry if this is a simple question but I have been trying for 6 solid hours now to make one of these. Any help you could give would be most appreciated.

Kind Regards
Feldoh

  • 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-21T00:21:43+00:00Added an answer on May 21, 2026 at 12:21 am

    I can see a few issues here:

    • as described you need to setup the Blaise class in the default package in the root directory of the tar file
    • any packages you use, should also be present directly under the root directory, not in a source sub-directory (as Java/Javac will not be able to find them there)
    • make is specific wrt where you use space and tab characters
    • your makefile does not use options to the javac command
    • which version of make are you trying to build a makefile for? the version I know would take a format like:

      JAVAC = javac
      JAVACFLAGS =
      SRC= Blaise.java \
          package1/1.java \
          packageA/2.java
      CLS= $(SRC:.java=.class)
      
      all:  $(CLS)
      
      
      .SUFFIXES : .class .java
      .java.class :
          $(JAVAC) $(JAVACFLAGS) $<
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get around this error for a day now and
I have been trying to work my way through Project Euler, and have noticed
I'm stuck on this and have been all day.. I'm still pretty new to
I have been trying to make a case for using Python at my work.
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I have been trying to find a really fast way to parse yyyy-mm-dd [hh:mm:ss]
I have been trying to determine a best case solution for registering a COM
I have been trying to explain the difference between switch statements and pattern matching(F#)
I have been trying to read a picture saved in Access DB as a
I have been trying to learn multi-threaded programming in C# and I am confused

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.