| View previous topic :: View next topic |
| Author |
Message |
sc4bbk Xplorer
Joined: 24 Dec 2004 Posts: 76
|
Posted: Sun Jan 09, 2005 6:44 am Post subject: Java. Anyone? |
|
|
| Anyone here programming Java in Xandros? Can you teach me how to install the SDK? Thank you. |
|
| Back to top |
|
 |
mike80808 Xanscended

Joined: 14 Apr 2003 Posts: 3891 Location: St. Louis, MO
|
Posted: Sun Jan 09, 2005 11:24 am Post subject: |
|
|
Go to Sun's site and install the Linux version of the JDK exactly as the instructions tell you to.
I chose to install it in /opt/j2sdk...
Afterwards, I added setting the JAVA_HOME variable to my .bash_profile and adding the $JAVA_HOME/bin directory to my $PATH variable as well.
There is plenty of guidance on the Sun site about how to use Java on Linux. Xandros is not anything special with regards to being just another Java platform. _________________ Thanks for all the fishes, Xandros. |
|
| Back to top |
|
 |
Arne Anka Xanspiration

Joined: 21 Mar 2004 Posts: 4186 Location: Stockholm, Sweden
|
Posted: Sun Jan 09, 2005 3:27 pm Post subject: |
|
|
| In Debian there is also an alternative package called free-java-sdk. Have never used it myself. |
|
| Back to top |
|
 |
frocco Xplorer
Joined: 16 Jun 2004 Posts: 8
|
Posted: Sat Feb 19, 2005 2:21 pm Post subject: Help with java sdk |
|
|
Hello,
Can you explain how to add the path and java_home?
I'm new to linux.
I installed the j2sdk under the opt directory.
Thanks
Frank |
|
| Back to top |
|
 |
mike80808 Xanscended

Joined: 14 Apr 2003 Posts: 3891 Location: St. Louis, MO
|
Posted: Sat Feb 19, 2005 5:13 pm Post subject: |
|
|
There are two main ways to add JAVA_HOME to your environment and path.
One is to do it for you, as part of your personal account on the machine. This is an "every person for themselves strategy". The place to add your path would be to add the following to the "hidden" file in your home directory, ".bash_profile". You can use kate or kwrite or kvim or even XFM (which is really using kwrite) to edit it.
At the end, you'll want to append something like (using your location for Java):
| Code: | export JAVA_HOME=/opt/j2sdk...
PATH=${JAVA_HOME}/bin:$PATH |
The other way to do it, is to make the change for EVERYONE. This is an "everyone is in the same boat strategy". You make the same changes as above, but you add them to the file /etc/profile. You will need to be 'root' (or the Administrator user) to do that.
You can be more sophisticated about how you do what I just described above, but it should work for you, and isn't any more fancy than it needs to be.
The reason I added the java directory to the beginning of the path is that if I didn't do that, when you ran 'java', it would find the ones in /usr/bin before it found the ones in your new SDK installation. _________________ Thanks for all the fishes, Xandros. |
|
| Back to top |
|
 |
frocco Xplorer
Joined: 16 Jun 2004 Posts: 8
|
Posted: Tue Feb 22, 2005 12:46 pm Post subject: |
|
|
Thanks Mike,
I'm still trying to settle on a distro, so far this one looks good.
Best Regards,
Frank |
|
| Back to top |
|
 |
trentallenblack@yahoo.com Xplorer
Joined: 25 Mar 2005 Posts: 1
|
Posted: Fri Mar 25, 2005 12:13 pm Post subject: Java and Net Beans |
|
|
Java works great from Windows to Xandros.
Make sure, in Java, you set the directory path from
Java, and not hard code the / or \.
Eclipse can be downloaded free from Xandros Networks.
You can add a GUI designer from the www.eclipse.org site,
if you need it.
Or, you can get www.netbeans.org, which works great.
I use both, depending on my mood.
Linking to a database or even loading a local html document
in the defeault browser has been frustrating, as there are
no docs I can find or many others doing this.
I am now testing a compiler "Jet" for Java on Linux. I am hoping
it will install and make a .Jar file that is executable for me.
If you want a compiled stand alone app that does not need
Java installed, you can't use the SWING classes, and have to
use IBM's SWT classes. --- See Eclipse Web Site.
ALL IN ALL, THIS LINUX DISTRO ROCKS.
I have Fedora Core 3, Linspire 4.5, Mandrake 10, and SuSE 9.2
For business, this distro seems the easiest to run and more things
work without TWEAKING.
Search Google to get the DVD player working,
for there are some legal reasons it seems it was disabled, but not removed, as all the packages are still there. |
|
| Back to top |
|
 |
soulpower2873 Xplorer
Joined: 14 Jan 2006 Posts: 1 Location: Allen, TX
|
Posted: Sat Jan 14, 2006 1:00 am Post subject: question |
|
|
I'm sorry, but though this may be stupid, I am used to using a different version of the console, I just switched to xandros. I'm trying to install jdk, but apparently the command to run silently isnt the same, could someone tell me it? _________________ My only haven is my mind, I'm not even protected on my computer. |
|
| Back to top |
|
 |
web_dev Xandrosianling

Joined: 24 Jan 2006 Posts: 474 Location: Pennsylvania
|
Posted: Mon Feb 13, 2006 11:13 pm Post subject: |
|
|
| Quote: | Code:
export JAVA_HOME=/opt/j2sdk...
PATH=${JAVA_HOME}/bin:$PATH |
This worked for me after installing SDK from Xandros Networks...the directory had a slightly different name though.
What can I say, wrote up a quick script, compiled it and ran in Console and I couldn't be happier. I just uninstalled Eclipse (much prefer using console.) _________________ Welcome to the friendly XandrOS forums!
Registered Linux user #407955
 |
|
| Back to top |
|
 |
web_dev Xandrosianling

Joined: 24 Jan 2006 Posts: 474 Location: Pennsylvania
|
Posted: Tue Feb 14, 2006 10:18 am Post subject: |
|
|
Also, sorry to double post, but I felt it neccessary to add that Eclipse makes it more difficult to do simple things...for example just creating a class is like a 5-6 click endeavor when you can just automatically do it in console by typing one simple command to compile and it automatically creates the class. Just another reason why I still can't stand fancy compilers. If you prefer simple input - output coding this really is the way to go. _________________ Welcome to the friendly XandrOS forums!
Registered Linux user #407955
 |
|
| Back to top |
|
 |
mike80808 Xanscended

Joined: 14 Apr 2003 Posts: 3891 Location: St. Louis, MO
|
Posted: Thu Feb 16, 2006 9:23 pm Post subject: |
|
|
If you're trying to do simple things, then using Java is really just the start of your problems.
You should be using Perl instead, if they're truly that lightweight of a task. _________________ Thanks for all the fishes, Xandros. |
|
| Back to top |
|
 |
web_dev Xandrosianling

Joined: 24 Jan 2006 Posts: 474 Location: Pennsylvania
|
Posted: Thu Feb 16, 2006 10:38 pm Post subject: |
|
|
| Quote: |
If you're trying to do simple things, then using Java is really just the start of your problems. |
SImply put, it's more simple to compile and run in console than it is to use Eclipse...less resources used too. It's not that my tasks are simple...that's partly why I actually don't like Perl. Besides, I'm new to Xandros and to coding in a Linux environment...Xandros is the first Distro that I have actually been happy enough with to actually install the jdk on. I offered my two cents on the premise that sc4bbk was in the same boat as me. Java works great everywhere  _________________ Welcome to the friendly XandrOS forums!
Registered Linux user #407955
 |
|
| Back to top |
|
 |
mike80808 Xanscended

Joined: 14 Apr 2003 Posts: 3891 Location: St. Louis, MO
|
Posted: Fri Feb 17, 2006 1:37 am Post subject: |
|
|
| web_dev wrote: | Java works great everywhere  |
Indeed it does. Like on my 400Mhz PowerPC running Debian.
http://www.archlug.org/kwiki/BlackDogKwikis _________________ Thanks for all the fishes, Xandros. |
|
| Back to top |
|
 |
dov Xplorer
Joined: 07 Jun 2004 Posts: 74
|
Posted: Tue Feb 21, 2006 8:57 pm Post subject: |
|
|
okay i am trying to get Java Runtime to run but just can't get it happening, am unable to view java applets and such, i installed it using their installer .bin and it is in /home/base/jdk1.5.0_06
so is this correct to add to the .bash_profile mentioned earlier
export JAVA_HOME=/home/base/jdk1.5.0_06
PATH=${JAVA_HOME}/home/base/jdk1.5.0_06/bin:$PATH
i have also tried ln -s so many times ...
hope someone can help me with this
thanks |
|
| Back to top |
|
 |
web_dev Xandrosianling

Joined: 24 Jan 2006 Posts: 474 Location: Pennsylvania
|
Posted: Mon Feb 27, 2006 12:05 am Post subject: |
|
|
| Quote: | | okay i am trying to get Java Runtime to run but just can't get it happening, am unable to view java applets and such |
You mean in your web browser? Firefox? You don't need the jdk to view applets in firefox. You need the Java Runtime Environment. You can get it here: https://jsecom8b.sun.com/ECom/EComActionServlet;jsessionid=B45D3197B923C3CC57943B781B63C041
Download it, and I believe you can install it with XN...not sure though.
| Quote: | export JAVA_HOME=/home/base/jdk1.5.0_06
PATH=${JAVA_HOME}/home/base/jdk1.5.0_06/bin:$PATH |
This should work as long as /home/base/jdk1.5.0_06 is where the jdk went when you installed it. Best bet is to double check that in Xandros File Manager first. _________________ Welcome to the friendly XandrOS forums!
Registered Linux user #407955
 |
|
| Back to top |
|
 |
|