• Post Reply Bookmark Topic Watch Topic
  • New Topic

Best way to deploy an app with html and images files  RSS feed

 
Ranch Hand
Posts: 101
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I've made a small app Just for practice purposes.
You basically paste a url Into a textarea and choose an Image for the link.The Image link Is then appended to a html file.

I'd like to put everything In a single jar file but I'm not sure what to do so the user can access the html file.
The only two options I can think of are:

a) create the html document on the fly when the jar runs.
b) Is to run a bat command when the jar Is executed that will extract the jar files.

The user can either choose from a number of Images In the logos folder for common websites or add new Images.
Since the folder isn't empty , It seems like extracting the jar files Is necessary.

I must be missing something here because neither option seems practical.Would a zip file be the best solution In this case ?
 
Sheriff
Posts: 4935
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikolas Nikolaou wrote: I must be missing something here


Probably the clarity at this point.

I don't get many points. I might wrong, but it doesn't sound clear those things stated below:

Nikolas Nikolaou wrote:You basically paste a url Into a textarea and choose an Image for the link
- where you get those images from?
I'm not sure what to do so the user can access the html file
- where this html file is located? on your local machine or server which could be retrieved by typing url?
create the html document on the fly when the jar runs
- what kind of content this html document should contain? if it is created "on the fly" is it just empty html document?
The user can either choose from a number of Images In the logos folder for common websites or add new Images
- ? Might just paste the code over here, at least would be more clear about what kind of problem we are talking about
 
Bartender
Posts: 1840
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My suggestion would be: Don't bundle your data (the HTML file) in the jar file.
Let the user either specify an HTML file somewhere, or create one for them.

Your jar file should contain your executable java code and resources that it needs to run. you should never need to modify the jar or any of the files in it at runtime.

 
Nikolas Nikolaou
Ranch Hand
Posts: 101
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
- where you get those images from?

-The Image folder already contains some logos for common websites like youtube , google , gmail etc.The user can either choose one of those or search and download their own logo and save It In the Images folder.

- where this html file is located? on your local machine or server which could be retrieved by typing url?

-The html file will be on the users machine.They'll either access It directly or I'll set It as their browsers homepage with a REG file.

- what kind of content this html document should contain? if it is created "on the fly" is it just empty html document?

-The html document will Initially have a title ("SiteHub") and the opening,closing html,body tags. Href links with Images will be added everytime the user saves a new link and chooses a logo.

Currently on my pc , I have 'Images', 'HTML' and a Jar file(contains only class files) within a single main 'SiteHub' folder.


What I've done so far Is to create a bat file when the Jar runs that extracts the Images and Html folders.This solution seems to be the best one I can come up with at the moment

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!