Re: Eclipse Error: cannot find or load main class –javaagent:lib.cofoja-1.2-20140817.jar

90 views
Skip to first unread message

Nhat Minh Lê

unread,
Dec 19, 2015, 10:19:11 AM12/19/15
to cof...@googlegroups.com, jors...@gmail.com
Hi,

Looks like you wrote the hyphen '–' before 'javaagent' wrong; it should be '-'.
Could you check that on your command-line? It could also be your
e-mail client just messing things up.

Nhat

On Sat, Dec 19, 2015 at 3:24 PM, Jorge Sanz Pérez <jors...@gmail.com> wrote:
> Hi, everyone!
>
> I'm trying to use Cofoja in Eclipse but it is not possible because of the
> next error: "Error: cannot find or load main class
> –javaagent:lib.cofoja-1.2-20140817.jar"
>
> Any idea?
>
> Thank you so much for the support!
>
> Jorge.
>
> --
> You received this message because you are subscribed to the Google Groups
> "cofoja" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cofoja+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jorge Sanz Pérez

unread,
Dec 19, 2015, 10:29:21 AM12/19/15
to cofoja, jors...@gmail.com
This problem is solved.

Jorge Sanz Pérez

unread,
Dec 19, 2015, 10:31:15 AM12/19/15
to cofoja, jors...@gmail.com
This problem is solved. Thank you so much!

But now, I try to make an assert error but it doesn't detect it.

Should I open another question on the forum? 

El sábado, 19 de diciembre de 2015, 16:19:11 (UTC+1), Nhat Minh Lê escribió:

Nhat Minh Lê

unread,
Dec 19, 2015, 10:36:58 AM12/19/15
to cof...@googlegroups.com, jors...@gmail.com
No, you can just continue with this thread; it's not like we have many
e-mails on this list anyway.

About your assertion error not firing; can you try running the program
on the command line and see if it triggers? Make sure the path to the
JAR is right and that you have the *.contracts files in your class
path somewhere.

Nhat

Jorge Sanz Pérez

unread,
Dec 19, 2015, 10:45:31 AM12/19/15
to cofoja, jors...@gmail.com
Of course, I am on it.

Jorge Sanz Pérez

unread,
Dec 19, 2015, 10:54:26 AM12/19/15
to cofoja, jors...@gmail.com
How can I execute the program in the command line?

Nhat Minh Lê

unread,
Dec 19, 2015, 11:06:43 AM12/19/15
to cof...@googlegroups.com, Jorge Sanz Pérez
The same as usual with the java command plus the options you put into
Eclipse (-javaagent, etc.). Something like:
java -cp your/class/path/including/contracts
-javaagent:path/to/cofoja.jar YourMainClass

You may want to check a quick tutorial somewhere on the Internet on
how to run java programs from the command-line no your system, then
you'll want to add the -javaagent option to the command line and
that's about it.

Nhat

Jorge Sanz Pérez

unread,
Dec 21, 2015, 7:30:00 AM12/21/15
to cofoja, jors...@gmail.com
How can I compile it?
Reply all
Reply to author
Forward
0 new messages