if i run the command jar --create --release 9 -C com.java.mrjar.nine\build\classes .
I have the error
entry: META-INF/versions/9/com/java/mrjar/nine/Main.class, contains a new public class not found in base entries
entry: META-INF/versions/9/com/java/mrjar/nine/TimeUt.class, contains a new public class not found in base entries
invalid multi-release jar file mrjars\com.java.mrjar.jar deleted
These are the Main and TimeUt classes:
package com.java.mrjar.nine;
import java.time.Instant;
public class Main {
public static void main(String[] args) {
System.out.println("Inside jdk9 Main.main()...");
TimeUt t = new TimeUt();
System.out.println("Local Date: "+t.getLocalDate(Instant.now()));
}
}
package com.java.mrjar.nine;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
public class TimeUt {
public TimeUt() {
System.out.println("creating jdk9 version of TimeUt");
}
public LocalDate getLocalDate(Instant now){
return LocalDate.ofInstant(now, ZoneId.systemDefault());
}
}
I can create the jar normally without addidng the --release 9 but it's a normal jar, it doesn't have versions>9 data.