Hello, sorry I first wrote my question in the wrong list.
Now my last issue is that the jar builded by the deb package crashes when reaching this line:
setIconImage(Toolkit.getDefaultToolkit().getImage(JobPlay.class.getResource("/pixmaps/spview.png")));
So I understand he does not recognise my resources directory as a source one.
My source tree is like that:
test
sources
resources
I tried to write my d/rules file like that:
jh_build --javacopts="-source 1.8 -target 1.8" --javadoc-opts="-source 1.8" spview.jar sources resources
with no succes.
Indeed, with eclipse I have the .classpath file which is:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="sources"/>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
De: "Emmanuel Bourg" <ebourg@apache.org>
À: "debian-java" <debian-java@lists.debian.org>
Cc: "Cyril Richard" <Cyril.Richard@u-bourgogne.fr>
Envoyé: Samedi 28 Septembre 2019 09:31:37
Objet: Re: no main manifest attribute,
Le 28/09/2019 à 09:02, Cyril Richard a écrit :
> So, my clue is that I have a problem in my d/rules .
> Can you please help me?
Hi Cyril,
There are two ways to run a Java class inside a jar :
1. Invoke java by specific the main class explicitly:
java -cp application.jar:dependency.jar org.foo.Application
2. Rely on the MANIFEST.MF file inside the jar defines the main class
and the classpath, in this case you simply invoke :
java -jar application.jar
So in your case, either you add the manifest with the expected
Main-Class attribute [1], either you use the first form to start the
application.
Emmanuel Bourg
[1] https://docs.oracle.com/javase/tutorial/deployment/jar/appman.html