Can someone explain to me what the proper saving procedure in vista is now You cant save to program files as the
I’ll try to do so.
It’s saying “SomeClassType cannot be dereferenced”
Weird.
oh well, fuck it
it builds with eclipse
this may clear some things up http://forum.java.sun.com/thread.jspa?threadID=610638&messageID=3360816
I’m getting a “java.lang.RuntimePermission accessDeclaredMembers” exception in tomcat when trying to use ibatis, do I need to configure tomcat to enable that permission?
seems like a reflection thing, which I want to enable
When you have an Object[] how do you determine how many elements it has?
myArray.length
where myArray is the name of your array.
tell Luke_S about arrays
Luke_S, arrays is http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
has it been resolved in a specific JDK?
today’s xkcd is HILARIOUS.
I must be tired
why didn’t I think of that O_o
Fanook++
~Fanook++
fanook has a karma level of 36, svm_invictvs
heh
note that it’s not a method, it’s a field.
Quick question, with ant, how do I get the current day an time that the build script is being run?
http://www.onjava.com/pub/a/onjava/2001/02/22/open_source.html
hope that helps
tstamp /
but that looks like a good article, lots of info on that subject
still at work?
yes
That’s insane
what’s your time?
Can someone explain to me what the ‘proper’ saving procedure in vista is now? You can’t save to program files as the files actually end up in the hidden virtualstore. The fact it’s hidden means users can’t find the files they’ve saved. Where the hell are we supposed to save things
to?
saving stuff to program files has been ***WRONG*** since at least windoze 2000
try user’s home directory (in docs & settings)
what if i want all users to access the file?
hm.. not sure
I suppose we’re talking about something like configuration files, right?
That’s the problem. I have configuration files to save (for all users, like a license file) and the users create pdf files that they then email off to people
I can’t find a way to make them easily accessible now
in the past I created a Reports folder in my program files\myprogram folder
when you install the program, you could ask the user to pick a location that has access to everyone (either existing or create a new folder, e.g. in the root of a drive)
That seems so cheezy though. I don’t understand why a program can’t keep everything contained within it’s own folder
Make’s things easy to move around. All my read/writes can be done easily as i dont need to search for things either
?
So, is saving to the users documents considered the right thing in windows? Then where do you save in mac?
you can also try the app. data folder for “all users”
I considered that. Most users just don’t know to look there I guess.
Where are you ’supposed’ to save docs on a mac then?
give them a button that opens that folder
and configuration files
any ideas where I can find an algorithm that creates minimal DAGs from trees?
aditsu, not a bad idea
I don’t know about mac..
isn’t a tree already a minimal DAG?
does FileSystemView.getDefaultDirectory() give you the documents folder from 98 through vista?
ugh
it is, but it isn’t minimal
maybe I was not clear enough
how can you make it minimal then? remove all edges?
we can encode an XML into a DAG, so it requires less memory to be held in memory
by representing all identical subtrees with one subtree, and pointing to this tree where it occurs
well, you didn’t say anything about identical subtrees
yeah, my fault
one way to do it is to keep a set of all the subtrees, then for each node you add, check if its subtree is in the set; if not, add the node and then do the same for its children
at the end, you discard the set
a smart hashCode will help
thanks
I will give that a go
how do you create a new instance of a class without a public constructor?
Maybe from a factory method
Is there any Web Mail based on Java
if the class has any ctor, the JVM creates one without params
s/has/has not
no public constructor, just a getInstace() method, i want to make two instances of the class
that’s a design pattern, a singleton
it provides one and only one instance of a class… so that you want to do is bad by design…
i know, but that was not what my question was about
so..
I want so add files to a jar
W/o recreating the jar
tag support that?
I’m trying to decide whether or not I want to have my game specific classes that require persistence to have a method like save() which would take in parameters to properly execute a query on a database to save the player, or to rather have a getSaveQuery() method to return a string
representation of the query to avoid database dependencies on my problem domain classes.
Any suggestions of which is the best way (or a different one)?
maybe the parameters to save() are not needed, becasue everything is already in your Player object?
they woud be variable in you Player class…
So you’re saying have the Player class have a reference to the sql connection and execute it there?
depends, maybe the SQLConnection can be retrieved from another class that provides SQL connections, e.g. call OtherClass.getConnection in Player
does someone know of a toString() plugin for netbeans that can create toString() methods for objects?
That does make sense. Thanks!
maybe that OtherClass can load the jdbc driver and load the JDB settings from a .properties file as well
svm_invictvs, i’m not sure if ant can do this, check the documentation
how do i read in that data sent to my application via stdin?
something like this…. $: echo “Testing stdin” | java -jar myapp.jar
Does the Sun JVM hosting provide some sort of system-wide config file? I’d really rather not have to glue -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider onto every Java-using command on my system.
~pastebin
/jj
I always get a java.lang.NullPointerException while trying to invoke a method from a facade session bean
hello, i’m quit new to java servlet hosting and awt, under an applet, why is there a delay when after clicking a jbutton before the mouseclick listener fires? sometimes i had to click it three times in succession
is there any special requirement for wiring a session bean from ejb-client ?
I’m coding using Netbeans 5.5.1
nanotalk, we generally don’t care if you use an IDE or not, we won’t give specific IDE help
nanotalk, anyway, for an NPE, you read the stack trace and determine what is null
it’s the session bean object
I don’t need to instantiate it on the ejb-client right ?
See nanotalk’s post at http://rifers.org/paste/show/5280
NPE on line #62
private static RectifierLogFacadeLocal recLogFacade; — is null
ejb apparently isnt setting it
hey!,Drone can talk!
alphaomega, do I need to instantiate it manually ?
or it’s suppose to the app. server responsibility?
i dunno, i use spring, swtch over to that and i can help you
hey
what kind of class is this?
I don’t understand what’s your point
okay
how do you instantiate THIS CLASS
RectifierLogClient, how do you build it?
I’m using NB, not build it manually
um
not how do you build the .class, how do you get an instance of this class
RectifierLogClient rectifierLogClient = new RectifierLogClient(“udp://127.0.0.1/8001“);
is it wrong ?
there you go.
Yep.
@EJB only works on classes the *container* instantiates.
ups.. plz teach me
javabot tell nanotalk about aolbonics
nanotalk, aolbonics is talking like a retard using speech as if you were on AIM or using single letters for you, are, you are, you’re, see, etc. Talking like this is frowned upon in ##java and may result in you being silenced. You have a full keyboard so use it. We don’t care if you talk like an
idiot with your friends but we don’t want to sit through stuff like this: http://forums.oracle.com/forums/thread.jspa?threadID=499980&start=0&tstart=0
disconnected ..
so.. I need to instantiate it from another ejb class?
no. @EJB works on container-managed classes… like servlets, JSF managed beans, other EJBs.
app client main class…
andresgr, actually I instantiate it from app-client main class
Hi, I’m having problems with importing. Although I’ve imported my «package».«Classname» I’m still getting «Classname» cannot be resolved. why? if I put the full path to the object into the code i can access it?
must be full path
package.subpackage….class
I thought that’s what I’ve done, infact Eclipse is actually creating the imports for me
i know
eclipse is neat on that
just hit ctrl+space
after the class name
its putting in packagename.*, but it still won’t build if i only refer the the class in the actual code?
don’t do that
~imports
USMarine, import is http://java.sun.com/docs/books/tutorial/java/interpack/usepkgs.html
nanotalk, you can use @EJB only on static members of the main class
OK, i’ll have a read. thanks
Oh, right.
Not talking nonsense after all. Carry on.
hehe
nanotalk, i mean, in an app client environment you can use @EJB *only* on static hosting members of the main class
I read the emphasis there as “only on static members” rather than “of the main class”
uI read the emphasis there as “only on static members” rather than “of the main class”/u
In other news, I really need to figure out IDEA’s refactoring API.
ok
I keep thinking “Wouldn’t it be cool if there was an automatic refactoring to do X?” (and about half the time there is. But the other half would be nice too!)
No, i still don’t get it. I’ve imported MyPackage.MyClass but i still can’t just refer to MyClass in the code, I still need to put MyPackage.MyClass in the code.
i must be doing something stupid
yo
where do i need to place jar files and what are any additional steps for the jre to load in additional jars without me having to specify the classpath?
BrokenNoze maybe the class you are refering to is already imported with the same name from a different package
so java must distinguish both
That would be what the classpath environment variable does. But it’s considered bad form to use it.
it’s considered good to specify it every time?
Well it’s my own package. and I’ve prefixed all classes with Omg ( my application ) but my application uses the package in multiple places however
do i only need to import in one place, or for each class?
in all *.java
damn, I shouldn’t be finding this so difficult
~pastebin
use that site to post your code
Yes. It helps avoid versioning.
because either you’re not getting or i ain’t
err. versioning difficulties
Normally one writes a script or the like to run the program so you only need to write the classpath once then run the script.
of course, i gathered that…i’m just a little used to global installations i gues.
http://pastebin.stonekeep.com/641
Like I say – you can do that if you want using the classpath environment variable. It’s just not considered a great idea.
It’s the COmgXXXTranslator classes that ain’t resolving
ok, thanks
BrokenNoze don’t use .*
import classes individually
delete all those
and when eclipse reports errors
just put the cursor in that line and do ctrl+1
OK, well I’ve done that,k i’ve left “import OmgTranslationClasses.COmgDCATranslator;” but still getting COmgDCATraqnslator cannot be resolved??
ignore bad spellin
then eclipse can’t find it in your classpath
OK, I’m doing something stupid somewhere, i can create an instance fine. it’s because I’m trying to pass it as a parameter. I thinkin i’ve prototyped the function incorrectly. Thanks for your help USMarine
hm, there’s no &&= operator?
does the JLS say there is?
BrokenNoze please read carefully the error detail
I suppose it doesn’t, I’ll take a look
I did, it says can’t be resolved, but if i create an instance without including the full path it works fine. So the error message must be wrong somehow.
BrokenNoze write the fist few letters of the class and then ctrl+space
this will prevent spelling error
*s
oh, I guess &= does what I expect (for boolean)
Yeah, I’m a delphi man, used code completeion all the time
I had to pass the class as (myclass.class) AND IT’S FIXED THE PROBLEM!
sorry not meant caps
oh, I can write this another way, then I don’t need the operator
andresgr, I just wondering, is it possible to access ejb from multithread app-client ?
what do you mean with “multithread app-client”?
how do you calculate pow(a, b), where a and b are ints?
I am looking for something like C’s ^
or Math.pow
but for ints
the ^-operator in C is XOR, just like in Java
andresgr, actually I want to create a logger application; I have some machines, I want to create a logger thread for each machine
ok, I am looking for power in Java
Math.pow(a, b), where a and b are ints
use BigInteger
come on man!
kidding me?
not really, no
why do you think so?
I want to work with primitives
I don’t want create objects
what kind of powers do you expect to calculate with ints?
return (int)Math.pow(a,b);
with the occasional CatastrophicUserIdiocyException when the product is a tad too big
deebo, I thought about that, but it sucks in its own way
tazle, 100^1, 100^2, … 100^n
what is the difference between “ant deploy” and “ant install” in general ?
well that depends totally on what the build.xml contains
it’s a shame StringBuffer has an append() but not a prepend() !
its not written in stone
it has an insert(9
where n 5?
ya, I understand that… but just wondered if deploy means something different from install semantically
deploy is deploy and install might create an installer and run it or something
yes
hmm
has anyone used the ant export of eclipse fat jar host plugin succesfully?
wlfshmn, what about replace?
i mean, sure it exports a build.xml, but it uses nonstandard build events (e.g. fatjar.build)
The javadoc is availible you know
wlfshmn, it performs a different task than String’s replace function.
that sounds rather limited – may I ask what is ther purpose of this?
Hm. That’s rather annoying. :-/
The Idea M2 release appears to have a bug in it when trying to debug plugin projects.
Hm. Conveniently it also has a bug in the conflicting registration IDs code, so I’m ok.
tazle, no prob
I just used Math.pow
but that’s really ugly
guys, do you know if “top-tier” as in “top-tier inverstors” has some specific meaning? or it’s just like saying “bla bla bla investors”?
i mean, is “top-tier” some financial technical term?
mojojojo_ – netsplit over
yikes