I dont know how to ask the question Basically I can write Java for this device but only if I purchase this rather

so is firefox

but firefox is a memory hog even now

i got enough RAM, plus no other browser has the extensions i need

morning

Hey jottinger. :3

Hi everyone!
How would I get localized month names in Java?
No calendar, no DateFormat, just month names?
DateFormatSymbols, that is it.

how can i get all flesfrom a date which where modified befo today
all files from adirectory

~javadoc io

I don't know of any documentation for io

http://java.sun.com/j2se/1.5.0/docs/api/
check the docs
ok its too early, im not helping anyone till i wake up
Straight from Jonathan Schwartz's weblog, Sun is changing their ticker symbol from SUNW to JAVA:
thats awsome

Is there a way to recursively add jar files to with java -classpath?
s/to//
(except via using ant..)

hi all. http://science.nasa.gov/realtime/jtrack/Spacecraft.html - here we have applete. can i run it out of browser ?

~tell raxelo about applets

raxelo, Check the topic, read the Wiki… Essentially we try to avoid them

oh

raxelo, you can try appletviewer.exe

i don't know how to pass parameters ..
and i got IO exception (with no message). maybe somebody can help me with sport-interest )

where's the problem? opening/clicking works fine so far

i mean. can i run it without browser
using appletviewer
but it needs parameters
…. that is a problem .

where does it need parameters?

you can see the src of html page (where it's placed) and see parameters passed in that applet (it shows satellite position)
http://pastebin.com/dd5521ca - how can i pass them to appletviewer ?

pass the html page to appletviewer?

thanks a lot !!! i forgot how to use it . thanks

how to use recordset object in java?

i built a JMenu were i added a JSlider using JMenu.add(JComponent)
the JSlider is displayed so far but it's not working as expected
nothing happens when i actually click on the thumb
but when i click somewhere else the slider moves until it's min/max is reached
the jmenu is not toplevel btw.
http://rafb.net/p/okkWWa42.html
anyone an idea what i could do wrong or how one should add components to jmenus (if that's possible at all)
aha! that thing only fails with sun java servlet hosting 1.5.0.11 (maybe others too) but works with java6

hmm interesting

} … if it doesnt exist, inside the if block i generate a file with the same name unzipping from a 2nd file. after the if block, the the handler f will already contain the newly unzipped file, or do i have to run some command to update it?

it shud contain the newly zipped file .. File is just an abstraction afaik

thanks

I don't know if anybody has used ActiveRecord (ruby world), but is there an equivilant framework in java? I need to do ORM/Database work, but don't want all the overhead of hibernate. Is there a good lightweight library to do that?

jdbc is lightweight (compared to hibernate), if that does what you want

I'm trying to extend the File. What are the requirements for this? javac says it needs a contructor File() but I can't see how this works

•ijk• extend File?

I'm doing class myfile extends File {} with the neccesary import statement

hmm dunno why wud u do that . but whats the problem
if u specify the constructor its fine i guess

constructor for myfile or File?

public myfile() {super()}

myFile
but i think it shud be call the super(string) constructor or something
File does not have a default constructor
hence the problem

okay. I did this: http://pastebin.ca/669193
6 lines
ah got it. called super with pathname. thanks
just couldn't understand the compiler's message

use an ide mate

i have a castor question…
when it marshals my stuff, it puts a type for all children of my object, but not for the root (owner) object
so when i unmarshall it elsewhere, it says it can't instantiate the main object

nmx, I'd prefer not to write the sql host myself, I just want more 'magic' to happen behind the scenes rather than me having to fill out XML and create beans and such.

~tell cschneid about jpa

cschneid, jpa is Java Persistence API

with 1.5, no XML hosting configuration. just injection.

hey there delilah!

good tune

if I do timerTask.cancel() can I later call timerTask.run() to resume it? or need I instantiate it and call scheduleAtFixedRate again?

Can anyone point me towards the documentation on UrlPattersns for Filters?

filters of?

i dont understand…

you mean url-patterns for filters in servlets?

anyone else notice that Sun's changing their stock symbol?

ianp, yes

welcome to yesterday
=p

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/

This whole week I've been running hours to days behind. Nothing new

chapter 11

hehe
well if it helps you any i thought yesterday was friday

i thought today was thursday.
boy would I have been pissed tomorrow…

haha
ok stupid question, but would i be better off learning jpa or learning hibernate and then doing jpa?

JPA

yeah i think so too

re
yo!

YO YO YO. WAZZAPP??!?! (funky motions)

lol
you guys remember the wazzup commericials?

if you use hibernate annotations, you'd be learning 90% of JPA anyway.

get my email?
WAAASAAAABI!

hmmm ok

duh.
i did get your mail.

I was on the right track. That's stupid, but looks right.

s/Session/EntityManager/ and you're about 90% there

basically "it's up to the appserver to map resource references to jndi names properly, that's not a specism"

k

although it should be - but define a "say hello" bean and map it for that

hi guys

i've actually reverted the stuff we were fiddling with in my local project, because we're having db40 performance problems - for a 1.4second total call, over a second is spent getting / retrieving a db4o object from the store.

which is dumb but simple and should work

which is just plain wrong.

bleargl

im working on building a backend cms system for a client and im using hibernate at the moment, so i guess ill finish it out with hibernate and then pick up learning JPA.

JCR!!!!
why the bloody hell do people do that!

anyone here from england?

Geeez

as cheeser said, you're sort of going the bass-end way around

jottinger?

if you're using annotaitons, you're most of hte way there. if you're not, when you start doing JPA you're gonna do the "HOLY CRAP this is a lot easier to deal with than hibernate xml files."

heh ok

that's why i use jboss. because i have much self-hate.

i was about to say

JEE 5

why using xml files in hibernate
you can do it with annotations on pojos
but the new jpa rocks

there's no reason to use the hibernate xml files.
there's no reason to use the hibernate XML host files.

The power of Sun compels you! The power of Sun compels you!

[TechGuy] fails! for i am LAWFUL GOOD!

su-hoens`rZ: sorry, I use a lot of anglicism without being anglican

jottinger oh well

lol

Failed to parse source: null
how handy. :-/

episcopal then?

jew!

watch your mouth you dirty… oh. i get it.

hahaha
hey, I
I'll have a test case soon, since I need something like this too

ok

besides, I need a few more hours

Good morning, dude.

yo

Check out the front page. I just posted Bobby's article.

I'm trying to install the Java 1.5 SDK on my Ubuntu linux machine. I have downloaded the self-installing binary file java_ee_sdk-5_01-linux.bin from the Sun web site. When I run the file, though, it unpacks some data and then hangs indefinitely.

that's not the JDK
that's the JEE libraries.

Okay.
Thanks.\

~tell yrlnry about ubuntu

yrlnry, ubuntu is https://help.ubuntu.com/community/Java . If more help is needed installing/using Java in Ubuntu, try #ubuntu-java

You need to download something that says "java_se" or some such.

Is java_ee_sdk-5_01-linux.bin what I want here?
Wait, no.\
Geez, I ended up at the same place.

what was that php thing again
~php

vlii, php webhosting is the solution of choice for relaying mysql errors to web users

No.

Sorry, that was a mispaste.
I'm going to follow the directions at https://help.ubuntu.com/community/Java now.

PHP is a mechanism for dynamically generated web pages that's better than ColdFusion but worse than Wicket/JSF/JSP.

~predator

jottinger, I have no idea what predator is.

~php

jottinger, php is the solution of choice for relaying mysql errors to web users

I like javabot's explanation better

Either that, or go find the right download from Sun. I never use the Ubuntu installers for Java. Distribution-specific installation creates other problems later.
Heh.

just heard a complaint of php mysql errors on some other channel, I remembered javabot had something to say on the topic

if I made a class extending File, should it not be possible to cast a file to MyFile with (MyFile) f?
it compiles alright, but fails at runtime

are you sure the object is really a MyFile?

so .addAll() actually creates copies of the objects in the List huh?

no it's a File, but essentially it's the "same" class since I just extended it

you can't convert objects between types
it is what it is.

okay. it's that I need File's listFiles() method and that this does not work on my extended class
but thanks

if you have broken a superclass method, you're doing it wrong.

does anyone know whether .addAll(..) defined in List actually creates new objects when it inserts them?

it does not

hmm so it just copies the reference?

yes

same as add huh nmx?
thanks

any idea what I'm doing wrong? I just did a dummy implementation of the class extending File, but as said the method indeed is broken.

post a test case and explain what you mean by 'broken'

okay

how to return the second entry in the map?
iterate over it?

you can iterate over its entry set, though if you are not using a sorted map you may not get what you expect

A hashmap is basically a collection of key value pairs. Even if you use SortedMap you would get elements in ordered sequence based on natural ordering, which is not necessarily the order in which you inserted the elements. Try using LinkedHashMap for predictable iteration order.

I did this, includes compiler messages: http://pastebin.ca/669257
I recognize that the problem is listFiles always returns a File object even when it should be "JpegFile"

myFile.listFiles() function returns an array of File objects and you are trying to iterate over it using a Jpeg object.

I thought it would return JpegFile objects when I extended File. is this do-able?

I don't know what kind of class is JpegFile so I can't comment on that. Are you using some third party libraries?

I mean, it's essentially the same class. I just need to add a few extra variables later on.
no third parties
perhaps I have misunderstood the "extends" keyword to some extent

I am quite beginner with mock objects. Can you give me an advice on how to test this method (there is a static method call that is a problem for me)

ijk, extends states that you are subclassing a class

Does JpegFile extend File?

http://pastebin.com/ma39070f

yes JpegFile extends File

Then try something like : for (File j : myFile.listFiles())
And inside the function, cast 'j' to JpegFile.

I tried that earlier. nmx said it's not possible to cast it - compiler says "java.io.File cannot be cast to JpegFile"

Then you need a constructor for JpegFile which will take File object as a argument and return a proper JpegFile object…
I thought the listFiles contained JpegFile and hence I asked you to try that method.
If the listFiles returns a normal array, you need to write some logic to get JpegFile out of File.

i've been wanting to get started doing some web development with jsp… should i be using struts, server faces or whatever, or something else?

mmm cape cod bbq chips
wicket

well, I'm not really sure how I'd get around doing that! the current constructor I have for JpegFile just calls super()

Then make a new constructor which does something like "super(passedFileObject);"

•ijk• the listFiles() will return File objects only
u cannot cast them to JpegFile

~javadoc JpegFile

I don't know of any documentation for JpegFile

you're in luck! there's no such thing!

hehe
presumably u want a list of all files in a directory that are jpegs ?
use a NameFilter and pass it to listFiles

~aolbonics

cheeser, 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

but am curious what u wanna do by extending File as JpegFile

~tell abhi27 about aolbonics

abhi27, 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

http://www.theonion.com/content/video/in_the_know_should_we_be_shaming

hmm I dont get what the fuss is about
the reason for the popularity of english is its flexibility - and replacing u for you is not abusing the language in any way
they should actually start incorporating this in the OED

~u

U is Dutch for "you" or an aolbonic meaning "I am stupid".

~v

abhi27, I have no idea what v is.

well you are not so smart
hehe

~tell abhi27 about stupid bot

abhi27, you're the one talking to a robot. Duh.

well i am already labeled as stupid

grrrr

Hi guys, question about deploying a Hibernate webapp in Tomcat. This is the only app (so far) that's going to be running in the app server; is there any advantage to using JNDI to supply JDBC connections as opposed to allowing Hibernate to manage the pool (c3p0) itself? This is my first
production java host webapp…

c3p0 is not a good connection pooler. Listen to Hibernate when it says so

dbcp

well taking everything into account - dbcp

[TechGuy]: why do you say that? there's a 3 page thread in the Hibernate forums where Gavin recommends avoiding dbcp… i didn't notice the date though, it may have been a while back…

its the one that comes with tomcat

ok, overwhelming support for dbcp then

also as you said 'so far' it means later you might have more apps in there

anything's possible, although I don't forsee it for quite some time

tomcat will collect all the connections that are being unused which helps

dbcp works internal to tomcat and you can configure it to run as a part of your application

I was just trying to minimize the number of differences between my app's production config and it's development config… I develop using Maven/Jetty
didn't want to rely on the app server host if it all possible
that is, for configuration/the like

you can bundle dbcp in your war

that jus strengthens the case for dbcp

ok… so if I juse dbcp do I have to use JNDI hosting with it, or can I use it directly from the webapp?

you don't need jndi, no.

directly from the webapp

awesome
thanks guys

how do you know all are guys!

so, provided I'm not wanting to share the same connections amongst more than one app, is it safe to say that jndi provides no advantages in my scenario?
I was using guys as a generic term

there are no female programmers
=P

lol

and whoever said there was, is lying out of their ass

hehe

maybe you don't visit the newsgroups.. ;-)

i was told at freshman orientation that the CS department was full of hot beautiful women that wore bikini's to class…
if i ever find the person who told me that i will hurt them! =P

Here's the thread I was talking about ("Please migrate away from DBCP")… of course it is 3 years old and may no longer apply: http://forum.hibernate.org/viewtopic.php?t=931132

•hironimus• jndi is useful if you want to share the pool across web applications on the same server

that's what I was thinking, thanks for confirming it.

Hello. non-static method createDocument(java.lang.String) cannot be referenced from a static context
what does it mean?

i tend to agree with the poor user who got caned by the hibernate team… we have been using hibernate and dbcp for long now and no problems so far

okey doke… well as I said this is all new to me so I was only going by what I had read

•youssef• simply what it says - you are calling a non-static method from static location (probably main?)

I suppose it'll be easy enough to switch from one to the other if I experience problems

im having real trouble finding hibernate-tools.jar

yes I am calling from main
all methods that are not in main have to be static?

•hironimus• depends on your architecture but in most cases yes - we dont have a JSR to standardize object pools
•youssef• well you can create an object of the class whose method you are calling and then call the method on the object

do (class where method is found).createDocument(somestring)

in netbeans, does anyone know how to get jee5 as an option in creating a web project? I've only got j2ee 1.4?

er yeah create a new object of that class then use that to call the method

•cs02rm0• its the age of eclipse man

i've tried, so many times, but it's just too buggy.

thanks

fix your client. it's spitting out crap around tab completed names.

seen from eclipse, swing was the source for swt

damn mirc users

eclipse once was swing based, so ibm decided to create swt

lol

its the invision client .. can you paste what it prints?

Ucs02rm0U its the age of eclipse man

the 'U' are in reverse video for me.

abhi27:i see small dots around your highlights

At the time, it probably made sense.

yeah they are actually the dots in unicode
upgrade your client to support unicode

lol

thanks

However, I think that time has (largely) passed.

yeah, so there's netbeans

Yeah, I've used NetBeans, it's nice. But, where I work, we mostly have standardized on Eclipse, so I use that instead.

IDEA++

brb

Eclipse *= a billion

so, no one knows how i can get netbeans to offer me EE 5 as an option? at this rate i'm going to have to try eclipse yet again. *shudder*

Curious, I have a device that is using standard Java and Encrypted Java - was wondering if it's possible to use standard java to decrypt the encrypted java? Help would be great on this!

offer you what?

A few ex-IDEA users here often lament the fact that management here no longer approves IDEA licenses, and tells people to use Eclipse instead.

yeah. eclipse is crap.

Cheap-asses

[TechGuy]: Yes. Cheap in a stupid way. IDEA licenses would easily pay for themselves in improved productivity (or so I hear).

"Java Persistence currently requires that the many-to-one side always be the owner" — why is this? Is this laziness in the spec?

damn I'm gonna hafta download an eval of IDEA now…

Is there really no simple way to do a bidirectional many-to-one that uses a join table?

why would you want a join table in a many-to-one?

If anyone can help, it would be much appreciated - otherwise I need to spend $1500US just to use this application!

Is it that Eclipse is just plain crap, or is it just far inferior to IDEA?

it's far inferior.

that's the way the existing schema works

it beats a sharp stick in the eye…

Heh.

did you try using @JoinTable ?

The framework architecture for Eclipse is okay. It's just the plugins themselves are shit

maybe the relationship from the many to the one is optional, and the db doesn't support nullable foreign keys?

no, I didn't try anything. I was just reading and it said the spec disallows it…k.

that wouldn't reall resolve that problem.

[TechGuy]: well that's the point. you can't build an *integrated* developer environment by throwing together a bunch of crappy plugins

Eclipse doesn't really bill itself as an IDE

that's why eclipse will always suck. that and IBM did business with the nazis

it's a platform!
blahblahblah

sure it would… the join table would have the foreign key on both the one and the many… if there was no relationship, there'd be no row

you'd still have FKs on the two end points

true, but you wouldn't have a need to have nullable fields with FKs in that case… without the join table you would

Please, I need to know - I have a device that runs Java, but some of the packages are encrypted and some are not - do you think that Java is decompiling the encrypted packages within java or would this happen externally?

~tell Tossbag about wina

if the many has a field that references the one, and you can't make it null and still have a FK, then how you do you have a "many" with no "one"?

Tossbag, Why is nobody answering? There are several possible reasons: 1) Nobody knows. 2) Everyone's too busy. 3) No one wants to talk about it.

Question doesn't make much sense. Though it's perfectly possible that there is Java code decrypting (not "decompiling") the data..

Eclipse is definately a platform, my project uses our own eclipse-based tools heavily
uEclipse is definately a platform, my project uses our own eclipse-based tools heavily/u

what tools are those?

are you trying to crack a program that you don't have a license for?

I don't know how to ask the question! Basically I can write Java for this device, but only if I purchase this rather expensive compiler - however looking into it, all it does is encode the java that one writes, uploads the encrypted .jar file to the device and the device runs java that decrypts
the code - I wanna know if there is a way to still write the java without using the expensive compiler? I have the files, could you help?

Question….. When you create a thread does it automatically "go away" when the run function completes? Or is there a way you have to stop it and clean up? Not quite sure… There is a stop method mentioned, but it says it's "depreciated"

"deprecated"
it'll get GC'd like every other java object

Ok so at the end of run it should get GC'd automatically then?

what is the device? And probably not. You have to extract the key data from the device that is being used to sign and extract the code.

3d model viewer/shader dev environment, map editor, script editor, java tools, etc

can we use Tossbag to play "Hackey Sack"?

doesn't seem like the sort of tools you'd need to develop in house

The device is AMX - www.amx.com, used to have a it's own language but now moved to java - half is encoded half is not? Surely the encoded files are decoded using java? yes?

Depends on what you're doing. You obviously like to assume things

I'm just wary of people who develop their own dev tools

Can someone please look at the files, tell me if I'm barking up the wrong tree - 5 sencs off your life, would be much appreciated!

more than likely the expensive compiler just digitally signs the code. with the signature all is lost

It's rarely needed in kiddie land where you're making basic crud applications

Is the signature within the java or external?

it's in the compiler probably
it's rarely needed even when working on the biggest apps. that's why it's the kind of thing I'm suspicious of

But if the device is running compiled code, then how would it read encrypted code without decompiling it first?

Tossbag, why are you trying to decrypt these files anyway?

Can you look at the files? You will understand what I mean..?

because the device has the public key

again, "biggest" has nothing to do with it

well really, the other key

There is no key on the device, I have the snapshot of the CF, no keys, just java!

Tossbag. are you asserting that compiled code can't be encrypted?

one key in the compiler is used to encrypt, the other key in all the devices is used to decrypt. you need to extract the first key from the compiler. or it might work the way bluray players work

sounds like someone's trying to hack a device

or, according to the RIAA, "use"

somebody has probably already hacked the device so your best bet is to look around
there are few commercial non-industrial systems out there that haven't been broken

There is only ONE device - this is the same for everyone - One package is fine, the next is enxrypted the other is not… I' not after a hack, I just want an answer? Can someone look at the files and see if it is pointing to a class that decrypts the other classes?

Tossbag, since jar files are easily read, and byte code easily reverse engineered they MAY encrypt certain files for security purposes
Tossbag, did you say this is a mobile device?

Seriously, think about it - you want to quit your job and freelance, however you can't because the product you develop for has just gone Java, however you need to spend $1500US to program for the device.. Would you not want to understand how it all works - BTW that's $1500US per CPU license!
So there's the Office PC and the onsite PC!

dbcp? don't know that one

can you look at the files for me please?

Sounds like you just got screwed by a proprietary technology. Live by the sword and die by the sword, my friend!

Tossbag, so, it cost 1,500 for SDK access?

welcome to capitalism. you'll have to look around, nobody here will prolly be willing to break the system for you

indeed. such things are likely to get you … "removed"

The system does not need to be broken - someone just needs to quickly look at the files and say - yes, it points to this class, here is what your looking for!

why not talk to the vendor?
if you don't wanna pay $whatever to dev for the device maybe there's a dev license

There excuse is they don't want IT to converge with AV otherwise there industry will suffer - eg. AV charges 40% mark up compare to the IT %5 markup!

Tossbag, even if you can discover which class reads the encrypted files, wouldn't that be useless without the public key?

maybe the files are just rot13'd

There is no public key - same files for everyone that uses the device! There are no keys…
what is rot13'd

dear lord.
it's clear no one wants to or is able to help.

Sure, I may not know much about Java - it just sits me that I spend half my life helping people that don't understand technology only to try to get some help and no-one wants to offer a hand….

Tossbag, the premise that all users likely have the same emebedded public key, does not preclude the necessity for a public key to decrypt the files. LOL

ebg 13 vf n irel fvzcyr pvcure

lol

well, you'd need a *private* key to decrypt

exclude*

All fun and games! just needed help… thanks anyway

and we didn't have any to offer.
don't get pissy

Sounds like you've got a project on your hands

OOPS! I stand corrected by cheeser, the *private* key is used to decrypt
uOOPS! I stand corrected by cheeser, the *private* key is used to decrypt/u

the public/private words don't really mean anything

So, how could a class find the path to WEB-INF?

meeper, in and of themselves no, but those terms were chosen by standards bodies so that we can understand one another when we discuss it.

ServletContext.getResource/getResourceAsStream?

and pass "WEB-INF"?

not sure, why do you need WEB-INF?

Seriously, I would really appreciate it if someone can take 5 minutes to look at these files - please download for www.iefx.com.au/lib.zip - I don't understand Java enough to understand it - however this is the OS files, this is what runs the entire thing - if you look under the Morpheus.jar
file you will see the encrypted data, while the rest of the SUN Java runtime files are not encrypted. There will be one time in your life where you

Need to load configuration files. Right now I have the properties files within the same package and am doing something like: classWithinPackage.getClassLoader().getResource(classWithinPackage.getPackage().getName().replaceAll("\\.", "/")).toString().replaceFirst("file:", "")

Tossbag, I thought you were going away

at least you're showing the channel your problem now
That makes things much easier

then check what ServletContext does when you call getResource/getResourceAsStream, it sounds like it is what you want.
then check what ServletContext does when you call getResource/getResourceAsStream, it sounds like it is what you want.

•octoberdan• what is it you are trying to do?

How very matrix of them )

note that ServletContext does not do the same thing as ClassLoader.getResource

Load a properties file in WEB-INF. I don't like keeping my configuration files directly in the packages

They named all there crap after Matrix - what's worse is it used to be named after Lord of the Rings!

•octoberdan• if you are using a servlet container to load all that, then the default class loader will point to WEB-INF directly

hi all

ROFLMAO, no way!

yeah, that's encrypted or obfuscated in some way, the class file's magic is wrong

does anyone know if it's necesary to add external repositories to install VE on eclipse?

•octoberdan• rather depends if you use websphere / tomcat etc etc

Is there a cross-container way of doing it?

•luiX_• come over to eclipse

Yes it is wrong, but why are the other files right? there is no more files that the OS runs, that's the whole package!

abhi27, have just seen the channel

did you check my suggestion yet?

nope .. websphere handles separately and tomcat handles separately, I think spring does something, but you will need to check that as i havent used it to do that

. o O (wonder if there's a RedPill.jar that contains the decryption key?)

lol

I can ensure that it doesn't get deployed to websphere, that's alright.

actually ernimril's suggestion might do the trick .. perhaps thats how spring does it

I'll give it a shot now

just put your props file in web-inf\classes
it should work in almost all containers

There needs to be a java.lang.ID-10-T error

then use getResourceAsStream

That's what I'm trying to get away from

public class IDTenTError extends Throwable

well i jar all my classes so my classes folder is empty

This is not a standalone program

its pretty easy =\

hmmm, now I just need to figure out how to get an instance of ServletContext to my class…
Is there a static way of getting a reference to it?

Here are the complete OS files www.iefx.com.au/amx.zip - that's the entire OS wothout the LIB files as above - it runs the LIB directory on boot, I can see the Servlets startup - this is my point, is it possible to decrypt these files within normal java? Can java execute at run time or compile
time only?

geez, Tossbag, if the platform was a profitable ISV venture for you before it was ported to Java, why would it not be now? If you don't want to learn Java, then why bother decrypting the files? If the $1500 is a bit steep for you, but you see a profit potential in the platform, just get a
part time job and buy the license, dude.

well, vxWorks is the OS and that's proprietary
It may be in that binary somewhere

ah

On Startup, servletHTTPContext, Jetty 4.2 ,socketListner and org.mortbay.jetty.Sever@f69db9 all startup, they are all part of the Lib files - surely there must be a file pointing to decrypt the rest?
It's more complex than just $1500 + $1500 - I want to understand, I want to understand why I could write the Java and it gets encypted, I want to understand why an 18 year old can replace me overnight because he knows more Java than I do - they use to have a proprietary language - that I could tell
you everything about. Now it's all changed! I just want to understand…

Tossbag its the nature of the industry

Can I write java and upload it, or does each file need to be encrypted? Isn't trying to understand these things what makes us all unique? Why do you wirte Java and not some other language? How would you feel if SUN turned around and said to you, that you now have to pay $3000 just to write
apps? Would you be happy with that?

proprietary languages are harder to update and maintain for a company that is also trying to sell a product. Java is an open standard that can work on literally any machine so its much easier for a company to use java and worry about what it will run on later.

Tossbag, I'm assuming from your comments that the platform / framework is dependent upon ISVs for it's success. Would make sense to increase ISV pool, by leveraging the ubiquity of Java on said devices.

thats probably why they went with java. if sun started demanding money from people to use its language, then you would see an outcry from the java devs and then a massive push to move from the language

Yes it would, but what about the people that devoted their life to the old ways? Now these new ways are slowly getting rid of the old users - if you look at the files you will see it's the same magic number in each? I want to know if Java can execute Java script at runtime or if it does
require it to be complied prior…

oh good geez…

java script is wrong word…

Java must be compiled prior
Java 6 adds programmatic compilation abilities

thats like saying we shouldnt use C or any high level langauge because it puts people who use assembly out of their jobs
or people who used to write old main frame code

I get your point and it makes sense - I'm obviously not getting my point across - I do appreciate your help though, I guess from here it is a case of accepting the obvious and picking up the Java books and learning it, whether it's encrypted or not… I guess I need to face the facts, it's
turned to Java and I need to start writing it!

Tossbag, there are some third party Java libraries that can parse Javascript at runtime, but Javascript is not Java. If it's Java code it will have to be compiled to byte code on the fly at runtime, and then executed.
If I'm wrong about this, someone feel free to correct me.

So Java code can be compiled on the fly, not necassarily at compile time?

WTF is this "encrypted Java" crap coming from?

clientTable = new HashtableString, String();, what's the proper way to make the value element a map as well?

uh no. But Java, in v6, can programmatically run its compiler

How can I find out what version this is running? Can I tell from the OS files?

java -version

Without that ability can I look at any of the classes?

Tossbag you should read up on java
that will help you in your quest to figure out what to do
~tell Tossbag about RBI

Tossbag, RBI is http://java.sun.com/docs/books/tutorial/reallybigindex.html

map = new HashtableString, MapString, String(); ?

Do you think that the files that are Encrypted are just compressed using another method of zip?
uDo you think that the files that are Encrypted are just compressed using another method of zip?/u

what do you mean by encrypted?
….

class files are not encrypted. They are in bytecode form

Would that be correct though? That's what I'm trying to figure out…

yes. why do you think it's not?

You added "?" like it was a question making me think you were not sure

Sorry. I am sure, the "?" was there because i thought I might be oversimplifying your problem
I will be more clear in the future.

Look at the files www.iefx.com.au/lib.zip - while the OS files are www.iefx.com.au/amx.zip - there are plenty of JAR files (Fundemental Files) that are normal Java files, but then there are a couple of key files that are not the standard format, I want to know if they are being parsed in by
one of the classes and decrypted?

The best way to learn is to try things out. Surely you must be having a IDE or compiler…

My IDE lacks things…
Compiler is on a server

Tossbag, was the previous "proprietary langauge" a compiled language, scripting language, or VM language?

Does eclipse have drag and drop to create an interface?

#eclipse

Thanks

Class files have a standard.. yes let's say there Magic Byte is 0xCA, 0xFE, while the other files have a magic byte of 0×6B, 0xBA
Complied language running on a risc processor - but very limited.

map = new HashtableString, HashtableString, String(); ?

It was converted to byte code for the Risc (MIPS)

Curious, since you said you have been using dbcp with hibernate… are you using JNDI, or are you using a custom (i.e. non-Hibernate provided) ConnectionProvider class?

Tossbag, so what you are actually trying to do is decompile the Java bytecode files, thus reverse engineering the application?

y0

there are the Piped(Input/Output)Stream classes and i need their mechanisms for a purpose that requires a larger ring buffer like 50-500 MB, but PIPE_SIZE is final :/, what's the easiest way to adopt their mechanisms with a larger PIPE_SIZE?

•hironimus• custom class, some sorta extension of a hibernate class which ties hibernate to c3po

Just trying to understand what it is doing with these encrypted files? But the more I look at them the more they looked compressed, rather than encrytped - they have the same start byte code for each file…!

thanks… probably something like this: http://wiki.apache.org/jakarta-commons/DBCP/Hibernate? just making sure

Tossbag which file?

What if you do a .put on a Map where the key already exists?

it replaces and returns the original value and puts the new value

Tossbag, which files look compressed? the jar files or the .class files?

first question… no that won't work because you are initializing the Hashtable as a different type than the container. Second question, the new value will replace the old one

Ah ok

Do you think these files could be decompressing the other files - foundation\java\util\jar\JarOutputStream.class or foundation\java\util\zip\CheckedInputStream.class?

•Luke_S• and the old will be returned - its very important sometimes

So with the structure I have String, String,String

Tossbag, jar files can be decompressed with a jar tool

The Class Files

If I want to update or add the inner element I have to update the outer key?

•hironimus• indeed

cool, many thanks

Tossbag, .class files are byte code and will have to be "decompiled".

no
oh

no… just get a reference to the inner map you want to update and call its put method, no need to replace the entire thing.. unless that's what you want to do

well yes they could be used to decompress the files

yes, and they can be except a couple of them, which are the importnat files, that's where I am trying to work out, how are they doing it?

So if I do something like
inner = outer.get("key");
inner.put("key", "value") will update inside outer?

yes

Ah ok

Tossbag, perhaps some of the class files were obsfucated just to prevent folks like you from doing what you are trying to do

And if I want to create a new element I would do outer.put("key", new HashtableString,String);

however watch out for nulls if the outer key doesn't exist in the map

Then use the previous method to update it?

yup

Probably, but the question being is where are they deobsfuctating them? In java?

Ok I think I got this now
*

Tossbag, they dont need to deobfuscate the code at runtime

they dont need too, they have the source

Why? Don't they need to turn back into original bytecode?

context.getResource("/WEB-INF").getPath() gives me "/localhost/appname/WEB-INF" :-(

~tell Tossbag about sol

Tossbag, sol is Shit Out of Luck - in other words, no chance.

Tossbag no, thats the whole point in obfuscating code so people cannot steal it.

Tossbag, no, most obsfucation tools rename the entites in the human readable Java code to something unintelligable prior to compiling to byte code, so that if it is reverse engineered, it'll look like "gobbledy gook".

•octoberdan• if this is something new - go spring

Ok then, that makes more sense - so there is a possibility that the bytecode is obsfucated on the PC, then uploaded to the device, while JAVA knows how to read the obsfucated bytecode, without decoding it! Yes?

now he gets it

Too late…

what is a good data structure that is a map and it is sorted

SortedMap

Thank you for your help.

JLearn haha I guess I should have checked that first

yw, I think

~javadoc SortedMap

JLearn, please see java.util.SortedMap: http://java.sun.com/javase/6/docs/api/java/util/SortedMap.html

Does anyone here use Hibernate, Toplink (Essentials), OpenJPA, or JPOX?
Or a JPA implementation which is not one of those four?!

All of them ?? At once?

"or JPOX"

~tell RProgrammer about anyone

RProgrammer, Instead of asking whether anyone works with something you need help with, please save time by asking your actual question. If someone knows and wants/has time to help, perhaps he/she will.

Ok:
Hibernate does not honor optional entity relationships
Toplink does not allow the datasource to be overridden when creating an EntityManager or EntityManagerFactory at runtime
OpenJPA requires some strange form of compile time enhancement which I was hoping someone here would have experience with
JPOX Does not actually support the JPA specification (it's JDO)
But if anyone knows of another implementation I would love to hear about it

how much overhead difference is there between a List and a SortedMap
that we could iterate over
meaning, I would like a Map so that I could immediately go to an element, but i would also like to iterate across it
in a sorted manner

•sleepster• well not sure but you can get the valueSet/keySet from teh map and treat it as a collection to iterate over
•RProgrammer• All I can give is - http://java-source.net/open-source/persistence

I suppose use Map.keySet() to get the Set of keys, pass that as an argument to a List constructor, sort the List, and iterate your list of keys. That's one way at least.

•RProgrammer• you might want to try over at #hibernate

Ok, but #hibernate seemed pretty dead

RProgrammer, some communities prefer forums, boards, and / or newsgroups to IRC

Yeah, but they're not responding on the forums.

I have a panel that implements Scrollable, yet the scrollpane that I am adding it to is still scrolling when it is resized less than the panels preferred size and not the one returned by, getPreferredScrollableViewportSize(), does this function not do that?

niiiice sun microsystems is switching its NYSE symbol to JAVA

people in suits are really clamoring that move I'm sure.
and by clamoring I really mean saying "wtf" to themselves

yeh

i would like to know who thought of that idea

could someone tell me why scrollpane in this code is not starting to scroll at 50,50? The scrollableJPanel class there returns that… http://rafb.net/p/yXByvf59.html

Does anyone here use an entire database per client and ORM?
If so, would you please tell me how you do it…?

sorry here it is with the imports http://rafb.net/p/PeRnls52.html

what?

did you say… an entire DB per client?

Yes

um

Very large scale systems
Each client needs over 30 tables (entities)

wow

And to give an idea, there are users within the clients

well that's expected

Right

you might try asking your actual question.

This is my question. How does one do this with JPA?
I just recently found out that Toplink simply doesn't support this

it's not a toplink issue, it's an ORM issue

But the only alternative I can think of is to have a column in each table for Client ID

use spring and inject the DS into toplink by client
and don't ever do this again

Actually, toplink caches the jdbc connection per persistence unit

Lesse… can't create separate EntityManagers…

Right

hibernate can

Have an EntityManagerFactory and programmatically set things like that

or at least, spring+hibernate supports that.

Ok, but hibernate has a different problem

i still don't know what you're trying to do.

any Java Devs here from Austin?

I want to have a DB per client. But if that is a bad way to do things, someone say so.

is this scrollable interface broken or something? http://rafb.net/p/PeRnls52.html

it sounds horrid
why do you think you need a DB/client? and wtf is a "client" ?

A paying customer
sorry

dear lord

ok you need to read up on relational databases i think

The only alternative I can think of is a primary key column in each table

every table will have a PK.
with the exception of a join table at least.
8^)=

col = new ArrayListMPPProductBOMLine(); and I do this: (MPPProductBOMLine[])col.toArray(); and I am getting a java.lang.ClassCastException: [Ljava.lang.Object; what am I doing wrong?

there?

(MPPProductBOMLine[])col.toArray(new MPPProductBOMLine[col.size()])

hm…
so am I crazy to leave a small to mid-sized company to go work for a startup while I"m in the middle of a project?
lol

heh i had someone here at work ask me why i use tables (which mostly resembles objects) instead of flat files since the design was not "relational"
depends svm

cheeser, thanks man

does the startup have potential and will it be here in 1 year?

They've existed for 2 years so far.
In an extremely volatile industry

does anyone know if the scrollable interface or scrollpane is broken??????/
because this code according to the docs i believe should work. http://rafb.net/p/PeRnls52.html

I've had a guy tha tassumes a "Table is a class and a row is an object."
And tried to write an object-relational mapping based on that. Failing to account for inheritance.

svm_invictvs, talk about suckass when that encounters association tables

yeah…

Is there a base convert function in java?

/part

I can't believe no one out there ever needs to have scrollPane only scroll on a smaller size than preferredSize

huh?

re
why's this a valid code? "String[] strings = {"C", "D", };"

because it is

first I thought a 'null' will be the third element, but I've realised the array will contain only 2 elements

JLS answers the question

enums are the same ;]

How easy is it to get started in J2ME, and what development environment would people recommend for it?

I would suggest using Netbeans mobility pack
and it would be a peace of cake after J2SE ;]

lol

s/peace/piece/

am considering writing a WCAP todo list client

it has a graphical GUI designer also ;]

because I'd actully use it

hi all. i have installed jre (.bashrc path, classpath points to jdk directory) but when i run java it uses one from jre. where can i change this to run from jdk ?

the jdk is the jre+dev tools.
but if you have a separate JRE installed, just update your PATH to point the JDK's bin/

i know, but java from jre is different from java from jdk !

so fix your path
there's nothing magical going on there.

mine PATH is pointing to jdk's version !!!

'which java' returns the java from the JDK install dir?

i simply run "java -version" and get version of jre, but path points to jdk !

. . .

8^)=

Take a deep breath.
Now run: which java
Check the path.

)

and then echo $PATH to double check

/usr/bin

so file /usr/bin/java to see where it goes.

oh. thanks a lot ! i'v to think as linux user )

jchauncey makes me think of poodles and other snobby little dogs

haha some one built a robot that does the knife/hand trick from aliens
that's awesome

link?

give it a try and let us know how that goes.

http://www.5voltcore.com/index.html?/content/khcb.html
too bad they couldnt get bill paxon for the demo :0

http://www.youtube.com/watch?v=AR-ljmQqIjk

I/win 6
sorry :/

you lose!

always happens :|

8^)=

r0bby 0 IRC client 1
maybe I should stick with my aliases

~kancho amki
~kancho amnesiac
my apologies amki
8^)=

cheeser, hahahaha that's from Naruto!
:P

man
even by IT standards you guys are a bunch of dorks

i've never watched/seen that.

uhm?

??

tmccrary, sorry?

https://ksl.dev.java.net/

cheeser, buuu, shame on you dude

get to work!
i'm not 12 years old

We all know we're dorks, don't rub it in!

cheeser, me neither

s/We all/I/
s/we're/I'm/

You're not a dork r0bby

~be r0bby

FileNotFoundException is a subclass of IOException; Exception won't directly catch that.

Yes I am

You're a bastard

hey! he knows who his mom is!

s/bas//

lol

well, reasonably sure at least.

cheeser, you're r0bby's regex

wow, KSL sounds perfect for my project!

Look on the bright side, I can take every bit of abuse thrown at me, and gracefully.

Damn straight

tmccrary, do you have any problem?
tmccrary, any personal problem you want to share with us?

What?

I don't take it personally, I'll just get even one day.

tmccrary, calling us dorks isn't that nice you know

Sweet, sweet revenge
Who said I have to be nice to bunch of dorks?
I was joking anyway

i'd kill everyone in this room for one sweet, sweet drop of beer

hehe

cheeser, two please…
cheeser, it's friday for god sake… beer is a must

++beer

My class implements Runnable. When I call myclass.run() from another class, the first class's execution is blocked. How to I fire off a new thread and have the originating thread continue unblocked?

new Thread(myclass).start()

ah!

is their a j#.net room on freenode? havent found it

huh, people still use j#?

lol, people use j#?
WhatTheFuzz:
##csharp is good for .net questions I find

yea rookie like me need a visual java… unless you know of a visual java better than vstudio's
eclipse is paper notepad…i need a lil drag n drop in my life

uh, why do you need visual java

~tell WhatTheFuzz about newbie ide

WhatTheFuzz, newbies shouldn't use IDEs. http://weblogs.java.net/blog/editors/archives/2007/02/you_better_get.html and http://weblogs.java.net/blog/gsporar/archive/2007/02/tools_that_do_t.html

ouch
I hope this is an elaborate joke
But I suppose he fits the profile of your average .net programmer

java and .net are similar enough that the average .net programmer is about as good as the average java programmer

yeah… the average .net programmer just switched over from VB and "needs a lil drag n drop in his life"

lol from c# actually
close

You don't see that in Java, because all of Java' gui design tools suck

So I tried running jsizer with batik so it'd produce SVGs…

did you get it to work?

not quite.

why not?

I got sidetracked.
Then went to bed.'

ah…
damn it, you have to prioritize, you can sleep when you are dead! :-)

I'll play with it more…s
lol

just for fun, try running jsizer on rt.jar, there is one class that stands out..
it is actually quite non-fun that the corba parts take up soo much complexity…

lol
OMG CORBA
I lke Josh Bloch good examples of bad API design.
he goes, "I won't tell you where these names come from…"
"BUt its' CORBA"

reminds me of the movie "Taxi"

lol
That movie was crazy
Robert DeNerio
Or however the fuck it's spelle.

yeah, and the policeman used to make such names, like "Cobra, Zen" etc

What's the full RFC on FTP?
945 or something, right?

959
~rfc 959

are there any good programs for detecting deadlocks? my application is locking up in some native call for Java AWT

ftp://ftp.rfc-editor.org/in-notes/rfc959.txt or http://www.faqs.org/rfcs/rfc959.html - depending on your preference.

C-\ or Ctrl+Break in the console you are running in
most debuggers and profilers also have the ability to show deadlocks…

Nothing that's free, as far ask I know.
??
hm

my profiler jmp, can do it, it is for java 1.2 up to java/5 only though

hi
any one using the iText for pdf creating ?

many people do…

I have problem with firefox
it just won't show the pdf generated

is the pdf generated correctly if you open the pdf on its own?

firefox handles html, firefox does not handle pdf:s

you need a pdf plugin
set it up to open it with Adobe Acrobat
+Reader

ah.

yeah ok
but how to bypass that

you can't

damn

if you find the adobe acrobrat browser plugin, it can open within firefox, but not w/o that.

*meow*

thanks guys

ok thought there is a way out of this situation
thank you

giggity

If I have 32bit operating system running on 64bit CPU, do I download 64bit jdk or 32bit jdk?

32?

32

oh thank you

Walter and Perry!
lol
So a priest and a rabbi are walking down teh road…

oh crap. I smell a bad joke.

The priest and the Rabbi encounter a boy and the priest turns to the Rabbi and says, "Hey, you wanna screw that little kid?"
And the Rabbi goes, "Out of what?"
The funny thing is, half my family is Catholic and half my family is Jewish.

hahaha
~svm_invictvs++

svm_invictvs has a karma level of 9, jottinger

svm_invictvs++

svm_invictvs has a karma level of 10, r0bby

you deserve that

Oh god, where did I get 10 karma points?

~karma

I guess the factoid 'help karma' might be appropriate:
To increment someone's karma, use ~nickname++, e.g., ~hironimus++. To decrement, use — instead of ++. To view someone's karma level, use ~karma nickname, e.g., ~karma hironimus

I know *how* karma points are added.

no, that was for my benefit, I didn't know
newbie here

ah

~tell hironimus about javabot

http://javachannel.net/wiki/pmwiki.php/FAQ/Javabot

that will help

I suppose there's a way to have javabot privately msg you eh?
ok
thx

Yes, /msg javabot hi

gotcha, sorry all

I just added a basic pdf export to jsizer…

ah.
cool

itext is nice…
now just to rotate the graphics…

It took me a little bit of time to find out where you actualy rended the graphics.
It didn't help I was also tired as hell.

do you know about some channels related to UML modelling?

msg chanserv

is there a way to get the list data from a JList?

how?

hello
if I become a born against christian will Jesus Christ suck my dick in heaven?

http://irc.netsplit.de/channels/?net=freenode

Try #politics

i think thats a question for #philosophy

geez
everyone keep sending me to different channel

who sent you here?

what's wrong with this code? seqNum = ((long) buf.getInt()) & 0×00000000FFFFFFFFL; eclipse complains 'type mismatch: cannot convert from long to int'

ok, politics then phil
#C++ sent me here

lol

is the Java AWT source code supplied with the JDK 6.0?

abhorrent, got any good answer yet?

did you install jdk6 update 2?

src.zip contains the java code

Thanks, joed

the native code is not available as easy…

sleepster, jni code is not included

hmm.. I think I need the native code…

but you can get most of the code from openjdk…

what type is seqNum ?

thanks
well I am deadlocking in Java.Awt Toolkit.initIDs

if it's an int, you need to cast the result of the expression before assigning it

pfn do you know where I could get the JNI code?

openjdk, as ernimril said
why would you want it

oh I see..
well my call is deadlocking on Toolkit.initIDs
which is a JNI call

why are you calling .initIDs

well I am not directly..
I am calling Toolkit.loadLibraries()

and why are you doing that?

to ensure that the necessary native libraries are loaded

Toolkit?

yeah

is there such a method?

Toolkit.loadLibraries()
yeah

where is this documented?

uh, you are using extra native libraries?

String _x = "abc"; how to get the reference address of _x ?

_x

not the value hmm.

what are you looking for exactly

how to print it then?

string is immutable

how to print the address where _x is stored

why are you looking for that?

there are no addresses in java

java doesn't offer such a capability

but objects have reference

you can try system.identityHashCode

~pbv

Java only supports pass by value, not pass by reference (references to objects are passed by value). See http://tinyurl.com/ynr5d3, http://tinyurl.com/ywlv6d (especially http://tinyurl.com/yvppac), and http://tinyurl.com/4wgdh (search for "Passing Reference Data Type Arguments")

yes. references are opaque

which is effectively memory location

hmm.. I am looking at the moment for the call

no pointer arithmetics
the clostest you will get is System.identityHash

I didn't mean pointer arithmetics
ok
Object _a = new Object(); System.out.println(_a);
returns java.lang.Object@3e25a5
what's @3e25a5
isn't it an address?

the reference value

identityhashcode

or that

reference value ok.. which is a virtual address or something?

oh I must apologize.. so I am creating a new Color class which is a part of the AWT.. this Color class calls Toolkit.loadlibraries
I was thinking that the code seemed too clean to be mind
mine

what exactly are you trying do to?

where is toolkit.loadlibraries documented?

it depends on the vm. it often is a heap address/offset of some type.

~javadoc ToolKit

I don't know of any documentation for ToolKit

~javadoc Toolkit

cheeser, please see java.awt.Toolkit: http://java.sun.com/javase/6/docs/api/java/awt/Toolkit.html

when you compare two objects.. basically == will compare their identityHash right?

there it is.
i need to fix that case-awareness

cheeser, look again :p

i was just looking for Toolkit

Duesentrieb, hence it is an address.. hm

b0r3d, basically, yes

~javadoc System.loadLibrary(*)

cheeser, please see java.lang.System.loadLibrary(java.lang.String): http://java.sun.com/javase/6/docs/api/java/lang/System.html#loadLibrary(java.lang.String)

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: