DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th May 2009
SunSpyda SunSpyda is offline
Port Guard
 
Join Date: Mar 2009
Posts: 20
Thanked 0 Times in 0 Posts
Default Java SE and Netbeans on OpenBSD?

OK, I know that this is a sort of thing I could have Googled, but I really want to double check this with knowledgeable people. Answers seem reasonably sparse and varying on Google.

I wasn't sure whether to place this in the Programming or OpenBSD section, so sorry if it's in the wrong place...

I want to install all the Java SE development tools, including the compiler, JAR archiver, APIs, etc, etc. I also want to get the Netbeans IDE, because developing Java apps on the CLI was complete FUD last time I tried.

I spotted both the Java compiler and Netbeans on the i386 4.4 package collection. I couldn't see Java SE though.

If I were to install Netbeans, would OpenBSD install the rest of Java SE as a dependency, or will I have to get it manually? If I were to get it manually, which package would contain the APIs, Compilers, JAR archivers etc all as one?

Any help would be awesome... Thanks

EDIT - I spotted JDK there. But isn't that older than Java SE, or are they just using the old name?
Reply With Quote
  #2   (View Single Post)  
Old 17th May 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by SunSpyda View Post
I spotted both the Java compiler and Netbeans on the i386 4.4 package collection. I couldn't see Java SE though.
As you later saw, the JDK is under devel/jdk, & yes, this what is also known as Java Standard Edition.
Quote:
If I were to install Netbeans, would OpenBSD install the rest of Java SE as a dependency, or will I have to get it manually?
If you install NetBeans, JDK 1.5 is required as a dependency. Unfortunately, JDK 1.5 is not available as a package as can be seen in Section 8.3:

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

If you are interested, here is how this can be determined:
  • Of course, OpenBSD users should install the relevant packages over compiling ports unless there are specific reasons to compile ports as explained in Section 15.1:

    http://openbsd.org/faq/faq15.html#Intro

    Nevertheless, the tools needed to answer your question are part of the ports tree itself.
  • The manpage to ports(7) gives short descriptions to the make targets:
    • print-build-depends
    • print-run-depends
    These targets are self-explanatory; they list the dependencies needed for building & execution.
  • I run 4.5-current, so the exact versions will be different than what you will have on 4.4, but the process is the same.

    print-run-depends with the /usr/ports/devel/netbeans lists the following dependencies:
    Code:
    This port requires package(s) "javaPathHelper-0.3 libiconv-1.13 openmotif-2.3.0p0 jdk-1.5.0.16p0" to run.
So to answer the original question, you will need to compile the JDK 1.5 port yourself in order to install or run NetBeans.
Reply With Quote
  #3   (View Single Post)  
Old 17th May 2009
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 770
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by SunSpyda View Post

EDIT - I spotted JDK there. But isn't that older than Java SE, or are they just using the old name?
JDK 1.5, JDK 1.6 and JDK 1.7 are available. The forum community is rather
small and I have not seen any Java developers around at least the one who
use OpenBSD. I would post the same question on miscATopenbsd . I think, I have seen people asking about NetBeans but I the use of Java is against my religion so I ignore all discussions related to it. I do however know that quite
a few Java developers use OpenBSD as their platform.
Reply With Quote
  #4   (View Single Post)  
Old 17th May 2009
fbsduser fbsduser is offline
Shell Scout
 
Join Date: Aug 2008
Posts: 107
Thanked 4 Times in 4 Posts
Default

JDK is AFAIK a generic name for Sun's Java Development kits. The latest one might be based on Java SE.
Reply With Quote
  #5   (View Single Post)  
Old 17th May 2009
SunSpyda SunSpyda is offline
Port Guard
 
Join Date: Mar 2009
Posts: 20
Thanked 0 Times in 0 Posts
Default

I saw 1.7... wouldn't Netbeans work work this? I'll use Java without an IDE if I must, but because Java is such a messy language at times, an IDE is useful, to deal with all the little bits and bobs (Unfortunate, but true).

If I got 1.7 off the package system, then separately installed Netbeans, is it a possibility it would detect Java SE 1.7, and work with it, yet not require 1.5, because I installed them independently? If not, could I update to a bleeding edge version of Netbeans that might support 1.7?

OK, another question, is there another IDE that supports 1.7 on OpenBSD, and can be installed as a package? I looked at Eclipse, but it didn't say what version of Java SE is required.

I must admit, because OpenBSD's package system is so flawless and has had everything I wanted, I haven't actually built anything for a while.

I'll take a look at miscATopenbsd, thanks for the advice.

If it really becomes difficult to get an IDE running, I'll write a script that automates the Java CLI development process.
Reply With Quote
  #6   (View Single Post)  
Old 17th May 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by SunSpyda View Post
I saw 1.7... wouldn't Netbeans work work this?
I don't use NetBeans, but I would assume yes. I highly doubt that NetBeans is rewritten with the release of each version of the JDK, & it would not surprise me that portions exist which rely on older editions of the JDK. In fact, if you were to build JDK 1.7, it requires JDK 1.5 as a dependency. The point here is that Sun imports legacy code in all JDK's. It is only due to licensing issues that 1.7 is available as a standalone package.

From a software development standpoint, it doesn't make sense to continually rewrite everything from scratch.
Quote:
If I got 1.7 off the package system, then separately installed Netbeans, is it a possibility it would detect Java SE 1.7, and work with it, yet not require 1.5, because I installed them independently?
The information I quoted is from -current. There is no picking & choosing of JDK versions. NetBeans has a run-time dependency upon JDK 1.5.
Quote:
If not, could I update to a bleeding edge version of Netbeans that might support 1.7?
It appears that you are making the assumption that dependency implies compatibility. The two are not necessarily related. I have no reason to believe that NetBeans cannot be used with JDK 1.7.
Quote:
I looked at Eclipse, but it didn't say what version of Java SE is required.
Again, print-run-depends on -current states the following:
Code:
This port requires package(s) "hicolor-icon-theme-0.10p4 javaPathHelper-0.3 jpeg-6bp4 tiff-3.8.2p3 glitz-0.5.6p1 jasper-1.900.1p0 libiconv-1.13 openmotif-2.3.0p0 jdk-1.5.0.16p0 gettext-0.17p0 sqlite3-3.6.13p0 pcre-7.9 glib2-2.18.4p3 atk-1.24.0 desktop-file-utils-0.15 png-1.2.35 cairo-1.8.6p1 pango-1.22.4p0 gtk+2-2.14.7p0 swt-3.2.2p1 nspr-4.7.3p0 nss-3.12p0 xulrunner-1.8.1.19p1 swt-browser-3.2.2p0" to run.
So to answer your question, running Eclipse will require compilation of JDK 1.5 as well.

It is unfortunate that licensing issues have added a cumbersome element to installing & configuring Java on OpenBSD, but that is the way that it is. In the future, this will become less of an issue -- assuming that the licensing stays as it is now.

Last edited by ocicat; 17th May 2009 at 08:24 PM.
Reply With Quote
  #7   (View Single Post)  
Old 17th May 2009
SunSpyda SunSpyda is offline
Port Guard
 
Join Date: Mar 2009
Posts: 20
Thanked 0 Times in 0 Posts
Default

Thanks a lot for the help. Sorry if the questions seemed a bit dumb or repeated :P

So, is the build process for Java SE reasonably simple? It seems pretty hit and miss to me when I have used it before... I have built somethings using make, and it's worked, but other times it's failed, and it's took ages to fix. Probably inexperience on my behalf. As I said below, my building experience in OpenBSD is limited, because unlike the Linuxes (What I used before), the package system actually works.. and it works well, so building hasn't been needed.

So this is what is says in one of the links you gave me....
Code:
Sun JDK - only 1.7 as a package; for older version see build instructions below.
That seems to imply that I only need to build if I want a earlier version.

Bear in mind I have no idea how to use the ports system... I only worked the basics of the packaging system. So I'm reading info/man pages about it at the moment, as well as reading the provided links.

What is the URL for the ports? Packages have a URL you can go to, but I can't find one for ports. It mentions something called CVS. Is there a FTP-download-off-page system like there is with the packages, or does it use a completely different system?

This is the page I go to for my package downloads... I then take the URL for the package I want and give it to pkg_add which deals with it for me.
Code:
http://www.openbsd.org/4.4_packages/i386.html
Is there a equivalent for downloading the ports in TAR files that have to be built?

Thanks a lot for the help...
Reply With Quote
  #8   (View Single Post)  
Old 17th May 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by SunSpyda View Post
So, is the build process for Java SE reasonably simple?
You will save yourself time & grief by familiarizing yourself with all of Section 15 of the FAQ upfront:

http://openbsd.org/faq/faq15.html

Quote:
It seems pretty hit and miss to me when I have used it before...
Building the JDK's is a bit more involved because certain files need to be manually downloaded due to licensing issues. What these files are, & where they can be obtained can be found in /usr/ports/devel/jdk/1.5/Makefile. Or you can wait until you issue the following:

# cd /usr/ports/devel/jdk/1.5
# make install

...& if the necessary files aren't found in /usr/ports/distfiles, make will display the same information again.
Quote:
That seems to imply that I only need to build if I want a earlier version.
Again, there is a difference between run-time dependencies & build dependencies. If all you want to do is run JDK 1.7, the package is available. However, many of the collateral Java tools have either run-time or build dependencies on earlier JDK versions.

If your question is about my earlier statement about JDK 1.7 depending upon JDK 1.5, I was referring to building JDK 1.7. I was attempting to emphasize that newer versions of the JDK still have ties to earlier versions either overtly or in more subtle ways.
Quote:
Bear in mind I have no idea how to use the ports system...
This is why it is imperative for you to study Section 15 of the FAQ. Building ports is not meant for casual users.

I will also mention that depending upon your system (meaning hardware...), building JDK 1.5 will take nearly a day depending upon what supporting packages have already been installed.
Quote:
What is the URL for the ports?
The ports tree has to be installed first. This is covered in Section 15.3.2:

http://openbsd.org/faq/faq15.html#PortsFetch

Since you have OpenBSD 4.4, be sure to download pub/OpenBSD/4.4/ports.tar.gz if you don't have the appropriate tar file via the official CD set or obtained when 4.4 was installed. If you accidentally install a different version of the ports tree, this can lead to subtle & odd build & execution errors. It is highly important to ensure that the ports tree installed matches the version of OpenBSD installed. This is discussed in Section 15.4.1:

http://openbsd.org/faq/faq15.html#NoFun

If you have further questions, don't hesitate about replying, but study Section 15 first. Good luck.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Netbeans running application problem. bsdnewbie999 Programming 4 12th June 2009 10:22 AM
Java JDK Oko OpenBSD Packages and Ports 10 13th July 2008 07:39 PM
FBSD & Java DarkEnergy FreeBSD General 2 4th July 2008 03:50 AM
netbeans 6.0.1 not run cuongvt FreeBSD General 5 6th June 2008 03:13 PM
[java] netbeans 6.0.1 and applets not work Mak-Di FreeBSD General 1 12th May 2008 06:04 PM


All times are GMT. The time now is 12:57 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick