Skip to main content

Did Sun opesource JavaCheck

12 replies [Last post]
mores
Offline
Joined: 2005-01-21

Does anyone know if Sun did/can opensource JavaCheck ?

http://java.sun.com/products/personaljava/javacheck.html

This is out of date and needs to be brought up to todays specs.

I am looking for something I can run my code through and it will tell me which JSR it complies to.

Or does anyone know of a similar project ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
>> Would you be willing to volunteer to work on an open
>> source project to
>> create that type of tool and contribute it back to
>> the community?
>
> It seems everyday I spread myself thinner and thinner but this is something I am willing to work on. I was hoping to use JavaCheck as reference implementation because right now I am not really sure how to code it:
> should this new jsrCheck examine the source code or the compiled class file ???

The old JavaCheck looked at compiled class files (similar to the
bytecode info that the "javap" tool accesses and analyzes) looking at
static dependencies and of course could not include dynamic dependencies
(such as classes loaded at runtime with Class.forName("ClassName")).

> are all the specs available in a readable/lookup format ???

Yes, the platform specification (.spc) files are readable XML files.

> Once I get a handle on how to do, then I will be able to work on it.

It's pretty straight-forward. You just need the XML format where you
define the allowable methods and classes that JavaCheck will check
against to your class files.

When your ready I can send you an example .spc file and explain that to
you and then if you fill in all the APIs for the platform your
interested in (like a JSR or the CDC/Personal Profile environment for
example), then you might be able to create an auto-generating script
that will create a correct .spc file that you can use with JavaCheck to
run against your Java class or JAR files. Then, JavaCheck will tell you
if you called any APIs out of spec.

Hinkmond

> [Message sent by forum member 'mores' (mores)]
>
> http://forums.java.net/jive/thread.jspa?messageID=202242
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

mores
Offline
Joined: 2005-01-21

> When your ready I can send you an example .spc file

It seems you can't find the spc files online. Yes I would love to see a sample spc file.

If I understand you correctly, we can continue to use javaCheck, we just need to create all the individual spec files and publish them online somewhere:

jsr-30.spc
jsr-37.spc
jsr-118.spc
jsr-139.spc
jsr-216.spc
jsr-217.spc
jsr-218.spc
jsr-219.spc
...
...

At a later date, we could rewrite javaCheck but still use the spc file format.

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
>> When your ready I can send you an example .spc file
>
> It seems you can't find the spc files online. Yes I would love to see a sample spc file.
>
> If I understand you correctly, we can continue to use javaCheck, we just need to create all the individual spec files and publish them online somewhere:

Yes, that's correct. It's all XML-based, so if I can't send you the
exact Personal Java 1.1.1 .spc file because of licensing constraints,
I'll send you a template of what the XML tags should look like. I'll
have to check on a few issues around posting it publicly first.

> jsr-30.spc
> jsr-37.spc
> jsr-118.spc
> jsr-139.spc
> jsr-216.spc
> jsr-217.spc
> jsr-218.spc
> jsr-219.spc
> ...
> ...
>
> At a later date, we could rewrite javaCheck but still use the spc file format.

Yes, that's correct. But, as pointed out, this is not a foolproof way
to check that an app is cleanly using only specified APIs, since as
mentioned, JavaCheck only uses build-time static analysis of class
files, not dynamic run-time checking to see if reflection or other ways
to bypass static class loading is used (like
Class.forName("")).

So, as long as you can live with that, then JavaCheck with new .spc
files created specifically for JSRs and the new Java ME specs. will work.

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

mores
Offline
Joined: 2005-01-21

> phonemeadvanced@mobileandembedded.org wrote:
> JavaCheck only uses build-time static
> analysis of class
> files, not dynamic run-time checking to see if
> reflection or other ways
> to bypass static class loading is used (like
> Class.forName(" > ntime>")).
>
> So, as long as you can live with that, then JavaCheck
> with new .spc
> files created specifically for JSRs and the new Java
> ME specs. will work.

For now I can live with that.
I will wait for news about the format of the spec file.

-Steve More

hinkmond
Offline
Joined: 2003-12-01

Hi,

Steve More asked about the JavaCheck tool. I need to collect some data from the community on how useful it would be to other developers.

Please take 5 seconds to take this quick poll:

http://forums.java.net/jive/poll.jspa?pollID=1
(Log in using your java.net userid)

Thanks!

Hinkmond

mores
Offline
Joined: 2005-01-21

I am logged in, but every time I try to vote I get:

User Login

You need to be logged in to post to this forum. Login here.

stuart_marks
Offline
Joined: 2006-08-24

This happens to me sometimes too, with other parts of the website. I try to do something and it tells me that I need to be logged in; but after I login again it tells me the same thing.

I'm not sure why this happens but I think it has to do with the cookie the site writes to your browser to keep your login status. Clearing the java.net cookies from the browser usually clears up this problem for me. If this doesn't work you might try clearing the browser cache too.

s'marks

stuart_marks
Offline
Joined: 2006-08-24

Forget the bit about deleting cookies. There was a permissions problem that prevented anybody but the creator of the poll from voting! It's fixed now. Please try again.

Thanks.

s'marks

Gary Adams - Client Systems Group

Won't that change the poll results if everybody is allowed the vote :-)
Can I ask for a recount .....

phonemeadvanced@mobileandembedded.org wrote:
> Forget the bit about deleting cookies. There was a permissions problem that prevented anybody but the creator of the poll from voting! It's fixed now. Please try again.
>
> Thanks.
>
> s'marks
> [Message sent by forum member 'stuart_marks' (stuart_marks)]
>
> http://forums.java.net/jive/thread.jspa?messageID=203935
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

Hinkmond Wong

Hi mores,

JavaCheck has been stagnant since Personal Profile replaced PersonalJava.

There are no current plans for a tool like JavaCheck was, that you can
run on an app and tell you which Java ME profile or JSR it complies to.

Would you be willing to volunteer to work on an open source project to
create that type of tool and contribute it back to the community?

Anyone else also interested in a tool like this?

Thanks,

Hinkmond

phonemeadvanced@mobileandembedded.org wrote:
> Does anyone know if Sun did/can opensource JavaCheck ?
>
> http://java.sun.com/products/personaljava/javacheck.html
>
> This is out of date and needs to be brought up to todays specs.
>
> I am looking for something I can run my code through and it will tell me which JSR it complies to.
>
> Or does anyone know of a similar project ?
> [Message sent by forum member 'mores' (mores)]
>
> http://forums.java.net/jive/thread.jspa?messageID=201469
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

mores
Offline
Joined: 2005-01-21

> Would you be willing to volunteer to work on an open
> source project to
> create that type of tool and contribute it back to
> the community?

It seems everyday I spread myself thinner and thinner but this is something I am willing to work on. I was hoping to use JavaCheck as reference implementation because right now I am not really sure how to code it:
should this new jsrCheck examine the source code or the compiled class file ???
are all the specs available in a readable/lookup format ???

Once I get a handle on how to do it, then I will be able to work on it.

Message was edited by: mores

Gary Adams - Client Systems Group

A good starting place might be looking at the JSR248 MSA
updates to require System properties identifying version numbers
of the various JSR components. That would provide the list of
what the platform supports. From the platform component list
you could get a list of packages similar to the TCK signature
tests for the collection of components.

I don't remember the exact approach that JavaCheck used, but
a static analysis of the application jar file should be able to
identify the external dependencies.

phonemeadvanced@mobileandembedded.org wrote:
>> Would you be willing to volunteer to work on an open
>> source project to
>> create that type of tool and contribute it back to
>> the community?
>
> It seems everyday I spread myself thinner and thinner but this is something I am willing to work on. I was hoping to use JavaCheck as reference implementation because right now I am not really sure how to code it:
> should this new jsrCheck examine the source code or the compiled class file ???
> are all the specs available in a readable/lookup format ???
>
> Once I get a handle on how to do, then I will be able to work on it.
> [Message sent by forum member 'mores' (mores)]
>
> http://forums.java.net/jive/thread.jspa?messageID=202242
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net