Java identifier rules problem in library module names

2,454 views
Skip to first unread message

rdbre...@gmail.com

unread,
Jul 30, 2018, 8:54:32 PM7/30/18
to beadsproject
I tried to follow Evan's tutorial and immediately ran into a problem. 

It seems that there might have been a change in naming rules in Java.

I first ran into a problem when I tried to run the "Hello world" script.  It worked fine when I ran it without the Beads libraries but it failed when I put them into the environment list.

The complaint was that one of the library module's name had a zero in it.   At Ollie's suggestion I deleted that dependency and tried again.  

Now  there is a complaint about '9'.

A Java Primer for Java Version 9 I found on line suggests that the naming rules for identifiers with embedded numbers are pretty complicated (and might have changed somewhere along the line??).

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\ClientApps\Beads\library\mp3spi1.9.4.jar
Caused by: java.lang.IllegalArgumentException: mp3spi1.9.4: Invalid module name: '9' is not a Java identifier



I am running Java 10 jdk-10.0.2 in the most recent version of Eclipse.  A quick perusal of the Java libraries turns up no numbers in names.  Only place there are numbers are in the main name of the distro which follow pretty much the same system as Beads library.  

My hunch is that someone who understands the internals a bit could fix the names to remove the numbers in identifiers dependencies pretty readily -- if that is the source of the issue..


Ollie Bown

unread,
Jul 30, 2018, 9:11:32 PM7/30/18
to beadsp...@googlegroups.com
Hi Robert,

where are you getting the Beads library from?

For a while now we’ve actually been wrapping all of the dependencies into a single jar, beads.jar. If you pull down and build the latest from the git repo that’s what you should end up with, just one jar. Fingers crossed. If you got Beads from a download link on the website that might be the old set up. To be honest we’ve never perfectly cleaned everything up. My bad, but y'know, you get what you pay for :-)

My quick search for this error suggests that it is maybe more to do with the build tool rather than, say, the JRE. Can you clarify where exactly this error gets reported and what you’re doing exactly? And what Beads version you’re using and how you’re setting it up and building it in Eclipse. (What Hello World script?).

Ollie

--
You received this message because you are subscribed to the Google Groups "beadsproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beadsproject...@googlegroups.com.
To post to this group, send email to beadsp...@googlegroups.com.
Visit this group at https://groups.google.com/group/beadsproject.
For more options, visit https://groups.google.com/d/optout.

Robert Bremel

unread,
Jul 30, 2018, 9:35:20 PM7/30/18
to beadsp...@googlegroups.com
Hi Ollie,

Got the library from the link on the Beads website that I got to from Evan Merz’s blog.  Not from github.  

Sounds as though I should 
 download the version from github,  is that right?

The hello world script is from Merz’s tutorial.  He has several variants and I believe it is the most recent version.

Eclipse from the most current version @ Eclipse website.  I simply set the preferences including all library modules in one of the Exlipse interfaces (also per Merz guide).

I understand the physical principles but this is totally new territory to me that is why I have been using Merz’s  tutorial absent a “native guide”.

I am in Madison Wisconsin about 100 mi NW of Chicago  — I was Full Prof on the faculty here @ Univ of Wisconsin before starting a biotech venture.

Bob

Robert Bremel

unread,
Jul 30, 2018, 9:45:13 PM7/30/18
to beadsp...@googlegroups.com

Neil C Smith

unread,
Jul 31, 2018, 2:33:37 AM7/31/18
to beadsp...@googlegroups.com


On Tue, 31 Jul 2018, 01:54 , <rdbre...@gmail.com> wrote:.

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\ClientApps\Beads\library\mp3spi1.9.4.jar
Caused by: java.lang.IllegalArgumentException: mp3spi1.9.4: Invalid module name: '9' is not a Java identifier

I am running Java 10 jdk-10.0.2 in the most recent version of Eclipse.  A quick perusal of the Java libraries turns up no numbers in names.

There's a number in the name of the jar file. Try renaming it and updating the dependency link to it.

It's caused by this - although I'm wondering why it fails. 


Other option might be to set the compiler options to use Java 8 level?

Best wishes, 

Neil

Robert Bremel

unread,
Jul 31, 2018, 9:45:17 AM7/31/18
to beadsp...@googlegroups.com

Yeah,  a bit puzzling.  Without knowing internal dependencies changing names I’m afraid could simply lead me deeper into a rabbit hole.

 

Must be something caused by recent  changes in Java – this info is dated Dec 2017 and seems to be related to the issue you pointed out

 

https://dzone.com/articles/automatic-module-name-calling-all-java-library-maintainers

 

 

_B

 

 

From: 'Neil C Smith' via beadsproject <beadsp...@googlegroups.com>
Sent: Tuesday, July 31, 2018 1:34 AM
To: beadsp...@googlegroups.com
Subject: Re: [beadsproject] Java identifier rules problem in library module names

 

 

On Tue, 31 Jul 2018, 01:54 , <rdbre...@gmail.com> wrote:.

--

Reply all
Reply to author
Forward
0 new messages