Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use mujava to mutate the entire project? #20

Open
Provence613 opened this issue Apr 5, 2020 · 8 comments
Open

How to use mujava to mutate the entire project? #20

Provence613 opened this issue Apr 5, 2020 · 8 comments

Comments

@Provence613
Copy link

Hi,my problem now is that I want to mutate the java files in the entire joda-time project, but the java files will call the methods of other classes of the package or the methods of other package classes. Can situations like this be handled by mujava?
No matter I put the whole project or a single java file into the src folder, it will report an error.
If I put a single java file into the src folder, the log file shows the following error:

[Error] MonthDay.java java.lang.NoClassDefFoundError: Could not initialize class org.joda.time.DateTimeFieldType
MutantsGenPanel:
java.lang.NoClassDefFoundError: Could not initialize class org.joda.time.DateTimeFieldType

If I put the whole project into the src folder, the log file shows the following error:

[Error] org\joda\time\Chronology.java java.lang.NoClassDefFoundError: Could not initialize class org.joda.time.DateTimeZone
MutantsGenPanel:
java.lang.NoClassDefFoundError: Could not initialize class org.joda.time.DateTimeZone

Regards.

@winonecheng
Copy link

winonecheng commented Apr 6, 2020

There is a similar question in FAQ.

@Provence613
Copy link
Author

There is a similar question in FAQ.

Hi.After many attempts, I still can't successfully use mujava to mutate in a large java library. My operations are as follows:

  1. Copy the src code in the java library to the src folder of mujavaHome.
  2. Copy the class file in the corresponding java library to the classes folder of mujavaHome to mutate.
    The command line reports the following error:
    image
    image
    I didn't find a solution in the FAQ, how can I solve this situation?
    Regards.

@winonecheng
Copy link

According the answer of question 1 in FAQ, it is usually due to corrupted result data in the result folder. You should delete everything in the result folder and try again.

Is your GUI showing after typing the command?

@Provence613
Copy link
Author

According the answer of question 1 in FAQ, it is usually due to corrupted result data in the result folder. You should delete everything in the result folder and try again.

Is your GUI showing after typing the command?

My gui is displayed. I have tried to delete the result folder and run it multiple times, it is still the original error

@winonecheng
Copy link

There is instruction in FAQ.
If the GUI shows without problems after typing the command, NoClassDefFoundError is usually because muJava can’t find the class. This is probably because either the classpath is set incorrectly (not pointing to the correct files or folders), or the compiled .class file is not in the class folder.

What is ur CLASSPATH setting?
And, did u place compiled file in class folder?

@Provence613
Copy link
Author

But I put all the class files compiled in “idea” into the classes folder

@winonecheng
Copy link

winonecheng commented Apr 30, 2020

Could you share your code or Mujava directory structure?
Its hard to help you without them.

@Provence613
Copy link
Author

Could you share your code or Mujava directory structure?
Its hard to help you without them.

Yes,I can.

image

image

image

Mujava directory structure:
image

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants