Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63834 - ebuild for sun-j2me (new package)
Summary: ebuild for sun-j2me (new package)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Java team
URL: http://java.sun.com/products/j2mewtoo...
Whiteboard:
Keywords: EBUILD
: 73378 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-12 14:42 UTC by Boris
Modified: 2010-07-27 19:22 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sun-j2me-1.0.4.01.ebuild (sun-j2me-1.0.4.01.ebuild,1.51 KB, text/plain)
2004-09-12 14:42 UTC, Boris
Details
sun-bcla-j2me (License File) (sun-bcla-j2me,9.23 KB, text/plain)
2004-09-12 14:43 UTC, Boris
Details
sun-j2me-2.2.ebuild (sun-j2me-2.2.ebuild,1.46 KB, text/plain)
2004-12-05 09:05 UTC, Boris
Details
sun-j2me-2.2.ebuild.patch (sun-j2me-2.2.ebuild.patch,1.35 KB, patch)
2004-12-05 09:07 UTC, Boris
Details | Diff
sun-j2me-2.2.ebuild (sun-j2me-2.2.ebuild,1.46 KB, text/plain)
2005-08-08 10:57 UTC, Ortwin Glueck
Details
digest-sun-j2me-2.2 (digest-sun-j2me-2.2,87 bytes, text/plain)
2005-08-08 10:57 UTC, Ortwin Glueck
Details
Manifest (Manifest,128 bytes, text/plain)
2005-08-08 10:58 UTC, Ortwin Glueck
Details
sun-j2me-2.2.ebuild (sun-j2me-2.2.ebuild,1.75 KB, text/plain)
2005-08-08 14:59 UTC, Ortwin Glueck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris 2004-09-12 14:42:14 UTC
I made an ebuild for the J2ME Wireless Toolkit from sun. I will also upload the license for this.

Please note: I used dev-java/sun-jdk-1.3 instead of virtual/jdk-1.3 because I had problems testing it with the blackdown-jdk.

----
The Java 2 Platform, Micro Edition (J2ME) Wireless Toolkit is a state-of-the-art toolbox for developing wireless applications that are based on J2ME's Connected Limited Device Configuration (CLDC) and Mobile Information Device Profile (MIDP), and designed to run on cell phones, mainstream personal digital assistants, and other small mobile devices. The toolkit includes the emulation environments, performance optimization and tuning features, documentation, and examples that developers need to bring efficient and successful wireless applications to market quickly.
----


Reproducible: Always
Steps to Reproduce:
Comment 1 Boris 2004-09-12 14:42:44 UTC
Created attachment 39465 [details]
sun-j2me-1.0.4.01.ebuild
Comment 2 Boris 2004-09-12 14:43:11 UTC
Created attachment 39466 [details]
sun-bcla-j2me (License File)
Comment 3 Maciej Zieba 2004-12-04 13:45:17 UTC
The ebuild works fine for me :)

I just wish there was an ebuild for the latest version - 2.2
Comment 4 Boris 2004-12-05 09:05:16 UTC
Created attachment 45328 [details]
sun-j2me-2.2.ebuild

>I just wish there was an ebuild for the latest version - 2.2

Oh, I did not notice that it came out :)
Here is the new Version and a diff to the old one.
Comment 5 Boris 2004-12-05 09:07:18 UTC
Created attachment 45329 [details, diff]
sun-j2me-2.2.ebuild.patch
Comment 6 Maciej Zieba 2004-12-19 04:29:01 UTC
Thanks!! :)
Comment 7 Chris Aniszczyk (RETIRED) gentoo-dev 2004-12-19 10:58:35 UTC
*** Bug 73378 has been marked as a duplicate of this bug. ***
Comment 8 Maciej Zieba 2005-02-22 08:22:57 UTC
Hi :)

Unfortunatelly there is something wrong, I don't know if it's because of the e-build or because the installer itself... When I've installed the e-build and as non-root user tried running some programs on emulator I got a warning message like this:

"Warning: Failed to initialize WMA message routing support"

and there also was something about Bluetooth. The emulator would come up but I couldn't do a thing and soon it'd crash.

When I used root account there waren't any problems, no warnings whatsoever. It seemed like a problem with file rights. After some searching I've found this site:
http://rzr.online.fr/docs/java/linux.htm

In the troubleshooting section, more specifically "SDK modes", there's a suggestion to use:

chmod -R a+rwX /opt/sun-j2me-2.2
chmod -R a+rwX /opt/sun-j2me-2.2/appdb

And it helped - I can run the emulator and no warnings appear.

Is this really the right thing to do or just a hack?? Giving every user and group all rights makes me feel unsafe... ;)

One more thing. Is it possible for the ebuild to make it to the portage? It would really be great :)

Regards,
Crocodil
Comment 9 Boris 2005-05-01 08:50:27 UTC
Update:

> Please note: I used dev-java/sun-jdk-1.3 instead
> of virtual/jdk-1.3 because I had problems testing
> it with the blackdown-jdk.

The j2me works fine with dev-java/blackdown-jdk-1.4.2.01-r2.
Comment 10 Ortwin Glueck 2005-08-08 10:57:06 UTC
Created attachment 65460 [details]
sun-j2me-2.2.ebuild

Fixed download page.
Comment 11 Ortwin Glueck 2005-08-08 10:57:56 UTC
Created attachment 65461 [details]
digest-sun-j2me-2.2

Added digest file
Comment 12 Ortwin Glueck 2005-08-08 10:58:56 UTC
Created attachment 65462 [details]
Manifest

added Manifest
Comment 13 Ortwin Glueck 2005-08-08 11:00:49 UTC
The ebuild works now. Please include in portage very soon.
Comment 14 Petteri Räty (RETIRED) gentoo-dev 2005-08-08 12:37:36 UTC
You don't need to attach the digest and Manifest files to bugs. Users/devs can
generate them with ebuild digest. I have a couple of comments about your ebuild:

( jar xf install.zip >/dev/null && rm install.zip ) || die

( foobar ) means that the command is executed in a subshell, which is probably
not what you want here. 

I also think that we should install a symlink to ktoolbar to /opt/bin so that it
is in $PATH. 

DEPEND=">=dev-java/sun-jdk-1.4.2"

Why the jdk? We don't need a jdk to install this thing. You can use unzip
instead of jar to unzip the files. 

Your src_install does not work:
chmod: cannot access
`/var/tmp/portage/sun-j2me-bin-2.2/image//opt/sun-j2me-bin-2.2/bin/*.jar': No
such file or directory

I recommend installing everything first with doins instead of installing the
bins with doexe and then other stuff with cp -r. After installing you can make
the files which need to be executable, executable using fperms.

And the final issue:
There are packed jars included in the jars installed: for example the
activation.jar and mail.jar. These should come from the packages which provide
these. See http://gentoo-wiki.com/Gentoo_Java_Policy

The purpose of this list was not to make you feel bad but to help you make
better ebuilds in the future should you choose to do so. After these issues are
solved and I can't find anything else wrong I can commit this to the official
tree. Thanks for the work so far and keep it up. If you have any questions I can
be reached by email or at #gentoo-java@freenode.
Comment 15 Ortwin Glueck 2005-08-08 14:59:12 UTC
Created attachment 65477 [details]
sun-j2me-2.2.ebuild

Thanks for the feedback. So many rules :-) I tried and incorporated as much as
possible. I also added two use flags. 

PS: I am just trying to fix this ebuild. I did not write the original version.
PPS: Please change the subject to reflect the correct version of the ebuild.
Comment 16 Petteri Räty (RETIRED) gentoo-dev 2005-08-08 22:29:05 UTC
(In reply to comment #15)

> Thanks for the feedback. So many rules :-) I tried and incorporated as much as
> possible. I also added two use flags. 

Java ebuild java have a lot of things that you just have to know. So in the
beginning writing them is a long a process of trial and error with a lot of
questions.

> PS: I am just trying to fix this ebuild. I did not write the original version.

Sorry about that, but the feedback applies as much to all the writers. 

> PPS: Please change the subject to reflect the correct version of the ebuild.

done

Comment 17 Petteri Räty (RETIRED) gentoo-dev 2005-11-05 04:19:48 UTC
http://gentooexperimental.org/svn/java/gentoo-java-experimental/dev-java/sun-j2me-bin/
Added this to the experimental tree. At least two things need to be fixed before
this can go official:
1. jars should be installed using java-pkg_dojar
2. it should not install the packed jars
3. Some of the included jars should probably be packaged separately
   for example the lib/jsrXXX.jar files 
Comment 18 Craig Andrews gentoo-dev 2006-04-14 19:16:12 UTC
Any updates on this? It's been idle for a *long* time
Comment 19 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-07-09 04:44:27 UTC
In portage.
Comment 20 LuVar 2010-07-27 19:22:41 UTC
env variable WTK_HOME is not set after installation. I dont know, if it is "bug" or not, but it could be nice, if ebuild sets WTK_HOME variable to "/opt/sun-j2me-bin-2.5.2.01/" after installation.

It will make my maven project work out of box. pom.xml contains "<systemPath>${env.WTK_HOME}/lib/jsr179.jar</systemPath>" and some similar things...