malki sabag

Greenhorn
+ Follow
since Nov 22, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by malki sabag

hi all,
i am creating an EAR file using maven-ear-plugin.
the EAR that I am creating has a unique structure, it must includes folders,sub-folders, war files and jars.
i was able to create the structure i wanted by using the jarModule, for example:


By doing the above the POM file has gotten huge and I am trying to find a way to reduce its size and make it more generic.
this is the structure of what i have so far, will try to make it short:

What I am trying to achieve here is either to move the jarModule/webModule to a different file and include them in my pom, or perhaps inject the modules from a different location.
My desired end result here is that i could use this pom for various projects and each project would only have to update the web/jar modules.
Regarding the dependencies i assume that they should remain in this pom but i am open for other suggestions as well
your advice would be greatly appreciated, thank you!
9 years ago
Hello all,
I have a .csv file that I want to compress, I am using the GZIPOutputStream. My issue is when trying to write to file it doesn't write the last row.
my code is like this:

the src file looks like this:
first line, first word
second line, first word, second word
third line, first word, second word, third word

in the new file created I only see the first two rows.
what am I missing??
thank you for your help.
10 years ago
Hi all!
im trying to pass values from my script to java (to the main method).
i have seen in different forums how its done but im still not successful.
my script is very long so ill put only whats important:

im getting input from the user like this
print -n "Enter a number "; read NUM

before running the command im preparing it like this:
COMMAND="${JAVA_HOME}/bin/java"
COMMAND="${COMMAND} ${JAVA_DEBUG} ${JAVA_ARGS}"
COMMAND="${COMMAND} com.pack.css.impl.myClass $NUM"

and then i run the command
the class works fine, all the calls are correct but in the main(String[] args) the args array is null

i know the array is null because i am looking at it in a debug mode

what am I doing wrong??
any suggestions??

THANKS A LOT
12 years ago
problem solved
the issue was that the CLASSPATH was not configured correctly
thank you Tim for your help
12 years ago
this is the full stack trace

Exception in thread "main" java.lang.NoClassDefFoundError: com/package/exceptions/MyException
Caused by: java.lang.ClassNotFoundException: com.package.exceptions.MyException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: com.package.test.MyClass. Program will exit.

the last line indicates the name of the class i want to run
here is the class:
public class MyClass {

public static void main(String[] args)
{
System.out.println("Hello");
}
}
12 years ago
thank you for your reply,
you have managed to take me one step forward
now im getting an exception

Exception in thread "main" java.lang.NoClassDefFoundError
Caused by: java.lang.ClassNotFoundException:

what am I missing??
12 years ago
Hello everyone!
i am trying to write a korn shell (.ksh file) that will execute a a java class that resides inside a jar.
the java class i am trying to run has a main method that makes some prints.
the .ksh file has
ENV=location of the jar/the path of the java class
${ENV}

it does not work since it cannot get inside the jar,
any suggestions?
best regards
12 years ago
how to add validations is quite general, can you be more specific to what sort of validations you want.
there can be several of options like after a button is clicked, after you exit a text box etc..