Skip to main content

Jpp, mjpp, ifndef preprocessing in java files

2 replies [Last post]
eric_arseneau
Offline
Joined: 2004-07-15
Points: 0

There are some preprocessor commands located in various source files, such as

throw new ConnectionNotFoundException(
/* #ifdef VERBOSE_EXCEPTIONS */
/// skipped "The requested protocol does not exist "+name
/* #endif */
);

I would very much like to be able to pre-process this source to get the exception text for my own VM, but I cannot seem to find what I need. I found Jpp, which does something with token such as these, but only works on files with the .jpp extension. Then I found mjpp/Main which will strip these out.

There is a reference to
/**
* Java preprocessor --
* Preprocess java source files to reduce footprint.
*
* See $(JVMWorkSpace)/internal_doc/BuildSystem.html for more
* information.
*/
Where can I get access to this documenation ? I dont see a BuildSystem.html file in the source tree.

How do I pre-process these files in order to get the nice exception text ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
danila
Offline
Joined: 2006-09-25
Points: 0

Hi eric!
this seems to be a dangling link to the doc.

mjpp does the reverse job:
it finds paired lines /* #if ... */ - /* #endif */ and comments out lines between them.
The example of source code with commented exception message was produced by this tool. In its current state it cannot uncomment messages back.

I suspect the easiest solution would be to write your own script
that uncomments the messages.
My assumption, all lines to be uncommented start with "/// skipped ".
Try to remove this prefix from all lines that match. Hopefully that will do the job

eric_arseneau
Offline
Joined: 2004-07-15
Points: 0

I am hopping that I can work with the owners of this code to see if we can't keep to the same Jpp process as being used in other parts :)