0

when I run my program I get the nexts errors:

$ make

JAVAC src/Document.java
warning: [path] bad path element "lib\jcommander.jar:lib\com": no such file or directory

1 warning

src\Menu.java:1: error: package com.beust.jcommander does not exist
import com.beust.jcommander.*;

The link of my repository and all the code is: https://bitbucket.org/IgnaMade/javasapp/src/da33bb2f63267d59c933e734b2155f78d037df31?at=master

In the fisrt line of the Menu.java I put:

import com.beust.jcommander.*;

The structure of the directories is:

In Lab2 there are the nexts directories:

src: that has all the .java's

bin: where all .txt's will be

lib: that has the jcommander.jar and the directory com

Makefile

Readme

The Makefile works with the path like this:

classpath:=$(lib_d)/jcommander.jar:$(lib_d)/com

# If there's already a CLASSPATH, put it on the front
ifneq ($(CLASSPATH),)
        classpath:= $(CLASSPATH):$(classpath)
endif

# Re-export the CLASSPATH.
export CLASSPATH:=$(classpath)

In Ubuntu it worked, but now I'm using windows and running on cygwin, and it doesn't work. I dont´t understand why.

Igna94
  • 75
  • 2
  • 8
  • You should remove `com` from that path. `classpath:=$(lib_d)/jcommander.jar:$(lib_d)/`, are you running on this on Windows? Your path separator doesn't appear to be consistent. – Elliott Frisch Jun 26 '16 at 03:38
  • @ElliottFrisch thanks, It helps, but if I only remove com It still doesn't work, but if I remove :$(lib_d)/com it works.. This is an error or It's fine ? Yes, I'm runnig on Windows with cygwin, and In Ubuntu it worked.. my teacher is gone to work with Linux and I'm in problem if he can't run it.. How can I do to make a makefile that works with Ubuntu and Windows ? – Igna94 Jun 26 '16 at 03:43

0 Answers0