Need help loading code
I have been working on a "console" application for text-based games. So far I have been able to make the GUI okay, and everything is theoretically okay, but the special thing about my console is that it will be able to load a jar file and interact with the user based on a special class that the jar file is theoretically named after. The class, in theory, is a subclass of an abstract class included with the library I created.
The problem is, I am stumped on how to load the jar file and find out what classes are included. I know it should use a Class object, but how do I find out the names of the ".class" files included and if they are subclasses of my special abstract class, and how do I load them? There is no static Class <?> object from an InputStream or a File in the Class documentation.
In other words, how do I load a class(which I did not import) from a jar file?
If I can not find a solution to my problem, my Console will have to be mac-only. There is nothing wrong with that, but I know that most of the people who would be interested in developing for my console are more likely to have a PC instead. Does anyone have any tips?
javaonamac1 wrote:
Does anyone have any tips?Java includes API for opening zip/jar files so you can determine what class files exist in a jar archive file.
Similar Messages
-
Maestro need help also code is 75957252
maestro need help also code is 75957252 for bios password reset
This question was solved.
View Solution.Try
60635894
****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
2015 Microsoft MVP - Windows Experience Consumer -
Maestro need help also code is 75957252 for bios password reset
maestro need help also code is 75957252 for bios password reset
This question was solved.
View Solution.Check your other post. I replied there.
****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
2015 Microsoft MVP - Windows Experience Consumer -
Need help loading DLL in labVIEW project
I have a DLL that was written in C# that I want to load it to my labVIEW project. I have never done this before, so I need help. I chose Connectivity-Call Library Function Node then loaded my DLL. After, under function name, I typed in the function name from the code. I don't know what to do with other like Parameters.
They don't let me attach dll file
Can someone explain how to set the parameters and etc?Well, it seems that you really need to learn quite a bit about .NET (ActiveX is very similar!) first.
The constructor node in your code creates an object in your .NET CLR (Common Language Runtime). This object exposes properties and/or methods. Use Property Node(s) and Invoke Node(s) to access these. Usually, you get references to other objects which you can work this.
Remember the golden rule for ActiveX and .NET:
Close all references you created in your LabVIEW code on your own (using Close Reference)!
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
Hi friends,
I need help to get the java code to be used in netbeans 5.0
I have to develop:
1. Merge files using JFileChooser in netbeans 5.0
2.Create files in the format .html, .doc, .pdf, etc
3. Browse the file and attach to the MS Outlook
Can anybody help me out plz to get the code for this or any reference from where I can understand the code for the same.
Edited by: vinodmatlani81 on Oct 28, 2007 2:05 PMYou must be using an old Google version, mine found lots of stuff:
1. Merge files using JFileChooser in netbeans 5.0\\
Depends on what you're merging, but here's Sun's basic IO tutorial: http://java.sun.com/docs/books/tutorial/essential/io/
How to use the JFileChooser: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html
2.Create files in the format .html, .doc, .pdf, etc\\
For HTML, see the basic IO tutorial.
PDF: http://www.lowagie.com/iText/
DOC: http://schmidt.devlib.org/java/libraries-word.html
3. Browse the file and attach to the MS Outlook\\
http://www.sun.com/software/products/calendar_srvr/connector/index.xml -
I need help loading a swf file in a flash website
Hi,
I am an interactive design student working on a flash portfiolio and need help. I can't figure out how to load a game I made in flash into my porfolio so that it loads after clicking on a button, becomes playable, then have a button to leave the game and go back to my portfolio. I'm working in Actionscript 2.0 because that's all my teachers will show me and I have minimal actionscript knowledge.
Thanks,
EmilyI thought I got it to work with loadMovie, but it only plays the intro, and then either repeats or exits as soon as the first bit of actionscript starts
-
Need Help Loading SWF in a FLA
I simply want to call a swf into an existing fla. I have
tried everything. When dragging the timeline, you see the swf. When
you preview, it is not there. Background - I have an exisiting fla
that contains the image background for all. I want to set a
transparent carousel menu on top of the background that is in the
fla and leave the existing background and lower objects in place.
The carousel.swf will need to call java and an xml file on the web
server.....all external to the "summed" final. If I could layer
flashed in DW, then the problem would also be solved. Please be
detailed, I am obviously not a developer.although I'm not certain why you would not just 'place' the
background 'image' on the stage in the fla (probably because you
wish to change it dynamically down the road) - you need to 'load'
the swf, not 'place' it within the other file. you do this with the
MovieClipLoader class.
with the swf that you wish to load in the same directory as
the swf of the carousel file, place something like the following in
the first frame, on a layer called actions, in the actions panel: -
Need help loading data from Excel data file to oracle tables
i need to load an Excel spreadsheet to Oracle table.
The spreadsheet contains 20 columns, the first 8 columns contains basic info, but the rest 12 columns contains info like
1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10
So what i need to accomplish is:
break that one record(with 20 fields) in Excel to 3 records for each fiscal year in the Oracle table, so each record in the database table will look like
8 basic field + fiscal_year + 1stQtr_08, 2ndQtr_08, 3rdQtr_08, 4thQtr_08
8 basic field + fiscal_year + 1stQtr_09, 2ndQtr_09, 3rdQtr_09, 4thQtr_09
8 basic field + fiscal_year + 1stQtr_10, 2ndQtr_10, 3rdQtr_10, 4thQtr_10
There are about 10000 rows in the data file, so how can i use sqlldr to perform such task? beside sqlldr, any other good suggestions?
thxExternal Tables is just an Oracle API for sqlloader. If you going to load this data over and over again, External tables would be a good idea, but if it's a one time thing, sqlldir is simpler, unless you just want to learn how to use External Tables.
I used to run a data warehouse, so I have done, at least similar, to what you are doing in the past. -
Still need help :( loading outside files in actionscript
Ive been all over the forums online trying to get this
problem fixed and no one has really settled it for me (its been
MONTHS)
So I'm going to attempt to be as in depth as possible and
post code as well.
Heres the deal- its a portfolio site, www,darrenlasso.com
The problem is when i load multiple swf files into levels.
When i first call on an outside swf from a button inside the main
file the code looks something like this:
on(release){
_level1._visible=false;
loadMovieNum("cover.swf", 1);
cvrbtn._visible = false
acibtn._visible = false
When from inside THAT file, I want to return back to the MAIN
navigation file, the code looks more like this:
on(release){
mcl.addListener(mclListener);
mclListener.onLoadInit = function(mc:MovieClip){
mc._visible=true;
mc.gotoAndPlay(76);
_level1._visible=false;
mcl.loadClip("darnen.swf", 1);
Ive messed around with the code so many times now trying
everyones different suggestions that i dont even know if that is
the code I have live right now but i know its not working how i
want it to. The problem seems to be that i can only load into level
1, and when i do that, going between these various calls on outside
files there is a 'flicker' of a frame or two of the OLD previously
loaded file that will play BEFORE the new one initiates. As this is
a portfolio site it needs to be polished so i can't have stuff like
this plaguing it. Its been unfinished for months now because i just
can't figure it out. Please please help me if you can.. hopefully
you like a challenge because i just havent been able to get the
help i need from anywhere else :/when i load the swf from outside, i want it to then be able
to return to the main navigation file which i guess would be level
0. So does that mean that the code for buttons navigating back to
the main flash file would be more like:
on(release){
mcl.addListener(mclListener);
mclListener.onLoadInit = function(mc:MovieClip){
mc._visible=true;
mc.gotoAndPlay(76);
_level1._visible=false;
mcl.loadClip("darnen.swf", 0);
As i load in all these different files from outside I've been
loading them all into level 1 because that seems to be the only way
to get them to display at all with the code I'm using. I assume it
might be better to load them all into individual levels? I'm not
sure. I'm still just kinda learning AScript as i go along.. -
Need help loading xml parameter into component
I am using a third-party flash component (no source access)
that takes in a location of an xml file and manipulates it. The
problem is, I want that file's location to be dynamic and be loaded
from an argument to the end .swf that can then be forwarded to the
internal component. How can I load a component at runtime and set
it's xml_file parameter before/during construction of the object? I
have tried to drag it to the stage from components and change the
xml_file parameter in actionscript directly, but by the time this
change gets triggered the xml has already been read in and it
doesn't work.
This may be really simple, but I just can't figure it out. I
would appreciate anyone who could help. Thanks.First, set the size of the component with the setSize method,
not "height" and "width". That may be the entire source of your
problem.
e.g.: this.componentInstanceName.setSize(175, 175);
Second, I am unsure all the parameters you specify in the
initialization object are valid {x:10, y:10, height:20, width:20,
font_color:'#333333', player:"vidPlayer", xml_file:"list.xml"}.
Only put in the initialization object parameters that are valid for
the component you are instantiating.
Third, make sure you are specifying the correct import
statements for your component at the top of your code. Since it is
a custom one, I can't help with knowing what to import. The code I
attached in my first post assumed import statements and the
components needed in the library, but here are the import
statements that I used:
import mx.controls.*;
import mx.containers.*;//for scrollPane
import mx.styles.CSSStyleDeclaration;
import mx.transitions.easing;
Fourth, don't forget the ignoreWhite method for importing XML
into Flash:
XML.prototype.ignoreWhite = true;// sets ignoreWhite
globally -
Need help loading .swfs one by one, in specific order
i have been trying to figure this out for weeks now, and have
even posted on other forums about this, but nobody seems to be
willing to help me. i have a main swf, which is the basis for my
image gallery. once this page loads, a thumbnail should start
loading with a preloader displaying the precentage loaded. once the
percentage hits 100%, the image shows up, and the next thumbnail
starts, and so on. there are 15 thumbnails total that have to be
loaded. each one should load with a 10 pixel gap all around, and i
want to have 5 images load per row. i think i need to create empty
movie clips for each thumbnail to load into, but i'm not sure.
hell, i don't even know how to code this so it will work correctly.
would someone be willing to put this together for me? i am a
beginner actionscripter, and if people simply tell me "add this
line in so this will happen," i will have no idea what to do, so
that is why i need the code put in for me. i'm hoping someone here
is nice enough to do this for me, because being ignored on two
other forums has made me just want to say "screw it."
so PLEASE, can someone help me?
i have uploaded my files into a .zip file. i have only
uploaded 6 of the pictures, so that i can see if the code (that
someone will hopefully make) works when i asked for 5 thumbnails
per row.
file is located here:
http://www.arielseri.com/fla_files.zipi completely understand. i've actually come up with a
semi-working solution!
i have 15 thumbnails total, but when i play the movie, all 15
load on one line and after 5 show up, the rest go off the stage. i
would like to set it up so that there are 5 .swfs per row. i have
one main .swf file, and two .as files. the code for each is as
follows (the ========== is just to separate the code):
main .swf code (called test.swf):
==========
fscommand("fullscreen", "false");
fscommand("allowscale", "false");
// A container clip for our thumbnails
var thumbnails_mc:MovieClip =
this.createEmptyMovieClip("thumbnails_mc",
this.getNextHighestDepth());
// An array holding the paths to our thumbnails
var thumbnailPaths_arr:Array = ["1.swf", "2.swf", "3.swf",
"4.swf", "5.swf", "6.swf", "7.swf", "8.swf", "9.swf", "10.swf",
"11.swf", "12.swf", "13.swf", "14.swf", "15.swf"];
// Our ThumbnailManager
var thumbnailManager:ThumbnailManager = new
ThumbnailManager(thumbnails_mc, thumbnailPaths_arr);
==========
ThumbnailManager.as code:
==========
import Thumbnail
class ThumbnailManager
private var counter:Number = 0;
private var root_mc:MovieClip;
private var thumbnailPaths_arr:Array;
public function ThumbnailManager (target:MovieClip,
paths:Array)
root_mc = target;
thumbnailPaths_arr = paths;
(thumbnailPaths_arr.length > 0)? createThumbnail() :
null;
private function createThumbnail ():Void
var thumb:Thumbnail = new Thumbnail(this,
thumbnailPaths_arr[counter], root_mc, counter);
counter++;
public function onThumbnailLoaded ():Void
if (counter < thumbnailPaths_arr.length)
createThumbnail();
else
==========
Thumbnail.as code:
==========
import AsBroadcaster
import ThumbnailManager
class Thumbnail
public var addListener:Function;
public var removeListener:Function;
public var broadcastMessage:Function;
private var thumbnailWidth:Number = 88;
private var thumbnailHeight:Number = 61;
private var thumbnailOffsetX:Number = 10;
private var thumbnailOffsetY:Number = 10;
private var view_mc:MovieClip;
private var image_mc:MovieClip;
private var loader_mcl:MovieClipLoader;
public function Thumbnail (manager:ThumbnailManager,
url:String, target:MovieClip, d:Number)
AsBroadcaster.initialize(this);
this.addListener(manager);
render(url, target, d);
private function render (url:String, target:MovieClip,
d:Number):Void
view_mc = target.attachMovie("thumbnail", "thumb_"+d+"_mc",
d);
view_mc._x = (d * thumbnailWidth) + (d * thumbnailOffsetX);
view_mc._y = 0;
image_mc = view_mc.createEmptyMovieClip("image_mc",
view_mc.getNextHighestDepth());
image_mc._x = 0;
image_mc._y = 0;
loader_mcl = new MovieClipLoader();
loader_mcl.addListener(this);
loader_mcl.loadClip(url, image_mc);
public function onLoadError (target:MovieClip,
error:String):Void
broadcastMessage("onThumbnailLoaded");
public function onLoadProgress (target:MovieClip, bL:Number,
bT:Number):Void
public function onLoadInit (target:MovieClip):Void
broadcastMessage("onThumbnailLoaded");
==========
can anyone help me out with what code to put where? i have
uploaded a .zip file which contains all of the files here:
http://www.arielseri.com/thumbnails.zip -
Need help Loading images with selection on a form field?
So I'm kind of a newb.. I can do basic forms but I need to set up a form field drop down box that will give me the ability to load images correlating to the users choice. I'm at a total loss for where to start, so ANY help would be appreciated. If you know of any good books or tutorials on the subject please share.
Thanks in advance
Sincerely,
Stumped4nowP.S. I think I'm getting a better understanding of OCGs after lots of research today. However I still seem to be missing something
var docOCGs = this.getOCGs();
for (var x=0; x < docOCGs.length; x++)
if(docOCGs[x].name == "Layer1")
docOCGs[x].state = !docOCGs[x].state; -
Need help with code for adding dates to form
Hello forum goers
I'm new to making forms and figured out how to auto add the date, however I need the form to change the date for every copy made.
For example today is 06/08/2012 if I print 10 copies of the form it will output 10 pages ranging from 06/08/2012 to 06/17/2012. If code exists to do this I would be very gratefull to whoever helps, I also wouldn't mind if that is not possible for manually inputing the start / end dates.
Currently I print 15-30 copies of the form and hand write each of the dates but I'm just getting to busy to do that. I also cannot print one a day it must be in batches.
Thanks in advanced.What you are asking for is more complex than just setting the current date. Each time the form prints it has to know that it has to change the date. I would suggest doing this.
First, setup a document level script to set the date to the current date. I suspect that you have already done this?
Next, Create a "DidPrint" document action to increment the date. To do this the script will need to scan the current text value of the date, add one day to it, and then reformat it. You'll find information on this type of scripting in these articles:
http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
ipt
http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
ipt-part-2
http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
ipt-part-3
Since the increment happenes in the Did Print you will need to print each copy individually. If you enter 10 copies in the print dialog it won't work. You have to print one at a time. You can automate this activity with a console script.
One of the advantages of incrementing in the DidPrint is that you can also manually enter a date and it will increment from there.
Thom Parker
The source for PDF Scripting Info
pdfscripting.com
The Acrobat JavaScript Reference, Use it Early and Often
Then most important JavaScript Development tool in Acrobat
The Console Window (Video tutorial)
The Console Window(article)
Having trouble, Why Doesn't my Script Work? -
Need help loading an external SWF
I'm not very proficient in Flash, so any help will be greatly appreciated. I'm trying to load an external SWF with the following code:
T1_Bttn_BloodCar.onRelease = function() {
t1_images_mc.loadMovie("images/T1_Gallery/BloodCar_SWF/T1_BloodCar.swf");
t1_images_mc._alpha = 0;
It loads the SWF, but doesn't play it correctly when I test it. Here's how the loaded movie is supposed to look:
http://www.theroboteye.com/T1_BloodCar.html
But instead, it plays without the transitions, like this:
http://www.theroboteye.com/TRE2009b.html
I've been trying to figure this out for a few days and have tried adding "this._lockroot = true;" to the SWF I'm trying to load, but I can't get it to play correctly. Can anyone tell me what I'm doing wrong? Thanks in advance.Try using the MovieClipLoader class (loadClip method) instead of the loadMovie method. That way you can have a listener that waits for the movie to be loaded and then pull it into play, assigning actions and properties to it after the fact.
-
Need help loading help files in Crystal 8.5
Hi,
I have installed, reinstalled using the CD and still am unable to load or at least retrieve my help files. I can't seem to find any threads which reference the problem. I have used the wizard to install, yet can't seem to find them. Can someone help me? I can provide my phone number if possible.Here is a sulution which worked for me :
Run "regedit"
Expand the registry key: HKey_Local_Machine | Software | Seagate Software | Crystal Reports | Help.
Expand the subkey that is named after your respective language code. For example, for English, the subkey is named 'En' and for French, the subkey is named 'Fr'.
If the registry subkey is
" C:\Program Files\Seagate Software\Crystal Reports\Help\<your language code>, then set the value for the 'Format' registry entry to "0x00000002 (2)",
else if it is
" C:\Program Files\Seagate Software\Crystal Reports\Help\<your language code>\HTML, then set the value for the 'Format' registry entry to "0x00000003 (3)".
Maybe you are looking for
-
How do I find the number of contacts in a smart group?
How do I find the number of contacts in a smart group in Contacts?
-
No unpaid tax lines exist for the given selection criteria while+J1inchln
Hi All, While doing J1inchln I am getting following error. No unpaid tax lines exist for the given selection criteria. Message no. 8I702 Diagnosis The corresponding withholding tax line &1& is not present in WITH_ITEM table. System Response For withh
-
Acrobat Pro 9 will not accept serial number
When I install Acrobat Pro 9 on Windows 7 x64 I recieved the error message invalid serial number. I have called and verified that the number is valid. This serial number is part of the CS 5 Design suite. The application will install in the trail
-
What is the good way to name the variable name? my method is first 3characters is datatype : int intNumber; String strName; JButton btnGo;Any comment for my naming conversion? I think all expert java programmers not like this right? why?
-
Photoshop Elements 11 timing out
I am trying to download the trial version of PS11 hoever it keeps timing out about a third of the way through the download, I have tried several times and it fails approximately the same place each time, any ideas???