How to Install Greenfoot (Beginner Java programmers)

I haven't posted in a long time.
I recently started studying java and we had to download greenfoot. Greenfoot has a .deb file. To install a deb file on arch is pretty simple:
ar -x fileName.deb
tar -xzvf data.tar.gz
then just move the stuff from data into the install location of your choice.
So you've installed Greenfoot.
Now when you run it it gives you an error that it can't find a suitable JDK and that you may need to edit the bin file.
Do it. Go to /usr/bin/greenfoot and open it with leafpad or whatever you use.
Apparently greenfoot doesn't update their program. Java is now past 6. We're on 7.
Change it to:
#!/bin/sh
if [ -e /usr/lib/jvm/java-7-sun/lib/tools.jar ]; then
    JAVAPATH="/usr/lib/jvm/java-7-sun"
elif [ -e /usr/lib/jvm/java-7-openjdk/lib/tools.jar ]; then
    JAVAPATH="/usr/lib/jvm/java-7-openjdk"
elif [ -e /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar ]; then
    JAVAPATH="/usr/lib/jvm/java-7-openjdk-amd64"   
else
    echo "A suitable JDK couldn't be located. You may need to edit the"
    echo "/usr/bin/greenfoot launch script."
    exit 1
fi
CP="/usr/share/greenfoot/bluej.jar:$JAVAPATH/lib/tools.jar"
"$JAVAPATH/bin/java" -Dawt.useSystemAAFontSettings=on -cp "$CP" bluej.Boot \
    -greenfoot=true -bluej.compiler.showunchecked=false \
    -greenfoot.scenarios=/usr/share/doc/Greenfoot/scenarios \
    -greenfoot.tutorial=file:///usr/share/doc/Greenfoot/tutorial/tutorial.html \
    -greenfoot.tutorial.scenario=wombats \
    -greenfoot.url.javadoc=/usr/share/doc/Greenfoot/API/index.html \
     "$@"
I know it's simple, but it took a while out of my potential homework time.
Last edited by darris (2013-04-03 16:45:06)

Search and you shall receive :::
https://aur.archlinux.org/packages/?O=0&K=greenfoot
The aur package has a depends on java-environment & java-runtime, and so would work with any version of java. You wouldn't have to change any bin file of even extract the deb and copy files yourself. Best of all, this way, pacman is aware of the package and its dependencies and can be helpful when you have to uninstall it or modify it in any way.

Similar Messages

  • How to install the SAP Java Connector

    Hi,
    I am unsure how to install the SAP Java Connector on Linux (Suse Linux Enterprise 10). The SAP Integration Kit install and admin guide says:
    ===
    u2022 Copy the librfccm library and the libsapjcorfc library to busines
    sobjects_root/enterprise120/PLATFORM_PATH, where busines
    sobjects_root is the full path to your businessobjects directory,
    and PLATFORM_PATH is your platform. For example, PLATFORM_PATH
    is solaris_sparc for an installation on Solaris.
    u2022 Use symbolic links for the location of the librfccm library and the lib
    sapjcorfc library.
    u2022 Add the location of the librfccm library and the libsapjcorfc library
    to the library path.
    ===
    Do I have to do all 3 steps or is the 1st one (copying of files) enough?
    On the other hand, the SAP Java Connector guide says:
    ===
    Then add {sapjco-install-path} to the LD_LIBRARY_PATH environment variable.
    Finally, add {sapjco-install-path}/sapjco.jar to your CLASSPATH environment variable.
    ===
    So, what to do?
    Thanks!

    Thanks for your help. So i copied the 2 files as mentioned in point 1.
    Where do I have to copy the file sapjco.jar to? There is no shared lib folder after installing BO Edge 3.1 on a Linux system.
    I copied the sapjco.jar to /bobje/tomcat/common/lib but still get the message that the Java Connector files are not in the correct directory.
    I already copied the files librfccm.so and libsapjcorfc.so to /bobje/enterprise120/linux_x86 .
    Thanks again!
    Edit: problem solved: Copying the sapjco.so to tomcat/shared/lib is correct, if the directory doesn't exist then just create it (mkdir). The message is just plain information 7 hint.

  • How to install and use Java v1.6 in addition of v1.5 for SoaSuite?

    As far as I know the highest Java version with which SoaSuite is running is v1.5 (resp.5).
    Assume I want to (have to) use version v1.6 (for other programs on my computer):
    How can I install and use v1.6 as second Java installation ?
    If I simply install v1.6 then Oracle SoaSuite refuses to run.
    So I have to tell SoaSuite to use an older version on my hard disc.
    How can I do this?
    Is there a single point of reference for the SoaSuite which java location location to use?
    What about the environment variables JAVA_HOME and PATH?
    Or is there an entry in the Application Server settings or any batch script which must be adjusted?
    Peter

    SOA Suite is certified for Java 6.
    Look at metalink note 444462.1 which gives instructions on how to achieve this. You will need to upgrade to 10.1.3.4 though.
    Its fairly straight forward, as SOA Suite uses the JDK from the ORACLE_HOME. This can be changed by editing the opmn.xml file found in SOA_HOME/opmn/config
    Backup the original JDK in the Oracle Home and copy over the new Java 6 into the ORACLE_HOME:
    Example:
    $ cd $ORACLE_HOME
    $ mv jdk jdk.orig
    $ cp –rp <directorypath_to_java6> jdk
    Verify that the new JDK is working by executing:
    $ORACLE_HOME/jdk/bin/java -version
    cheers
    James

  • How to Install and Configure Java and Tomcat

    Hi Everybody,
    I am using the following versions of java and tomcat:
    JAVA: j2sdk-1_4_2_13
    Tomcat: jakarta-tomcat-5.0.5
    I tried to configure several times both but everytime the result is the same. I am setting the following variables:
    PATH: .;D:\j2sdk1.4.2_13\bin;D:\Tomcat 5.0\bin
    CLASSPATH: .;D:\j2sdk1.4.2_13\lib;D:\Tomcat 5.0\common\lib\servlet-api.jar
    JAVA_HOME: D:\j2sdk1.4.2_13
    Please correct what mistake i am doing again and again. I appreciate your effort.
    Thanks in advance.
    Himanshu

    Fine sir, I will tell evrything in detail what steps i am following during installation and configuring java and Tomcat.
    1) I am using the following versions(exe) of java and tomcat:
    JAVA: j2sdk-1_4_2_13-windows-i586-p
    Tomcat: jakarta-tomcat-5.0.5
    2) Then, i follow exactly the same variable names and values to configure java as mentioned below to make java work under User variables header:
    PATH: .;D:\j2sdk1.4.2_13\bin
    CLASSPATH: .;D:\j2sdk1.4.2_13\lib
    JAVA_HOME: D:\j2sdk1.4.2_13
    Above steps i follow only for installing java. And it also not working properly. If i run my .java file from the destination of the file then it will be execulted but if i try to execute from any other location then it doesn't, it shows the following message in the DOS prompt:
    error: cannot read: Hello.java
    1 error
    Now, please correct what mistake i am doing.
    Thanks
    Himanshu

  • How to install the latest Java software on an Imac with OS X 10.1.11???

    Do I really have to buy a new Mac to install Java. Many net banks require the latest version...

    Hello Norwegian, and a warm welcome to the forums!
    Unfortunately the latest Java requires 10.5.x or 10.6.x
    Leopard requirements...
    * Mac computer with an Intel, PowerPC G5, or PowerPC G4 (867MHz or faster) processor
    minimum system requirements
    * 512MB of memory
    * DVD drive for installation
    * 9GB of available disk space
    Snow Leopard requirements...
    General requirements
    Intel Core 2 Duo
    * Mac computer with an Intel processor
    * 1GB of memory
    * 5GB of available disk space
    * DVD drive for installation

  • How I install the legacy Java SE 6 runtime.?

    My son wants to play Minecraft and he gets a pop up to install this.  thought i installed java.  any thoughts?

    Hey stewarjr15,
    Thanks for the question. Try downloading Java for OS X 2014-001 from the following link, as it may resolve your issue:
    Java for OS X 2014-001
    http://support.apple.com/kb/dl1572
    Thanks,
    Matt M.

  • HT5367 How can I tell if I have 64 bit Java installed on my mac? I have something like Minecraft on it and I want to install 64 bit java on my mac. PLEASE HELP! Thanks!

    I just need a bit help on how to install 64 bit java, i searched on youtube for it but it came up with many that I don't know much about. Please recommend a video you guys trust or know about. thanks

    You can use 3rd party software such as Carbon Copy Cloner or SuperDuper! to create a bootable clone on an external drive.
    I use SuperDuper to create a clone. Yes, it's true the Recovery HD will need to be recreated after restoring a clone because neither of these softwares nor Time Machine backup that partition. It's really no big deal. You just reinstall Lion on top of itself after the restore and reapply any Software Updates including the 10.7.1 update. I've done this a few times with no issues.
    The Lion Recovery Assistant app creates an external Recovery HD on like a USB thumb drive, but it creates this using the Recovery HD from your Lion install. If the Recovery HD is missing, the app will not create one for you.
    EDITED:
    Create your bootable clone on an external drive.
    Create an external USB thumb drive with the Recovery HD using the Lion Recovery Assistant.
    Swap out hard drives.
    Boot from the USB Recovery HD thumb drive.
    Use Disk Utilities to create a new partition (Macintosh HD), format it with the GUID partition table and Mac OS Extended (Journaled).
    While in Disk Utilities, click your hard drive (not the new partition); then click the Restore button.
    The Source of your restore is the external clone you created. The Destination is the newly created Macintosh HD partition.
    Click the Restore button. The restore will take awhile depending on the size of the clone.
    After the restore, boot your system and it should boot into Lion.
    Reinstall Lion on top of itself to recreate the Recovery HD at the end of your Lion partition.
    Reapply Software Updates including the 10.7.1 update (if you want it).
    Hope this helps!

  • How to install the JRE that comes with JME 3.0 to a Windows Mobile device

    From Sun's JME download page:
    Integration with 3rd party emulators and Windows Mobile devices
    The new Java ME Platform SDK architecture allows integration of 3rd party emulators and devices. Java ME Platform SDK comes with Sun's Java runtime environment for Windows Mobile. A user can install this runtime on a Windows Mobile device or a Microsoft device emulator and experience all the on-device features of Java ME Platform SDK.*
    My question is, how can I install the Java runtime environment that comes with Java ME Platform SDK 3.0 to a Windows Mobile device. I am a newbie in this device programming and I'm setting up my development environment. So far, I have installed JME in my computer, and have also installed both the Windows Mobile 5 and Windows Mobile 6 emulator. I've been searching the internet for answers, but it always points me to using a third party java runtime such us Mysaifu, etc. I would like to stick with what is packaged with JME if possible.
    If anybody assist me or direct me to an online documentation on how to do this. All help is greatly appreciated :-)

    I had some success installing on a real Mobile 5 device [http://forums.sun.com/thread.jspa?threadID=5344195]
    There is a link to a doc on the main download page, item 5 under How to Install. [http://java.sun.com/javame/downloads/sdk30ea.jsp] I used this for the real device, Treo 700w. Did not try it with an emulator.
    The support looks to be an emulator rather than a JVM per say. But then again I could be wrong on that. I too had poked around looking for a JVM, CrEme, J9, etc..
    I do have a commercial app installed on the Treo that uses IBM's J9, which is seems requires a contact with a sales person to get ahold of. I had hoped to find something that might clue me in on how to "hook up" my own J2ME app with the J9 installed by the commercial package. But I've pretty much decided to get a real J2ME handset rather than continue to waste my time hacking up something with WM. Now the question is which one makes a good reference platform?

  • Install sneak preview java  and check if it has installed

    hi all:
          it is said to use ESS  there should be  for a installed sneak preview java  for which a technical system
    should be created on SLD, my question is how to install sneak preview java  and check if it has
    been installed?
    Edited by: jingying Sony on May 5, 2010 8:32 AM

    sneak preview java you are pointing is J2EE server , i think

  • How to install Java in ASUS EeePC Linux OS?

    Who knows how to install a Java to a Linux OS in ASUS EeePC? I purchased an EeePC 4GB Surf for my programming subjects. But then, I couldn't use the Eclipse if I don't have Java installed on the pc. Do you know how to put Java in a ASUS EeePC 4GB Surf Linux OS?

    Some programs like FrostWire will not work without Java being upgraded. To do this:
    1.
    Use the Synaptic Package manager to add the repository: deb http://geekconnection.org xandros4 main. If you have no clue what that means read Installing software on the EEE - quick beginner's guide on the wiki.
    2.
    After Synaptic has downloaded the files to update the repository; Scroll through the available items to locate xandros-sun-jre1.5; Mark it for installation; Click Apply.
    The approximate size of this installation of Java is 30Mb and it is reported in this thread on the forum that after this version of Java was installed FrostWire works.
    http://wiki.eeeuser.com/howto:upgrade_java?s=java

  • How to Install .CAP file in the Java Card?

    Hi Friends..
    How to install *.CAP* file in the Java Card?..
    I've GPShell script as follows :
    mode_211
    enable_trace
    establish_context
    card_connect -readerNumber 2
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
    install_for_load -pkgAID a00000006203010c01 -nvCodeLimit 500  -sdAID A000000003000000
    load -file HelloWorld.cap
    card_disconnect
    release_contextwith that script i can load HelloWorld.cap file successfully..
    Now, how to install the HelloWorld.cap file?..
    if i add script : load -file HelloWorld.cap i got this error :
    install -file HelloWorld.cap
    file name HelloWorld.cap
    Command --> 80E602001B09A00000006203010C0107A00000015100000006EF04C60201A80000
    Wrapped command --> 84E602002309A00000006203010C0107A00000015100000006EF04C60201
    A80030C859793049B85300
    Response <-- 6985
    install_for_load() returns 0x80206985 (6985: Command not allowed - Conditions of
    use not satisfied.)i ask this question because when i tried to select the applet through its AID, by this script :
    establish_context
    card_connect -readerNumber 2
    select -AID a00000006203010c0101i got this message error : select_application() returns 0x80216A82 (6A82: The application to be selected could not be found.)
    but there's exactly any that AID in my Java Card..
    here's is the list of AID from My Java Card :
    C:\GPShell-1.4.2>GPShell listgp211.txt
    mode_211
    enable_trace
    establish_context
    card_connect -readerNumber 3
    * reader name OMNIKEY CardMan 5x21-CL 0
    select -AID a000000003000000
    Command --> 00A4040008A000000003000000
    Wrapped command --> 00A4040008A000000003000000
    Response <-- 6F108408A000000003000000A5049F6501FF9000
    open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
    f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
    Command --> 80CA006600
    Wrapped command --> 80CA006600
    Response <-- 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864
    886FC6B03640B06092A864886FC6B040215650B06092B8510864864020102660C060A2B060104012
    A026E01029000
    Command --> 8050000008AAF7A87C6013BC0300
    Wrapped command --> 8050000008AAF7A87C6013BC0300
    Response <-- 0000715457173C2A8FC1FF0200937A55C288805D8F2A04CCD43FA7E69000
    Command --> 848201001023CA18742D36165ED992CFF2146C3D51
    Wrapped command --> 848201001023CA18742D36165ED992CFF2146C3D51
    Response <-- 9000
    get_status -element 10
    Command --> 80F21000024F0000
    Wrapped command --> 84F210000A4F004FF8BE1492F7275400
    Response <-- 0CF0544C00004D4F44554C415201000009A00000006203010C010100010AA000000
    06203010C01019000
    GP211_get_status() returned 2 items
    List of Ex. Load File (AID state Ex. Module AIDs)
    f0544c00004d4f44554c4152        1
    a00000006203010c01      1
            a00000006203010c0101
    card_disconnect
    release_contextPlease help me..
    And please correct me if i'm wrong,,
    Thanks in advance..

    Any suggestions for my question?..
    Please help me..
    Thanks in advance..

  • How to install new fonts using code in java?

    Hi,
    How to install font in a system using java, provided i know the font file's address. Is there any specific class/method available for this purpose? Copying the file to windows/font directory will work for windows, but I think it wont be generic to all operating system. So is there anyway to install a font using code?
    I also want to know how to make the font available only until my application window is open, It must be available to all other external applications like photoshop, word etc., When I close my window it must un-install automatically or be made not available to other applications. Any suggestions? Please do help! Thanks in advance...

    I have already tried the above, But the font created using input stream is available only to my application* and is not viewable in photoshop.*. I realize this. Like I said, I know of no method that will register/deregister the font with the system. You'll have to create your own method that takes the operating system into account.
    String os = System.getPropery("os.name");
    if(os.equals("Windows Vista")) {
    }else if(os.equals("Windows XP")) {
    }else if(os.equals("Windows NT")) {
    }else if(os.equals("Solaris")) {
    AIX
    Digital Unix
    FreeBSD
    HP UX
    Irix
    Linux
    Mac OS
    Mac OS X
    MPE/iX
    Netware 4.11
    OS/2
    Solaris
    Windows 2000
    Windows 95
    Windows 98
    Windows NT
    Windows Vista
    Windows XPYou'll need the standard font directory for each system. I think all the window ones are C:\Windows\Font\ . Each OS probably has its own little quark (like having several font directories or throwing different security exceptions). Undoubtly it's going to require some research and a bit of trial and error. You can probably work some magic with Runtime.exec(...) as well.
    The alternative would be to google for some libraries that offer similar functionality, or promt the user for the system's font directory and save the location of the directory in a file somewhere for future use (so the user dosen't have to specify the font directory everytime he/she starts up the application).

  • How to install .exe applications and the java on m...

    hi ! sorry if this has already been discussed but i wanted to know ~~~ how to install .exe applications and the java on my n9 ~~~ ... because i wanted to use plenty of other apps which are not supported  but these 2 would help fix the issue

    Is it stil not possible to install java applications on N9?
    Files containing JAD and JAR-ending in the file name.
    I am not familiar with Nokia N9 so I ask even if I suppose that JAR and JAD files are not able to install on a Nokia N9.
    Nokia 808 again (delight Belle), Nokia E7 and X7 ( again, all on Delight Belle...after some time on Nokia Lumia 925 (retired), 1020 (not that great)and Lumia 820 (Replaced my router at home, great for internet sharing).., N9 The best device ever (use it as much as Lumia 1020), Nokia 700 (Sport Phone/My Love :-) ) Nokia 701, Nokia E6 (Should have a follow-up from Nokia among with larger screen, NFC, Autofocus), Lumia 800 (Retired After 6 weeks), -Sports Tracker-Nokia Internet Radio-Handy Safe-Skype-Bambuser-Screenshot app pro-fMobi-ComingNext-Manual TaskSwitcher-jagiTimer-Easy StopWatch-Boldbeast-Equalizer-Financial Calculator-WiMP Music-YTasks-Davi-Thumbnail Folders-BizCalendar-Tiny7-Situations-nn reeder-Sport Timer-CameraLover-CameraPro-GrabRadio-LiveScore-Poddi-Gravity-SkyFilesPro

  • How to install java in /opt

    Hi,
    I am trying to install java using RPM selfextract package. But it alwasy installs in /usr.
    I am installing on fedora core 3 machine. I dont't have enough space in /usr that's why i want to install in /opt.
    I am downloading the j2sdk-1_4_2_08-linux-i586-rpm.bin in /opt
    and gave rpm -iv j2sdk-1_4_2_08-linux-i586.rpm
    but it always installs in /usr/java/...
    how do i get this installed in /opt??
    I have already preset the env variables to /opt/java/... locations.
    Please let me know as soon as possible.
    thanks
    sri

    I found this link when looking at the installation instructions on java.sun.com. It tells you how to install the sdk in any directory.
    http://java.sun.com/j2se/1.5.0/install-linux.html#self-extracting
    Hope this helps
    Jay

  • Linux, Netscape 7.01 and java plug-in how to install?

    I have J2SE v 1.4.1_01 SDK installed in /usr/java/ directory. Some days ago I installed Netscape 7.0.1 on my RedHat 8.0 Linux. Now if I try to run my simple html page which calls simple java applet, I get message to install proper plug-in. "OK" button directs me to SUN's page where I can download J2SE. But I have one.
    I still don't know how to install plug-in. Trying to create symbolic link:
    ln -s /usr/java/j2sdk1.4.1_01/jre/plugin/i386/ns610/libjavaplugin_oji.so libjavaplugin_oji.so
    in /root/.netscape/plugins and /root/.netscape6/plugins does not resolve the problem. As You see I work as root.
    My Mozilla 1.3a browser works fine. It has java plug-in installed.
    I saw Netscape uses /root/.mozilla directory for storing some information rather then /root/.netscape.
    Could You send me any suggestion? Thank You.

    Thank You leukbr.
    Unfortunately, this not resolved the problem.
    More info about configuration and my activity:
    I start Netscape by clicking on Netscape icon on my gnome desktop.
    The icon has its file in /root/.gnome-desktop directory. File name is Netscape 7.01.desktop (like title under the icon). Line to launch executable has following contents:
    Exec=/usr/local/netscape/netscape
    I changed it to:
    Exec=/usr/local/netscape/set_plugin_start_netscape.sh
    and wrote set_plugin_start_netscape.sh file.
    File /usr/local/netscape/set_plugin_start_netscape.sh has the following contents:
    NPX_PLUGIN_PATH=/usr/java/j2sdk1.4.1_01/jre/plugin/i386/ns610
    set |grep NPX > /root/diag.log
    /usr/local/netscape/netscape
    Second line is used for diagnostic purpose.
    I closed all Netscape windows.
    After launch of the icon /root/diag.log file is created and looks as follows:
    NPX_PLUGIN_PATH=/usr/java/j2sdk1.4.1_01/jre/plugin/i386/ns610
    If I start my html file (which calls java applet), Netscape still displays message:
    This page contains information of a type (application/x-java-vm) that can
    only be viewed with the appropriatePlug-in.
    Clisk OK to download Plugin.
    Hm...

Maybe you are looking for