• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How to run a Makefile on Netbeans

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a java code i need to study on compiler construction. This code requires a text file for its execution and this text file is called inside the Makefile of the program and also this makefile automatically executes a compiled version of the code. I tried executing it but keep getting "javac not found error". Please how do i execute this makefile?. Attached below is a copy of the makefile and the error i get when i run "make" from the Netbeans7.1 terminal.


//ERROR MESSAGE GOTTEN

javac lexer/*.java
Makefile:4: recipe for target `compile' failed
/bin/sh: javac: command not found
make: *** [compile] Error 127


MAKE FAILED (exit value 2, total time: 660ms)
//END
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is not entirely clear to me how the error message relate but ...

Find the Makefile in the 'Files' tree view (left hand side) (the Makefile should have an icon which looks like the standard document icon but overlaid with a hammer) and right mouse click on the Makefile. You should then get a context menu which will allow you to execute the different make file targets. You may have to install the C++ plugin for this to work; it is literally years since I use Netbeans without this plugin and I can't remember whether or not it is needed for this to work.

P.S. Netbeans 7.1 is now pretty old and I would suggest you upgrade to 7.4.
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kind of system is this? The makefile has both Windows-style paths and Unix-style paths.
 
Kelechi igbe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:What kind of system is this? The makefile has both Windows-style paths and Unix-style paths.



its a Windows system
 
Kelechi igbe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
its a Windows system.....please how is it written in windows
 
Ulf Dittmer
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On Windows a path like "/usr/ccs/bin/yacc" is not going to work, nor will tools like yacc, make, sed and diff generally be available (unless you installed CygWin, UnxUtils or something similar).

As an aside, I didn't even know that NetBeans could handle Makefiles (but that's no surprise, I haven't touched NetBeans in than 10 years or so).
 
Kelechi igbe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oooo cool...would you mind giving me an appropriate config for java on makefiles being run on windows. i attached this to the top of my makefile, but it still didnt locate the java compiler
 
reply
    Bookmark Topic Watch Topic
  • New Topic