• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Unable to get make file running?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hi
I am complete newbie with Java I am trying to get a app I need for to working Unfortunately it in java source code I tried compiling it Sun NetBeans IDE 5.5 I am using command prompt not the GUI I trying to get app compiling but when I when I try to run the make file for a multi file source code compiling using the authors make file.

The in directory c:\3dtools\j3d/loader/Makefile
Exception in thread "main" java.lang.NoClassDefFoundError: Makefile

Here is the contents of the make file.

JAVA_HOME=C:/applis/jdk1.4.1
all:
$(JAVA_HOME)/bin/javac -classpath ../.. ../../Export3D.java
cd ../..;$(JAVA_HOME)/bin/java -classpath . -Xmx512m Export3D


What am I doing wrong?


PS The source code is here.

http://www.geocities.com/rtb7/files/gp32/3d_tools.zip

Thank you for your time!
Jason Rivard

Unable to get make file running?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exception in thread "main" java.lang.NoClassDefFoundError: Makefile

What command exactly are you typing in to run this? The error message suggests that you're trying to run a makefile as if it is a Java program, i.e., you must be typing in something like:

java Makefile

on the command line. That will not work, because the file named Makefile is not a Java class file.

You need the 'make' utility to run makefiles. Note that this utility is not normally included with Windows (it is with most versions of Unix). You'll need to find a Windows version of the 'make' utility, but most likely it will be much easier if you just execute the commands in the Makefile by hand from the console window, e.g.:

javac -classpath ..\.. ..\..\Export3D.java
cd ..\..
java -classpath . -Xmx512m Export3D
[ December 15, 2006: Message edited by: Jesper Young ]
 
jason rivard
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can not get the javac working should I replace it with java instead?

How do I get the do I know I have the right version jdk1.4.1 is supported my compiler?
 
lowercase baba
Posts: 13019
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, let's slow down. what, exactly, are you trying to do, what have you done, and what don't you understand?

forget about make, does your program compile when you do it manually from the command line? that's the first step.
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can not get the javac working should I replace it with java instead?

No; 'javac' is the compiler, 'java' is the launcher to start programs. They are different programs with different purposes so you can't just replace one with the other.

Do you have Java installed correctly? Do you know how to use it? Before trying to compile and figure out some program that someone else wrote, learn how to write a simple program yourself and to use the compiler. See the Java Beginners FAQ.
 
jason rivard
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what is the difference between java and javac, and where can I get a javac compatible compiler?
 
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javac = java compiler, it takes java source code and turns it into bytecode with .class extension

java = starts up the java virtual machine and loads your program so it can be run(not exact steps but should be good enough to give you a rough idea).

I am not sure what you mean by javac compatible compiler. If you downloaded a development kit from Sun, you have javac available.

You might want to start from the very beginning.

Installation instructions: http://java.sun.com/j2se/1.5.0/install.html

A tutorial to get you started
[ December 20, 2006: Message edited by: David McCombs ]
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic