Discussion:
java on openbsd
Marc Ravensbergen
2006-11-14 13:07:50 UTC
Permalink
Hi, first I'd like to mention that openbsd 4.0 is a first for me, and I
am really liking it so far (I am a linux refugee...). Eg., it's nice to
be able to rip out my usb cd burner, plug it in, and be able to actually
use the thing again. Try that under linux and the cd burner is unsuable
until you reboot... Not to mention that the whole "secure by default"
thing is very appealing.

I am having a hard time getting java to work on openbsd. Java is a
deal-breaker for me as I use it all day every day for work. What I've
done is taken a tar of the linux version, and untarred it in openbsd. I
have turned on linux emulation by modifying the variable in
/etc/sysctl.conf, and I've mounted the /proc "filesystem". I have also
pkg_added redhat-base8.xxx.

However, whenever I run java, I get a "Can't detect initial thread stack
location - find_vma failed" error. This is for sun's jdk 1.5.06 as well
as one of the newer 1.6 versions. IBM's jdk1.4 says it cannot read or
write (not sure exactly anymore) to /proc/xxxx. I've tried running all
three versions as root to check for permission errors, but it makes no
difference. I've googled for hours trying to find a solution, but can't
seem to fix it.

I really don't want to download the source for java and compile... I am
on dialup so every byte counts. A little while ago I tried java on
netbsd and got it working through linux emulation as well. I had
problems with netbsd so it didn't stick around, but I believe that java
on bsd through emulation should be possible; probably just an oversight
somwhere on my part.

If anybody can give me some tips or tricks I would really appreciate it.

Thanks for your time,
Marc
Jeff Quast
2006-11-14 15:32:36 UTC
Permalink
Post by Marc Ravensbergen
I am having a hard time getting java to work on openbsd.
I'll bet.
Post by Marc Ravensbergen
difference. I've googled for hours trying to find a solution, but can't
seem to fix it.
Lucky for you! My google works: http://www.google.com/search?q=openbsd+java
Post by Marc Ravensbergen
I really don't want to download the source for java and compile... I am
on dialup so every byte counts.
I am sorry for this, as this is a very involved process that requires
"I agree" several times through the build. I beleive it took me two
days work on a fast machine on broadband. Only because of Sun's web
pages (which are very hard to navigate using lynx, of course).
Post by Marc Ravensbergen
netbsd and got it working through linux emulation as well. I had
problems with netbsd so it didn't stick around, but I believe that java
on bsd through emulation should be possible; probably just an oversight
somwhere on my part.
If anybody can give me some tips or tricks I would really appreciate it.
I would, but I would just be (poorly) repeating information that
developers have painstakingly documented.
http://www.openbsd.org/faq/faq8.html#Programming
Post by Marc Ravensbergen
Thanks for your time,
Marc
If you're just asking for somebody to provide you with a complete
binary package of the completed build, then you are asking us to break
the law. Sun wants you to build it yourself, so that is what you will
have to do.

Sorry, but this just sounds like you are complaining. You should
really send your grievences to sun, not openbsd misc. OpenBSD can't
change Sun's licensing policies -- they can only abide by them. Maybe
all of this hoop jumping will make you realize that using this
language is a bad career move?

jdq
m***@shonetic.com
2006-11-14 16:24:37 UTC
Permalink
Post by Jeff Quast
Post by Marc Ravensbergen
I am having a hard time getting java to work on openbsd.
I'll bet.
Post by Marc Ravensbergen
difference. I've googled for hours trying to find a solution, but can't
seem to fix it.
Lucky for you! My google works: http://www.google.com/search?q=openbsd+java
thanks for that... my point was that reading the results that google
gives does not help my situation.
Post by Jeff Quast
Post by Marc Ravensbergen
I really don't want to download the source for java and compile... I am
on dialup so every byte counts.
I am sorry for this, as this is a very involved process that requires
"I agree" several times through the build. I beleive it took me two
days work on a fast machine on broadband. Only because of Sun's web
pages (which are very hard to navigate using lynx, of course).
Post by Marc Ravensbergen
netbsd and got it working through linux emulation as well. I had
problems with netbsd so it didn't stick around, but I believe that java
on bsd through emulation should be possible; probably just an oversight
somwhere on my part.
If anybody can give me some tips or tricks I would really appreciate it.
I would, but I would just be (poorly) repeating information that
developers have painstakingly documented.
http://www.openbsd.org/faq/faq8.html#Programming
I've read that info; the "preferred" way of installing java (on
openbsd) is by compiling from source. As I am a full time java
developer, I use and test several different jdks at once. You might be
able to understand why I am hesitant to compile and download all this
stuff when openbsd supports linux emulation, and I already have
downloaded all the linux jdks that I need.
Post by Jeff Quast
Post by Marc Ravensbergen
Thanks for your time,
Marc
If you're just asking for somebody to provide you with a complete
binary package of the completed build, then you are asking us to break
the law. Sun wants you to build it yourself, so that is what you will
have to do.
How do you jump to that conclusion from my email? No, never asked for that.
Post by Jeff Quast
Sorry, but this just sounds like you are complaining.
What I was doing was asking for tips on getting linux emulation (more
particularly, linux jdk binaries) working under openbsd.
Post by Jeff Quast
You should really send your grievences to sun, not openbsd misc.
OpenBSD can't
change Sun's licensing policies -- they can only abide by them. Maybe
all of this hoop jumping will make you realize that using this
language is a bad career move?
that is laughable, especially considering sun's anouncement yesterday
to GPL the entire java stack. Not trying to start a flame war here,
but open solaris, nexenta (solaris kernel, debian apps), and a million
linux distros all support Java really well. I am trying a java /
openbsd combination because I've heard good things about openbsd, and
from what I've seen so far I am very happy with it. I understand fully
why openbsd has issues with Java. I am not blaming them / you at all.

All I asked for was some advice getting this working. If you're going
to bash me over the head for that, perhaps you'd consider not replying
at all... save both your time and mine.

Marc
Jack J. Woehr
2006-11-14 17:57:41 UTC
Permalink
Post by m***@shonetic.com
All I asked for was some advice getting this working. If you're
going to bash me over the head for that, perhaps you'd consider not
replying at all... save both your time and mine.
Did you get it working? I have Java working on OpenBSD.

Also, there's another list where people care that you do get it running:
openbsd-***@codemonkey.net

***@openbsd.org is a little bit like that old Monty Python routine:
"Oh, I'm sorry, this is Arguments. Abuse is down the hall."

:-)

Jack
--
Jack J. Woehr
Director of Development
Absolute Performance, Inc.
***@absolute-performance.com
303-443-7000 ext. 527
Jared Solomon
2006-11-14 20:33:21 UTC
Permalink
Heh, java lets me work on OpenBSD. Oh, wait... that's just plain
coffee, and not even Javanese coffee. Costa Rican.

God, I'm a troll today.
Post by Jack J. Woehr
Did you get it working? I have Java working on OpenBSD.
--
Try to do nothing for money that you wouldn't do for free. --Paul Krassner
Joachim Schipper
2006-11-15 15:12:20 UTC
Permalink
Post by m***@shonetic.com
Post by Jeff Quast
Post by Marc Ravensbergen
I really don't want to download the source for java and compile... I am
on dialup so every byte counts.
I believe that java on bsd through emulation should be possible;
probably just an oversight somwhere on my part.
If anybody can give me some tips or tricks I would really appreciate it.
I would, but I would just be (poorly) repeating information that
developers have painstakingly documented.
http://www.openbsd.org/faq/faq8.html#Programming
I've read that info; the "preferred" way of installing java (on
openbsd) is by compiling from source. As I am a full time java
developer, I use and test several different jdks at once. You might be
able to understand why I am hesitant to compile and download all this
stuff when openbsd supports linux emulation, and I already have
downloaded all the linux jdks that I need.
If you're getting paid to develop on this, a little phone bill shouldn't
be that problematic, and you've already wasted as much time here as it
would have taken to download it in the first place.

If you're so set on using Linux JDKs, use Linux. That's what they are
for. If you really want, use Linux under some emulator (qemu is in
ports).

The fact that NetBSD apparently does manage to run your JDKs doesn't
necessarily mean it manages to run them reliably, either.
Post by m***@shonetic.com
Post by Jeff Quast
You should really send your grievences to sun, not openbsd misc.
OpenBSD can't change Sun's licensing policies -- they can only abide
by them. Maybe all of this hoop jumping will make you realize that
using this language is a bad career move?
that is laughable, especially considering sun's anouncement yesterday
to GPL the entire java stack. Not trying to start a flame war here,
but open solaris, nexenta (solaris kernel, debian apps), and a million
linux distros all support Java really well. I am trying a java /
openbsd combination because I've heard good things about openbsd, and
from what I've seen so far I am very happy with it. I understand fully
why openbsd has issues with Java. I am not blaming them / you at all.
OpenBSD supports Java really well. Its Linux emulation is not perfect,
granted, but that's a wholly different issue.

Joachim
knitti
2006-11-14 15:33:05 UTC
Permalink
Post by Marc Ravensbergen
I am having a hard time getting java to work on openbsd. Java is a
deal-breaker for me as I use it all day every day for work. What I've
done is taken a tar of the linux version, and untarred it in openbsd. I
have turned on linux emulation by modifying the variable in
/etc/sysctl.conf, and I've mounted the /proc "filesystem". I have also
pkg_added redhat-base8.xxx.
However, whenever I run java, I get a "Can't detect initial thread stack
location - find_vma failed" error. This is for sun's jdk 1.5.06 as well
as one of the newer 1.6 versions. IBM's jdk1.4 says it cannot read or
write (not sure exactly anymore) to /proc/xxxx. I've tried running all
three versions as root to check for permission errors, but it makes no
difference. I've googled for hours trying to find a solution, but can't
seem to fix it.
I really don't want to download the source for java and compile... I am
on dialup so every byte counts. A little while ago I tried java on
netbsd and got it working through linux emulation as well. I had
problems with netbsd so it didn't stick around, but I believe that java
on bsd through emulation should be possible; probably just an oversight
somwhere on my part.
I didn't try any linux 1.5/1.6 jdk, but perhaps you missed something
for your linux emulation? read man compat_linux, perhaps it helps.

the other options you have is having someone mail you the source on
cd, or use kaffe (don't know how useful it is for your purposes).

--knitti
m***@shonetic.com
2006-11-14 16:27:00 UTC
Permalink
Post by knitti
Post by Marc Ravensbergen
I am having a hard time getting java to work on openbsd. Java is a
deal-breaker for me as I use it all day every day for work. What I've
done is taken a tar of the linux version, and untarred it in openbsd. I
have turned on linux emulation by modifying the variable in
/etc/sysctl.conf, and I've mounted the /proc "filesystem". I have also
pkg_added redhat-base8.xxx.
However, whenever I run java, I get a "Can't detect initial thread stack
location - find_vma failed" error. This is for sun's jdk 1.5.06 as well
as one of the newer 1.6 versions. IBM's jdk1.4 says it cannot read or
write (not sure exactly anymore) to /proc/xxxx. I've tried running all
three versions as root to check for permission errors, but it makes no
difference. I've googled for hours trying to find a solution, but can't
seem to fix it.
I really don't want to download the source for java and compile... I am
on dialup so every byte counts. A little while ago I tried java on
netbsd and got it working through linux emulation as well. I had
problems with netbsd so it didn't stick around, but I believe that java
on bsd through emulation should be possible; probably just an oversight
somwhere on my part.
I didn't try any linux 1.5/1.6 jdk, but perhaps you missed something
for your linux emulation? read man compat_linux, perhaps it helps.
the other options you have is having someone mail you the source on
cd, or use kaffe (don't know how useful it is for your purposes).
--knitti
Thanks for your response. Kaffe won't work for me as it is missing a
few feature s that I need (most notable swing support is not up to
snuff yet).

Marc
Matthew Weigel
2006-11-14 16:59:39 UTC
Permalink
Thanks for your response. Kaffe won't work for me as it is missing a few
feature s that I need (most notable swing support is not up to snuff yet).
For now, then, unfortunately you'll have to follow the normal
port-building instructions, which are lame to say the least.

When Sun makes good on its promise to GPL the whole thing, it should
become much easier.
--
Matthew Weigel
hacker
***@idempot.net
Matt Kolb
2006-11-14 18:41:17 UTC
Permalink
Post by Matthew Weigel
Thanks for your response. Kaffe won't work for me as it is missing a few
feature s that I need (most notable swing support is not up to snuff yet).
For now, then, unfortunately you'll have to follow the normal
port-building instructions, which are lame to say the least.
When Sun makes good on its promise to GPL the whole thing, it should
become much easier.
They already have:

http://www.infoq.com/news/2006/11/open-source-java

./matt
Tobias Weisserth
2006-11-14 17:16:15 UTC
Permalink
Hi Marc,

On Nov 14, 2006, at 5:27 PM, ***@shonetic.com wrote:
...
Post by m***@shonetic.com
Post by knitti
I didn't try any linux 1.5/1.6 jdk, but perhaps you missed something
for your linux emulation? read man compat_linux, perhaps it helps.
the other options you have is having someone mail you the source on
cd, or use kaffe (don't know how useful it is for your purposes).
--knitti
Thanks for your response. Kaffe won't work for me as it is missing
a few feature s that I need (most notable swing support is not up
to snuff yet).
This is probably not what the poster meant. You really need to read
the FAQ:

http://www.openbsd.org/faq/faq8.html#Programming

What your are looking for is "Building the Sun JDK".

"The JDK requires a working Java 2 compiler as a bootstrap to build.
For this purpose, since OpenBSD 4.0, the port of JDK 1.5 uses kaffe,
which allows JDK 1.5 to be used on both i386 and amd64 platforms, and
reduces the build time considerably."

You only need kaffe to build SUN's JDK.

It's all in the FAQ (and probably in the archives).

@others: stop picking on SUN and Java. It's actually a nice language
and going to be GPL software very soon, so I guess there will be an
option for binary packages and other nice stuff soon.

regards,
Tobias
Marco Peereboom
2006-11-14 17:41:35 UTC
Permalink
Post by Tobias Weisserth
@others: stop picking on SUN and Java. It's actually a nice language
and going to be GPL software very soon, so I guess there will be an
option for binary packages and other nice stuff soon.
Java is a shitshow, it isn't a "nice" language. Stop defending Sun and their
ridiculous licenses. The day Sun shows up as a real player in the open source
world this could be justified. For now they are just another closed vendor.

You don't get a cookie for trying or pretending.
Jack J. Woehr
2006-11-14 18:23:20 UTC
Permalink
Post by Marco Peereboom
Java is a shitshow, it isn't a "nice" language.
Hurling obscenities at Java, a mediocre language per se which happens
to offer
a wonderful team development environment with a breathtaking array of
tools,
doesn't generate any code to make OpenBSD a better operating system.
--
Jack J. Woehr
Director of Development
Absolute Performance, Inc.
***@absolute-performance.com
303-443-7000 ext. 527
Craig Skinner
2006-11-15 01:37:08 UTC
Permalink
Post by Marco Peereboom
Post by Tobias Weisserth
@others: stop picking on SUN and Java. It's actually a nice language
and going to be GPL software very soon, so I guess there will be an
option for binary packages and other nice stuff soon.
Java is a shitshow
No language is perfect.
Post by Marco Peereboom
Sun and their ridiculous licenses.
The day Sun shows up as a real player in the open source
world this could be justified. For now they are just another closed vendor.
You don't get a cookie for trying or pretending.
Agree, but they do seem to be genuinely trying, so give them a while to
get over their growing pains and see what comes out in the wash over the
next few years.
Nick Guenther
2006-11-14 15:42:39 UTC
Permalink
Post by Marc Ravensbergen
Hi, first I'd like to mention that openbsd 4.0 is a first for me, and I
am really liking it so far (I am a linux refugee...).
I am having a hard time getting java to work on openbsd.
Thanks for your time,
Marc
Java's unsupported more or less. See the FAQ:
http://openbsd.org/faq/faq8.html#Programming
"Due to Sun's restrictive SCSL license, OpenBSD cannot ship binary
packages for the JDK. This means you will have to build it from ports.
Note that you will need plenty of RAM for this build to succeed."
Sorry :(

I don't know why running it under linux emulation doesn't work;
perhaps you just have it set up incorrectly somewhere.

Is it possible to download it at a friend's?

-Nick
Bernd Schoeller
2006-11-14 17:07:33 UTC
Permalink
Post by Nick Guenther
http://openbsd.org/faq/faq8.html#Programming
"Due to Sun's restrictive SCSL license, OpenBSD cannot ship binary
packages for the JDK. This means you will have to build it from ports.
Note that you will need plenty of RAM for this build to succeed."
Sorry :(
I this information still current, now that Java has released the JDK under
the terms of the GPL?

https://openjdk.dev.java.net/

I really hope that there will be an improvement of the situation for
OpenBSD soon, including proper Java packages. But I am not a lawyer,
correct me if I am wrong.

Bernd
Matthew Weigel
2006-11-14 18:32:57 UTC
Permalink
Post by Bernd Schoeller
I this information still current, now that Java has released the JDK
under the terms of the GPL?
No, they haven't released the JDK under the GPL. They *will*.
Currently, they have released a virtual machine and javac under the GPL.

"The remainder of the open-source JDK will be available in the first
half of 2007."
--
Matthew Weigel
hacker
***@idempot.net
Craig Skinner
2006-11-15 01:14:48 UTC
Permalink
Post by Matthew Weigel
Post by Bernd Schoeller
I this information still current, now that Java has released the JDK
under the terms of the GPL?
No, they haven't released the JDK under the GPL. They *will*.
Currently, they have released a virtual machine and javac under the GPL.
"The remainder of the open-source JDK will be available in the first
half of 2007."
There is 6m lines of code to audit WRT the GPL, so give them a chance.

Sun are a small company compared to IBM, HP, MS, so to grow, they need
to be different, from how they have been in the past.

There is a new man at the top, who has pledged to open source all of
Sun's software and hardware, so maybe jason@ will be able to get the
Ultra 10 PCI gubbins working without guess work.
Henning Brauer
2006-11-14 18:52:37 UTC
Permalink
Post by Bernd Schoeller
I this information still current, now that Java has released the JDK under
the terms of the GPL?
they have _not_ released the JDK (-source) under the gpl.

they have released javac, hotpot and the help system under the gpl (at
lest, they say they have, i didn't check). there's a whole lot missing
to the full jdk.

now, they have promised to released the remaining parts under the gpl
as well. we'll see. they have promised a lot in the past, let's hope it
is more than just promises this time.
--
Henning Brauer, ***@bsws.de, ***@openbsd.org
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg & Amsterdam
Jacob Yocom-Piatt
2006-11-14 18:35:49 UTC
Permalink
---- Original message ----
Date: Tue, 14 Nov 2006 11:41:35 -0600
Subject: Re: java on openbsd
Post by Tobias Weisserth
@others: stop picking on SUN and Java. It's actually a nice language
and going to be GPL software very soon, so I guess there will be an
option for binary packages and other nice stuff soon.
Java is a shitshow, it isn't a "nice" language. Stop defending Sun and their
ridiculous licenses. The day Sun shows up as a real player in the open source
world this could be justified. For now they are just another closed vendor.
You don't get a cookie for trying or pretending.
marco,

don't you know you're not licensed to circulate compiled opinions about Sun
source code? you're supposed to let everyone else click through the stupid
menus, download source packages that are about as big as the openbsd install
sets, adjust their ulimits, spend a lot of time compiling something that should
be available as a package and THEN they can form a properly licensed opinion.

cheers,
jake
Tobias Weisserth
2006-11-14 21:12:31 UTC
Permalink
Hi list, hi Jacob,
Post by Jacob Yocom-Piatt
Post by Marco Peereboom
Java is a shitshow, it isn't a "nice" language. Stop defending Sun and
their ridiculous licenses. The day Sun shows up as a real player in the
open source world this could be justified. For now they are just another
closed vendor.
There's no other "just another closed source" vendor on this planet that has
freed so much closed source like SUN. Solaris is going to be Open Source in
the end, as will Java. This is official so stop fudding around.

If you think the CDDL or the GPL are ridiculous licenses this is simply your
problem. It works out fine for a majority of people, including me. Hey, if
you can't comply with the GPL for personal reasons you wouldn't even be able
to enjoy OpenBSD as it's still being built with a GNU toolchain.

And regarding the language: Java runs on millions if not billions of devices.
There's a reason for this and it's not just marketing. Anybody denying this
is just plain ignorant - or stupid.

Besides that, the language is easy to learn (and teach) and unlike most other
languages, there's tons of high quality development tools that are
user-friendly for non-UNIX-geeks and programming rookies.
Post by Jacob Yocom-Piatt
Post by Marco Peereboom
You don't get a cookie for trying or pretending.
Well, ignorance - or stupidity for that matter - won't earn you points
either ;-)
Post by Jacob Yocom-Piatt
don't you know you're not licensed to circulate compiled opinions about Sun
source code? you're supposed to let everyone else click through the stupid
menus, download source packages that are about as big as the openbsd
install sets, adjust their ulimits, spend a lot of time compiling something
that should be available as a package and THEN they can form a properly
licensed opinion.
Well Jake, that's luckily going to change soon, now that Java and its various
components are going to be GPL software. You'll be able to redistribute in
any form you like, given that you comply with the GPL terms and don't violate
the Java trademark that SUN will still control.

kind regards,
Tobias W.
Matthias Kilian
2006-11-14 22:27:36 UTC
Permalink
Post by Tobias Weisserth
And regarding the language: Java runs on millions if not billions of devices.
It does not run on arm/OpenBSD. It does not run on powerpc/OpenBSD.
It does not run on vax/OpenBSD. Heck, it even behaves differently
in on i386/Linux, i386/Windows, sparc/Solaris and pSeries/Linux,
and to this platform diversity the vendor diversity (Sun vs. IBM)
yet adds more subtile differences, especially if it comes to threads
or GC behaviour.

Believe it or not: Java is *not* platform independent, at least not
in so-called "enterprise" environments.

BTW: Windows runs on millions if not billions of desktop PCs, so
it must be better than OpenBSD. And: there are many so-called
open-source operating systems around that happily accept BLOBs, let
single persons write drivers based on documentation they'd to sign
NDAs, so those systems are probably better than OpenBSD. They just
*must* be superior to OpenBSD. But wait! They've serious problems
with their wireless drivers, isn't that funny?

Sorry, but for that "millions if not billions" argument, my honest
response is: "people, eat more shit -- millions of flies can't be
wrong."

Ciao,
Kili, making a life with Java since about 1998.
Jeremy Huiskamp
2006-11-15 02:24:28 UTC
Permalink
Post by Matthias Kilian
Post by Tobias Weisserth
And regarding the language: Java runs on millions if not billions of devices.
It does not run on arm/OpenBSD. It does not run on powerpc/OpenBSD.
It does not run on vax/OpenBSD. Heck, it even behaves differently
in on i386/Linux, i386/Windows, sparc/Solaris and pSeries/Linux,
and to this platform diversity the vendor diversity (Sun vs. IBM)
yet adds more subtile differences, especially if it comes to threads
or GC behaviour.
Then I suspect you're doing something very wrong or making
assumptions about specs that are just not guaranteed to be true.
I've worked in highly threaded apps that moved perfectly across
sun's, bea's and ibm's virtual machines with no modifications. Sure
there were large differences in performance, probably due to the
threading and gc, but everything still executed properly.
Post by Matthias Kilian
Believe it or not: Java is *not* platform independent, at least not
in so-called "enterprise" environments.
I've also worked on "enterprise" apps that were written, built and
tested on windows and then moved straight to AIX for deployment with
no history of glitches whatsoever. It was all on websphere and I
obviously wouldn't consider doing this while moving do a different
j2ee server, but the "write once, run anywhere" phrase refers to the
se standard, not ee.

I hear this "java is not portable" stuff from time to time and it
just makes me wonder wtf the developers of these supposed problem
applications were smoking. It's really not that hard.

Jeremy
Damian Wiest
2006-11-17 22:27:02 UTC
Permalink
On Tue, Nov 14, 2006 at 11:27:36PM +0100, Matthias Kilian wrote:

[snip]
Post by Matthias Kilian
It does not run on arm/OpenBSD. It does not run on powerpc/OpenBSD.
It does not run on vax/OpenBSD. Heck, it even behaves differently
in on i386/Linux, i386/Windows, sparc/Solaris and pSeries/Linux,
and to this platform diversity the vendor diversity (Sun vs. IBM)
yet adds more subtile differences, especially if it comes to threads
or GC behaviour.
Believe it or not: Java is *not* platform independent, at least not
in so-called "enterprise" environments.
[snip]
Post by Matthias Kilian
Ciao,
Kili, making a life with Java since about 1998.
Java, the language, is an open specification that can be implemented by
anyone. Java, the brand, requires the implementor to license Sun's
test suite (for like $10,000 if memory serves me) and pass the tests
in order to use their logos, etc. The Java Virtual Machine is also an
open specification that can be implemented by anyone. Not every part
of the system is defined and various implementors have done certain
things differently. Also, the JVM must run on top of an operating
system, so bugs in the OS may impact its performance. The bytecode
should be portable assuming that the JVM works as advertised.

I agree that Sun makes it a pain in the ass for people not running
certain operating systems to use their Java tools. Whatever. Either
deal with it, don't use it, work on one of the non-commercial JVMs or
use a different OS for your Java environment. That being said, I've
run Blackdown's JVM and class libraries for Java2 rev. 1.4.X on BSD
without issue. Actually, that's not true I did run into some issues
with cryptographic classes (license validation), but it was easy enough
to work around that problem.

Java may make certain classes of applications extremely easy to develop,
but it's not going to replace something like C. Indeed, some Java
classes in the standard class library require callouts to C routines via
JNI. Also, remember that Java was initially called Oak and was
targetting the embedded space. I'm not surprised there have been issues
in the non-embedded space.

http://ei.cs.vt.edu/book/chap1/java_hist.html

-Damian

Josh Grosse
2006-11-14 15:53:54 UTC
Permalink
...I am having a hard time getting java to work on openbsd. Java is a
deal-breaker for me as I use it all day every day for work. What I've
done is taken a tar of the linux version...
<snip>
...I really don't want to download the source for java and compile... I am
on dialup so every byte counts....
<snip>
...If anybody can give me some tips or tricks I would really appreciate it.
Per FAQ 8.3, Java 1.5 or 1.4 must be built from source. An overnight download
of the files should not be a huge problem, considering how much time,
computing, memory, and storage resource is needed to build it.

Kaffe is now used as a Java compiler to "bootstrap" the builds of Java 1.4 or
1.5. Luckily, the port for Java 1.3-linux still exists. This is a binary port,
that used to be used to build Java 1.4/1.5. If 1.3 is sufficient for your
needs, then this Linux emulation port may work better for you than trying
to accomplish an emulation on your own. Obtain the ports tree, then issue:

$ cd /usr/ports/devel/jdk/1.3-linux
$ make install

Eventually, the project should have native packages once Sun completes its
migration to Java GPL. It was just announced, and if they meet their intended
schedule, you may hope that binary packages will be on the mirrors in
November 2007 for the 4.2-release.
Lars Hansson
2006-11-15 03:31:21 UTC
Permalink
On Tue, 14 Nov 2006 10:53:54 -0500
Per FAQ 8.3, Java 1.5 or 1.4 must be built from source. An overnight download have an
of the files should not be a huge problem, considering how much time,
computing, memory, and storage resource is needed to build it.
Except that you need to navigate the Sun download pages mess, click thru
license agreements and have an account (I think). Then you need to
install X number of Linux JDK's, wich pulls in all the Linux emulation
packages and then you have to actually compile it and hope you enough
disk and ram. Wouldnt it be possible for someone other then the OpenBSD
project to legally share their built packages?

---
Lars Hansson
Lars Hansson
2006-11-15 04:28:29 UTC
Permalink
On Wed, 15 Nov 2006 11:31:21 +0800
Post by Lars Hansson
install X number of Linux JDK's
Apparently you dont need this anymore. Duh!

---
Lars Hansson
Damian Wiest
2006-11-17 21:28:32 UTC
Permalink
Post by Lars Hansson
On Tue, 14 Nov 2006 10:53:54 -0500
Per FAQ 8.3, Java 1.5 or 1.4 must be built from source. An overnight download have an
of the files should not be a huge problem, considering how much time,
computing, memory, and storage resource is needed to build it.
Except that you need to navigate the Sun download pages mess, click thru
license agreements and have an account (I think). Then you need to
install X number of Linux JDK's, wich pulls in all the Linux emulation
packages and then you have to actually compile it and hope you enough
disk and ram. Wouldnt it be possible for someone other then the OpenBSD
project to legally share their built packages?
---
Lars Hansson
I don't suppose it's possible to enable Solaris emulation and just rip
the necessary bits from their x86 Java packages?

-Damian
Joachim Schipper
2006-11-14 22:26:04 UTC
Permalink
Post by Marc Ravensbergen
Hi, first I'd like to mention that openbsd 4.0 is a first for me, and I
am really liking it so far (I am a linux refugee...). Eg., it's nice to
be able to rip out my usb cd burner, plug it in, and be able to actually
use the thing again. Try that under linux and the cd burner is unsuable
until you reboot... Not to mention that the whole "secure by default"
thing is very appealing.
Welcome aboard!
Post by Marc Ravensbergen
I am having a hard time getting java to work on openbsd. Java is a
deal-breaker for me as I use it all day every day for work. What I've
done is taken a tar of the linux version, and untarred it in openbsd. I
have turned on linux emulation by modifying the variable in
/etc/sysctl.conf, and I've mounted the /proc "filesystem". I have also
pkg_added redhat-base8.xxx.
However, whenever I run java, I get a "Can't detect initial thread stack
location - find_vma failed" error. This is for sun's jdk 1.5.06 as well
as one of the newer 1.6 versions. IBM's jdk1.4 says it cannot read or
write (not sure exactly anymore) to /proc/xxxx. I've tried running all
three versions as root to check for permission errors, but it makes no
difference. I've googled for hours trying to find a solution, but can't
seem to fix it.
I really don't want to download the source for java and compile... I am
on dialup so every byte counts. A little while ago I tried java on
netbsd and got it working through linux emulation as well. I had
problems with netbsd so it didn't stick around, but I believe that java
on bsd through emulation should be possible; probably just an oversight
somwhere on my part.
If anybody can give me some tips or tricks I would really appreciate it.
Well, the *sane* way of doing this involves building it from ports.
Those are there for a reason, after all. Burning it to a CD and putting
the CD in your machine may be useful if you have access to a faster
network elsewhere; but I'd strongly suggest just downloading the source
and being done with it. For additional points, tweak altq(9) so that you
can still browse at an acceptable speed.

If you want to try your way, -current's emulators/fedora just *might*
build on a -stable system; those libraries are a lot newer, and *might*
fix your problem. Of course, there's no reason to assume either...

Joachim
m***@shonetic.com
2006-11-15 17:26:00 UTC
Permalink
Post by Joachim Schipper
Post by m***@shonetic.com
Post by Jeff Quast
Post by Marc Ravensbergen
I really don't want to download the source for java and compile... I am
on dialup so every byte counts.
I believe that java on bsd through emulation should be possible;
probably just an oversight somwhere on my part.
If anybody can give me some tips or tricks I would really appreciate it.
I would, but I would just be (poorly) repeating information that
developers have painstakingly documented.
http://www.openbsd.org/faq/faq8.html#Programming
I've read that info; the "preferred" way of installing java (on
openbsd) is by compiling from source. As I am a full time java
developer, I use and test several different jdks at once. You might be
able to understand why I am hesitant to compile and download all this
stuff when openbsd supports linux emulation, and I already have
downloaded all the linux jdks that I need.
If you're getting paid to develop on this, a little phone bill shouldn't
be that problematic,
Right now I work for myself, out of my house; time and bandwith cost
money which is hard to come by at this point. I'd also rather spend
time on "learning" so I can save time the next time I come to a
(similar) problem.
Post by Joachim Schipper
and you've already wasted as much time here as it
would have taken to download it in the first place.
hardly, you obviously have no idea what downloading on dial-up is
like, especially when other family members need to access the phone as
well.
Post by Joachim Schipper
If you're so set on using Linux JDKs, use Linux. That's what they are
for. If you really want, use Linux under some emulator (qemu is in
ports).
The fact that NetBSD apparently does manage to run your JDKs doesn't
necessarily mean it manages to run them reliably, either.
You're missing the point entirely. I already had several jdks in
linux, thought I could save some time / bandwith and use them through
emulation on openbsd. Forget that I mentioned anything about netbsd,
linux, etc.

Thanks to the kind souls who offered suggestions or binary downloads.
I will have access to high speed for a few hours in the near future,
and will try downloading the source then.

Marc
Post by Joachim Schipper
Post by m***@shonetic.com
Post by Jeff Quast
You should really send your grievences to sun, not openbsd misc.
OpenBSD can't change Sun's licensing policies -- they can only abide
by them. Maybe all of this hoop jumping will make you realize that
using this language is a bad career move?
that is laughable, especially considering sun's anouncement yesterday
to GPL the entire java stack. Not trying to start a flame war here,
but open solaris, nexenta (solaris kernel, debian apps), and a million
linux distros all support Java really well. I am trying a java /
openbsd combination because I've heard good things about openbsd, and
from what I've seen so far I am very happy with it. I understand fully
why openbsd has issues with Java. I am not blaming them / you at all.
OpenBSD supports Java really well. Its Linux emulation is not perfect,
granted, but that's a wholly different issue.
Joachim
Loading...