• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java file creation problem on Linux

 
Ranch Hand
Posts: 52
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
It is actually a very simple problem but i can't seem to solve it.

I am trying to create a simple txt or html file in my java program. It works fine but on my local windows machine (file gets created), but the file does not get created when i compile an drun it on linux machine. I have given all the project folders full rights 777, but still no file creation.



javac FileTest.java and java FileTest both work fine and i don't get any exception.
There is no console message and also there are no Test_1.html and /Test.txt files created.

Any idea?

Thanks.
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the folder structure "/opt/FileTest/bin" exist?
I'm not that hot on linux but I believe a leading forward slash means from the root of the file system which isn't necessarily the root of the drive as it is on Windows systems.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Norman, please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/new-java/63247-java-file-creation-linux.html
https://forums.oracle.com/forums/thread.jspa?messageID=10594444
 
Can you hear that? That's my theme music. I don't know where it comes from. Check under this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic