Author Topic: eCs_Java6 Apps Pack  (Read 29642 times)

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
eCs_Java6 Apps Pack
« on: April 26, 2015, 06:32:56 pm »
I started to update my Java6 page and got sided tracked.

I put together a pack of my favorite Java apps, it contains the latest or last versions that work with Java6.
(see pics below for which programs are included, first pic is os2 icons & second is png icons).

*** MAKE SURE TO EDIT THE JAVAHOME directory ***

JavaHome = ProgramsDir || '\OPENJDK6'


user: os2user
pass: os2

ftp://os2notes.duckdns.org/

Usage:  run install only once, separate scripts are included if u need to recreate the icons. Just delete the ones that you don't want and move the programs directory to your choice of location. After that you can delete the whole thing (keep the separate scripts though & the icons).



Also it would be nice get some help adding your favorite Java apps - here's a template & include the links too.


Code: [Select]
CreateObjects:

rc = CreateObject( 'WPProgram',,
    'jAlbum',,
    '<WP_EJAVA>',,
    'NOTDEFAULTICON=YES;'||,
        'NOPRINT=YES;'||,
        'DEFAULTVIEW=RUNNING;'||,
        ';'||,
        'ICONPOS=2,12;'||,
        'ICONFILE='||CurrentDir||'\icons\os2\jalbum.ICO;'||,
        'EXENAME='||JavaHome||'\BIN\JAVAW.EXE;'||,
        'STARTUPDIR='||JavaProg||'\JALBUM;'||,
        'PARAMETERS=-Xmx400M -jar JAlbum.jar;'||,
        'PROGTYPE=PM;'||,
        'OBJECTID=<JALBUM>',,
    CreateCollision )

return


Cheers,

Greggory
« Last Edit: April 26, 2015, 07:26:08 pm by Greggory Shaw »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4711
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: eCs_Java6 Apps Pack
« Reply #1 on: April 27, 2015, 01:14:48 am »
This is a great initiative Gregg.

I will be checking this file tonight !! thanks for sharing.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #2 on: April 27, 2015, 06:04:15 pm »
I tried downloading it earlier but the server was not found :(

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #3 on: April 27, 2015, 09:07:28 pm »
Oops the first eJava.zip had the unzipped files left in 120mb (so just select replace all (A) at the zip dialog).

I uploaded a new version eJava-002, (only 52mb) without the extra files, sorry ! And added jBlue, Jarnal, (removed Netbeans)

Dave the server should have been up (busy ???), anyways it's up now with a better version :)


*** MAKE SURE TO EDIT THE JAVAHOME directory in the Install_eJava.cmd script *** - the other scripts are optional, and are for recreation of icons if needed.


user: os2user
pass: os2

ftp://os2notes.duckdns.org/

Usage: After the install you can move the program directories out of \RES\JAVA  to your choice of location, then you can delete the whole thing \eJava-002 directory or keep it.


Greggory

« Last Edit: April 28, 2015, 01:55:17 am by Greggory Shaw »

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #4 on: April 27, 2015, 10:27:19 pm »
Could a REXX guru upated Run_Java for Java 6 & Java 5.07 ?

Description:
creates java13/131 and/or java14 program objects

Long Description:
drag-n-drop creation of java program objects Just drop a .jar file on the object to create a program object to start the .jar file or double-click a .jar file to start it... New version has more flexible options.

(not working with eCS 2.2)

http://hobbes.nmsu.edu/download/pub/os2/util/wps/run_java__20030526.zip

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #5 on: April 28, 2015, 02:18:04 am »
Greggory

As a result of this post I addressed a ticket for FM/2 to make objects for JAVA programs. Since I only use JAVA for SmartSVN/CVS/GIT I haven't actually made any objects for JAVA programs. I have the FM/2 code (C) working based on your REXX scripts. What I would like is some advice on my design choices. Currently I first look for JAVAW.EXE in the path since that is how eCS 2.2 installs JAVA6. If I don't find it I look for JAVA_HOME and if I don't find it the jar file object will be made into a data object. The object is made by selecting the jar file and selecting real object from the object menu.I still have an issue with the icon disappearing when I open the object in properties view. Hopefully I can resolve this.

Currently, the object parameters are simply -jar PATH/FILE.JAR.. Right now the icon file must have the same name as the jar file and be in the same directory. Do you have any suggestion regarding ways to improve this setup. This needs to be generic since every time I address  another possibility the code becomes more convoluted. Thanks

Gregg   

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #6 on: April 28, 2015, 07:43:11 am »
Greggory

...

Do you have any suggestion regarding ways to improve this setup. This needs to be generic since every time I address  another possibility the code becomes more convoluted. Thanks

Gregg

Sound great - One thing though.

You talk about the way eCS 2.2 is setup, does eCS 2.1 have the same setup with Java1.42 ?  eCS 2.2 may never come out, so you may check it with eCS 2.1.

Thanks for all the hard work with OS/2 !

Greggory

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #7 on: April 28, 2015, 10:35:17 am »
This script (extension has to be renamed to .cmd) should install itself and let you add .jar files you click on to the desktop with standard parameters. It use text files you can write yourself to add your language.

Place a .ico-file with the same base name as the .jar-file to get a nice icon on the desktop program object.
jDownloader.jar + jDownloader.ico

I don't know how to add a .png image to the program object, so the script lack that feature.
Anyone?

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #8 on: April 28, 2015, 04:18:23 pm »

...

I don't know how to add a .png image to the program object, so the script lack that feature.
Anyone?

The png icons are featured only in eCS 2.2 and have to manually added.

Thx for the script !  Wondering if you could add http://hobbes.nmsu.edu/download/pub/os2/util/wps/run_java__20030526.zip to your script, since this isn't maintained any more ?


Greggory

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #9 on: April 28, 2015, 05:21:48 pm »

...

I don't know how to add a .png image to the program object, so the script lack that feature.
Anyone?

The png icons are a feature in eCS 2.2 and have to be added manually to the bigicon.txt config file.

« Last Edit: April 28, 2015, 05:27:52 pm by Greggory Shaw »

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #10 on: April 29, 2015, 07:59:59 am »
The png icons are a feature in eCS 2.2 and have to be added manually to the bigicon.txt config file.

You can get png icons on your desktop separately on earlier versions of OS/2-eCS as well, but it was included with eCS v2.2.

Yes, but how do I add these png icons to each wps object with a script and not by hand?
I'd prefer a ...;OBJECTID=<...>;ICONFILE=...;BIGICONFILE=...; to the function that create objects on the desktop.

Please do adjust javarun.cmd and add a "(" (left paranthesis) in 2-3 places right after a VALUE.

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #11 on: April 29, 2015, 08:47:46 am »
The png icons are a feature in eCS 2.2 and have to be added manually to the bigicon.txt config file.

...

Yes, but how do I add these png icons to each wps object with a script and not by hand?
I'd prefer a ...;OBJECTID=<...>;ICONFILE=...;BIGICONFILE=...; to the function that create objects on the desktop.


Since your script creates the OBJECTID as <WP_JARFILE> when creating the jar program icon on the desktop.

Have the script:

- copy the jar_icon.png from the desktop to the the \ecs\icons\bigicons directory
- have the script find the section [OBJECTID] in the bigicon.txt config file, then add the OBJECTID as <WP_JARFILE> under that section.
- restart WPS

Code: [Select]
[OBJECTID]
"<WP_JARFILE>"      "jar_icon.png"


I don't think there's a ;BIGICONFILE=...;  option only the above.

And it would be grest if you could add an option for making a Java 1.4 Object !
« Last Edit: April 29, 2015, 08:59:15 pm by Greggory Shaw »

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #12 on: May 01, 2015, 09:19:54 pm »
I've modified my script and it can now add .png-images to the bigicons folder and rewrite the configuration file before it add a program object and launch the java app. I've tested BlueJ and JSoko and both start and run, white BlueJ seem to need something more.

Place your .ico and .png next to the .jar-file with the same base name to get a nice program object on the desktop.

What's the output from java.exe -version in GoldenCode java 1.4.1.07 and Innotek java 1.4.2?
Additional rows to the one below should be added to support those versions.
java_2_dir = rxFind( 'JAVA.EXE', ' -version', 'OPENJDK VERSION "1.' )

//Jan-Erik

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #13 on: May 02, 2015, 08:55:58 pm »
Sound great - One thing though.

You talk about the way eCS 2.2 is setup, does eCS 2.1 have the same setup with Java1.42 ?  eCS 2.2 may never come out, so you may check it with eCS 2.1.


While I don't know the answer to this, it prompted me to take a different approach. I now open a file dialog and let the user find the javaw.exe they want to use. They only need to do it once because I save it to fm2.ini. They can change it using a menu item anytime they wish. I also just let them find the icon file they want to use which would allow someone to use a png as well.

Gregg

Joop

  • Hero Member
  • *****
  • Posts: 633
  • Karma: +5/-0
    • View Profile
Re: eCs_Java6 Apps Pack
« Reply #14 on: June 12, 2015, 04:50:49 pm »
Why going this difficult way? I use cmd files. In this way I can use every Java version which is available to OS/2. Its no problem to start programs with Java 1.4.2 or Java 6 version 5 if the program in question demands a specific version. Also program specific options are easily added.

Joop