JEP 293: Guidelines for JDK Command-Line Tool Options - @-files

Robert Scholte rfscholte at apache.org
Fri Oct 28 19:15:13 UTC 2016


On Fri, 28 Oct 2016 07:05:06 +0200, Henry Jen <henry.jen at oracle.com> wrote:

> OS-specific encoding, but has to be ASCII friendly, modern system with  
> UTF-8 as system encoding should work just fine.

Hmm, this will probably work for 99%, but I'm sure that we will have Maven  
users which use special characters on their system and they will hit this  
problem and put it on our mailinglist. I would really like a complete  
answer which, for instance, makes it possible to refer to any file on the  
system. Even if the answer is: use  ISO 8859-1 and unicode escaping I  
would be happy.

btw, it seems like my modern Windows 10 still uses Cp1252

>
> Space in quote should work just fine, for example, “c:\\Program Files”  
> should be correct. Can you post messages from JLink? Also if you can  
> verify java is working OK with space, that would be helpful to tell if  
> there is something different in JLink.

I got this message:
Error: Module velocity not found, required by simple.command

Just to be sure it is not my system I cleared my local repository.

Now I'm getting new messages, often one of these:
Error: module-info.class not found for hibernate.jpa module
or
Error: module-info.class not found for spring.context module
or
Error: module-info.class not found for spring.orm module

So let's forget about the space, might be a corrupted file in my  
repository, can't explain the exception though.

Now I'm blocked by these errors. Yes, it is true that these modules don't  
have a module-info.class, but that shouldn't be a problem, right?  
Compiling the project with my module-info files went fine...

thanks,
Robert

>
> Cheers,
> Henry
>
> On October 27, 2016 at 2:27:44 PM, Robert Scholte (rfscholte at apache.org)  
> wrote:
>> Hi,
>>
>> I'm facing some troubles with the content of the @-files and the
>> documentation[1] isn't helping me yet.
>>
>> First of all it doesn't mention the encoding, I assume it is the OS
>> specific encoding.
>>
>> I'm facing issues with a long --module-path on Windows.
>> I noticed I can use the "normal" filename (not a URI or URL), but I need
>> to escape the \ with an \, resulting in
>> "E:\\java-workspace\\sandbox\\mvnexbook-examples-1.0\\ch-multi-spring\\simple-parent\\simple-command\\target\\classes;E:\\java-workspace\\sandbox\\mvnexbook-examples-1.0\\ch-multi-spring\\simple-parent\\simple-weather\\target\\simple-weather-0.8-SNAPSHOT.jar;"
>> (and much more entries)
>>
>> You can use a space or a newline as separator between arguments, but if  
>> an
>> argument contains spaces it must be surrounded with double quotes.
>> However, the path to my local (Maven) repository contains a space and
>> JLink is complaining it cannot find these dependencies. It seems like I
>> need to escape spaces too, though I haven't figured out how to do that.
>> Changing my local repo to a space-less path works. There should be a way
>> to handle spaces, but how?
>>
>> I'm not sure if there are other specific things to keep in mind when
>> writing @-files, but it would be nice if that would be explained it the
>> jep too.
>>
>> thanks,
>> Robert
>>
>> [1] http://openjdk.java.net/jeps/293
>>


More information about the core-libs-dev mailing list