LWJGL
June 19, 2013, 08:04:35
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL is now using GitHub
Home
Help
Search
Login
Register
LWJGL
>
Programming
>
General Java Game Development
>
Need Help With Java Filesystem and GetDown Please
Pages: [
1
]
« previous
next »
Print
Author
Topic: Need Help With Java Filesystem and GetDown Please (Read 1309 times)
dangerdoc
Regular nerd
Posts: 71
Thats right... Nikola Tesla
Need Help With Java Filesystem and GetDown Please
«
on:
February 22, 2012, 08:24:46 »
In lwjgl, I am programming a game for pc. I am using GetDown to manage the data. How do I put the files in appdata using GetDown? Does Java Filesystem work in relation to the .jar using it? For instance, if I have a jar at C:/program files/java.jar, specifying images/image.jpeg will point to C:/program files/images/image.jpeg?
Can you also use ../image.jpeg to get C:/image.jpeg? Is there a path to specify for appdata, like %appdata%?
Please help me!
Logged
“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
kappa
Administrator
Nerdus Imperius
Posts: 1117
Re: Need Help With Java Filesystem and GetDown Please
«
Reply #1 on:
February 22, 2012, 08:36:22 »
You need to put your images inside a jar file (they are just zip files), and then load it from Java using an InputStream instead of a FileSystem File. Basically the same as you do when using an Applet or Java Web Start.
Logged
dangerdoc
Regular nerd
Posts: 71
Thats right... Nikola Tesla
Re: Need Help With Java Filesystem and GetDown Please
«
Reply #2 on:
April 01, 2012, 16:32:24 »
My question was really an abstract question about managing files outside the jar that need to be changes frequently (example, save files?) About GetDown, How does it know where to put the files for each OS? After it installs the files, how do you tell the app it's location in the FS? Can you specify "../" to get to the .jar's parent folder? Also, I don't understand how you make a program that uses getdown to download/install/update an app. I read the wiki, and OOO labs, but I didn't get it. Could you just tell me how to make a small program that downloads, installs, and launches my app?
Thanks,
dangerdoc
Logged
“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
dangerdoc
Regular nerd
Posts: 71
Thats right... Nikola Tesla
Re: Need Help With Java Filesystem and GetDown Please
«
Reply #3 on:
April 27, 2012, 17:26:53 »
Let me narrow down the question since nobody answered yet. If I have a .jar somewhere in the computer, how do you access files without knowing the .jar's directory? This may be a simple question, but I don't know much about java file management.
Thanks,
dangerdoc
Logged
“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
kappa
Administrator
Nerdus Imperius
Posts: 1117
Re: Need Help With Java Filesystem and GetDown Please
«
Reply #4 on:
April 28, 2012, 03:30:50 »
GetDown will automatically add the jar to the java
classpath
, so all you need to do is call an inputstream to the file in the jar that you want to get.
Logged
dangerdoc
Regular nerd
Posts: 71
Thats right... Nikola Tesla
Re: Need Help With Java Filesystem and GetDown Please
«
Reply #5 on:
May 16, 2012, 09:31:31 »
Is there a way to put files into the .jar while it is running? I really wanted to know how to access saved games while the program is running.
Logged
“We build but to tear down. Most of our work and resource is squandered. Our onward march is marked by devastation. Everywhere there is an appalling loss of time, effort and life. A cheerless view, but true.” - Nikola Tesla
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...