SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm taking an "Intro to Java Programming" class, and I'm running into an issue in Slackware and other Linux'. Our instructions are....
Write the source code for ProjectWhatever and save as ProjectWhatever.java
Save ProjectWhatever.java in a Folder also named ProjectWhatever.java
Save the ProjectWhatever.java Folder in another Folder named Student_Name_chp_num.
Compress the Student_Name_chp_num Folder into Student_Name_chp_num.zip form.
Use Blackboard's "Digital Drop Box" to turn in the assignment.
In SuSE, I would run into an issue where after zipping, the ProjectWhatever.java Folder would be sometimes empty after unzipping.
However, I'm now using Slackware, and now I'm running into a different issue....
After I zip the Student_Name_chp_num Folder, then unzip to verify the contents, the ProjectWhatever.java File in the ProjectWhatever.java Folder loses the .java extension and the coffee cup logo. It becomes a file with no extension at all in Slackware. I'm asked what program I would like to use to open it. At least I'm not losing the whole thing like I was in SuSE, but, these assignments are for a grade and I need everything in it's place.
The teacher teaching this class is Windows only and I don't think he would welcome questions dealing with another OS or problems associated with it. I suppose I should be grateful points aren't being deducted because I'm using Linux and a published prerequisite for the course is the Windows OS.
[~/tmp/] mkdir Student_Name_chp_num
[~/tmp/] cd Student_Name_chp_num/
[~/tmp/Student_Name_chp_num/] mkdir ProjectWhatever.java
[~/tmp/Student_Name_chp_num/] cd ProjectWhatever.java/
[~/tmp/Student_Name_chp_num/ProjectWhatever.java/] vim ProjectWhatever.java
[~/tmp/Student_Name_chp_num/ProjectWhatever.java/] cd ~/tmp
[~/tmp/] zip -R Student_Name_chp_num.zip Student_Name_chp_num/
[~/tmp/] rm -R Student_Name_chp_num/
[~/tmp/] unzip Student_Name_chp_num.zip
[~/tmp]$ du -hab ./Student_Name_chp_num
33 ./Student_Name_chp_num/ProjectWhatever.java/ProjectWhatever.java
121 ./Student_Name_chp_num/ProjectWhatever.java
209 ./Student_Name_chp_num
Note: I added a silly code to the .java file that takes 33 bytes.
Also take a look at zip's parameters, it can convert Linux EOFs to DOS/Windows EOFs when zipping, that will save your teacher a headache.
Edit: You should tell us which program you're using to compress the directory.
Then maybe the problem is that I'm not doing this from the command line, but I'm using KDE. (Right Click, New Folder, Click and Drag, etc.)
Thanks,
-Joe
PS
I'm simply using KDE, Right Clicking and choosing Compress>Compress as...>Student_Name_chp_num.zip. I'm using jGRASP with Java Version 1.5.0_04
I'm also working in /home/user, not /tmp (I don't know if this matters)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.