• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

Comman JRE for all OS

Hi experts

i have an client application made using java swings
while deployment on user machines (some are windows and some are linux)
i copy the whole jdk inside the app folder and avoid using
JRE installed on thatmachine.another reason for this is my app requires jdk bcos
jasper reports need the java compiler for compiling the report files at runtime
and JRE does not contain javac compiler

/myapp/jdk1.4.2
/myapp/conf
/myapp/reports
/myapp/images
/myapp/myapp.jar  the executable file
etc......

now the issue is on linux i have different jdk folder(containing shell scripts) and
on windows i have diffent jdk folder(containing exe's
this is make my life miserable as i have to maintain 2 copies of source and 2 separate
folders for differnt users so that they are not confused
and when i upgrade my version of app the user takes the backup of whole app folder
which is consuming disk(redundant files for images and other folders)

is there a way i can create a single installation folder for both OS

pls help
0
Econify
Asked:
Econify
  • 6
  • 4
2 Solutions
 
Mayank SAssociate Director - Product EngineeringCommented:
Well, the JRE is different for different machines, if you understand the concept of JVM and why Java is platform independent, why source files are compiled into class-files or byte-code and why they are interpreted by the JVMs specific to the platforms.
0
 
sciuriwareCommented:
No, or you would have to rewrite everything in pure JAVA yourself.

;JOOP!
0
 
Mayank SAssociate Director - Product EngineeringCommented:
And the JDK for each platform is different too :)
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Mayank SAssociate Director - Product EngineeringCommented:
>> different for different machines

I meant different platforms.
0
 
sciuriwareCommented:
Better verify that the client-machine has a JDK or automate the downloading and installation of the proper JDK.

;JOOP!
0
 
EconifyAuthor Commented:

hey mayank

i dont know much about JVM,s ,byte-code and platforms as much u know
i think are quite a expert
so instead of writing why...why...why
try to explain the issue

well i guess there a solution....not sure
if i merge the two jdk 1.4 folder then the bin folder will have
the exe's for windows and the scripts for linux
this way windows clients will pick what it requires and linux will get what it wants for running the app

how bout that

any ideas.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Well :) that's why I asked 'if' you understand ;-)

Java is platform independent because it follows a 2-way process. First the source-code is compiled into byte-code which is like an optimized set of instructions. This byte-code is same for all platforms. Then an interpreter interprets this byte-code into platform-specific native code (hence, the interpreter has to be platform-specific). Even the size of primitive data-types are same on all platforms unlike C/ C++.

>> if i merge the two jdk 1.4 folder then the bin folder will have

Well, that's a bad work-around :) what will you do if some client uses Mac later? Add another folder? I don't think that's the right solution. Will need to think more for this.
0
 
sciuriwareCommented:
Yes, Mac, and how about Motorola, VAX, Solaris, HP-PA .... all other versions with another JDK needed.
......... and if new JAVA versions are released?

Take care that the client or customer installs the right JDK,
rather than that you carry everything with your software.

;JOOP!
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Exactly, you should put JDK as a requirement (pre-requisite) for your application to run. Then depending upon the SLA (service-level agreement), it is either the client's technical group's job to install them on each system where the application is to be deployed, or yours.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
The JDK also needs to be 'installed' over the OS, so simply copying the files into a directory will not help.
0
 
sciuriwareCommented:
:<)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now